public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98210] New: SHF_GNU_RETAIN breaks gold linker generated binaries
@ 2020-12-09  7:46 amodra at gmail dot com
  2020-12-09  9:06 ` [Bug target/98210] [11 Regression] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: amodra at gmail dot com @ 2020-12-09  7:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98210

            Bug ID: 98210
           Summary: SHF_GNU_RETAIN breaks gold linker generated binaries
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amodra at gmail dot com
  Target Milestone: ---

gcc.dg/split-1.exe and other split-stack executables broke recently on
powerpc64le-linux, most likely due to git commit 6fbec038f7a7.

I see

  [22] .init_array       INIT_ARRAY      000000001001fda8 00fda8 000008 08 WAo 
0   0  8
  [23] .init_array       INIT_ARRAY      000000001001fdb0 00fdb0 000010 00  WA 
0   0  8

and in dynamic tags

 0x0000000000000019 (INIT_ARRAY)         0x1001fda8
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x0000000000000019 (INIT_ARRAY)         0x1001fdb0
 0x000000000000001b (INIT_ARRAYSZ)       16 (bytes)

ld.so won't handle multiple tags like this, and symbols __init_array_start and
__init_array_end are defined to cover just the first .init_array section.

The same thing happens on x86_64 when using gold, objects like crtbegin.o that
have .init_array with "WAR" flags create separate .init_array output sections
if being linked with glibc files containing .init_array without the "R" flag.

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

end of thread, other threads:[~2021-02-19 17:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  7:46 [Bug target/98210] New: SHF_GNU_RETAIN breaks gold linker generated binaries amodra at gmail dot com
2020-12-09  9:06 ` [Bug target/98210] [11 Regression] " rguenth at gcc dot gnu.org
2020-12-09 13:12 ` hjl.tools at gmail dot com
2020-12-09 22:53 ` amodra at gmail dot com
2020-12-09 23:00 ` hjl.tools at gmail dot com
2020-12-15 15:23 ` jozefl at gcc dot gnu.org
2020-12-15 15:34 ` hjl.tools at gmail dot com
2020-12-16 18:41 ` jozefl at gcc dot gnu.org
2021-01-14 11:04 ` rguenth at gcc dot gnu.org
2021-01-29 21:53 ` segher at gcc dot gnu.org
2021-02-19 11:21 ` jakub at gcc dot gnu.org
2021-02-19 12:40 ` jozefl at gcc dot gnu.org
2021-02-19 17:20 ` jozefl at gcc dot gnu.org

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).