bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/19019] [SPARC64] Only registers %g[2367] can be declared using


From: sourceware-bugzilla at mkarcher dot dialup.fu-berlin.de
Subject: [Bug gold/19019] [SPARC64] Only registers %g[2367] can be declared using STT_REGISTER when linking against libsystemd
Date: Fri, 02 Oct 2015 20:58:29 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19019

Michael Karcher <sourceware-bugzilla at mkarcher dot dialup.fu-berlin.de> 
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com,
                   |                            |address@hidden
                   |                            |r.dialup.fu-berlin.de
          Component|binutils                    |gold
           Assignee|unassigned at sourceware dot org   |ccoutant at gmail dot 
com

--- Comment #9 from Michael Karcher <sourceware-bugzilla at mkarcher dot 
dialup.fu-berlin.de> ---
With access to a Debian build box, I found out that the broken shared library
is created by LTO-linking with gold. The invocation is basically the following
gcc command.

gcc -shared -fPIC $(OBJECTS) -flto -O2 -Wl,--gc-sections -Wl,--as-needed -Wl,-z
-Wl,relro -Wl,-z -Wl,now -Wl,-fuse-ld=gold
-Wl,--version-script=../src/libsystemd/libsystemd.sym -Wl,-z -Wl,relro  
-pthread -Wl,-soname -Wl,libsystemd.so.0 -o .libs/libsystemd.so.0.11.0

If I omit "-Wl,-fuse-ld=gold", I obtain a correct libsystemd.so.0.11.0:

$ readelf -s .libs/libsystemd.so.0.11.0  | grep REGISTER
     4: 0000000000000002     0 REGISTER GLOBAL DEFAULT  UND 
     5: 0000000000000003     0 REGISTER GLOBAL DEFAULT  UND 
  2007: 0000000000000002     0 REGISTER GLOBAL DEFAULT  UND 
  2008: 0000000000000003     0 REGISTER GLOBAL DEFAULT  UND 

Using gcc --save-temps, I obtained the LTO-generated assembler files, assembled
them using

as -s -K PIC -Av9 -64 -no-undeclared-regs -relax -o $x.o $x

objdumping those files shows only REGISTER declarations for %g2 and %g3, which
seem fine, linking them with gold results in a broken output file. I will
attach the object files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]