gcc 4.8.1, powerpc, .data.rel.ro.local entry with no corresponding .fixup entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

we've recently compiled "Das U-Boot" with gcc 4.8.1 for powerpc target. This
bootloader relocates itself into RAM, using the content of the .fixup section.

A codeline similar to "printf("%p\n", "qwerty");" inside a static function
creates an address entry (for "qwerty") in .data.rel.ro.local, but I cannot
find a corresponding entry in the .fixup section of this object file. This
let the bootloader reference "qwerty" in the flash after it relocated to RAM.

Could someone please explain how the .fixup section is supposed to work?
Shall every .rela.data.* entry in the elf file have a corresponding entry in
the .fixup section?
Are there any command line options which may suppress the generation of the
data.rel.ro.* sections (as U-Boot does not write-protect parts of the RAM)?

The code works fine with gcc 4.7.x, but I haven't looked into the details of
the generated assembly code and section layout.


Thanks,
Joerg

details:
- gcc version: powerpc-softfloat-linux-gnuspe-gcc (Gentoo 4.8.1 p1.0,
pie-0.5.6) 4.8.1
- gcc command line (some -I removed):
  -g -gdwarf-2  -Os   -fpic -mrelocatable \
  -meabi \
  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xef770000 \
  -fno-builtin  -ffreestanding \
  -isystem /usr/lib/gcc/powerpc-softfloat-linux-gnuspe/4.8.1/include \
  -nostdinc -pipe  -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 \
  -msoft-float -mno-string -mspe=yes -mno-spe -Wall -Wstrict-prototypes \
  -fno-stack-protector -Wno-format-nonliteral -Wno-format-security \
  -fstack-usage"






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux