public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60158] New: powerpc: usage of the .data.rel.ro.local section
@ 2014-02-12 10:59 jal2 at gmx dot de
  2015-10-15 15:41 ` [Bug other/60158] " joakim.tjernlund at transmode dot se
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jal2 at gmx dot de @ 2014-02-12 10:59 UTC (permalink / raw)
  To: gcc-bugs

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"


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-04 23:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 10:59 [Bug c/60158] New: powerpc: usage of the .data.rel.ro.local section jal2 at gmx dot de
2015-10-15 15:41 ` [Bug other/60158] " joakim.tjernlund at transmode dot se
2020-06-03  0:02 ` segher at gcc dot gnu.org
2020-06-03  8:10 ` joakim.tjernlund at infinera dot com
2020-06-03 14:40 ` segher at gcc dot gnu.org
2020-06-03 18:52 ` joakim.tjernlund at infinera dot com
2020-06-04 15:59 ` joakim.tjernlund at infinera dot com
2020-06-04 20:22 ` segher at gcc dot gnu.org
2020-06-04 23:21 ` joakim.tjernlund at infinera dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).