bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12248] Linker plugin failed to preserve linking order


From: d.g.gorbachev at gmail dot com
Subject: [Bug ld/12248] Linker plugin failed to preserve linking order
Date: Sat, 22 Jan 2011 23:37:59 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12248

--- Comment #8 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 
2011-01-22 23:37:57 UTC ---
(In reply to comment #6)

This testcase shows that 2-stage BFD linker changes the order of linking.

ld.hjl takes a definition of __udivdi3 (which is referred to by bar in x.o)
from libdiv.a (not from libgcc, not from libc), though libdiv.a appears before
x.o on the command line:

gcc -B./ -o foo -O2 -fwhole-program -flto=jobserver -fuse-linker-plugin y.o
libdiv.a x.o

GCC documentation: "[T]he linker searches and processes libraries and object
files in the order they are specified.  Thus, foo.o -lz bar.o searches library
z after file foo.o but before bar.o.  If bar.o refers to functions in z, those
functions may not be loaded."

Can this behavior cause any problems in practice?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]