http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60158
Bug ID: 60158 Summary: powerpc: usage of the .data.rel.ro.local section Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jal2 at gmx dot de This bug may concern the gcc documentation on section usage only. Crosscompiling "Das U-Boot" with gcc 4.8.2 for powerpc with -fpic -mrelocatable, some addresses are put into a section .data.rel.ro.local, e.g. the address of "qwerty" from printf("%p\n", "qwerty"); There is no corresponding entry in the .fixup section. As "Das U-Boot" relocates itself to RAM using .got2/.got and .fixup sections only, how shall the section .data.rel.ro.local be handled? Currently it contains addresses only, but this may depend on the source code. I put .data.rel.ro.local into the GOT which solved my problem, but I'm not sure if this is the intention of the gcc developers. I've tried gcc 4.7.3 which put the address of "qwerty" into the GOT directly, i.e. there was no .data.rel.ro.local section and the string address was accessed with one redirection less. details: - gcc version: powerpc-softfloat-linux-gnuspe-gcc (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1) 4.8.2 - 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"