bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12430] IR and non-IR objects, partial linking, and undefined ref


From: hjl.tools at gmail dot com
Subject: [Bug ld/12430] IR and non-IR objects, partial linking, and undefined reference errors
Date: Sat, 22 Jan 2011 05:02:03 +0000

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at google dot com,
                   |                            |ian at airs dot com

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-22 05:01:16 
UTC ---
It is an LTO issue. In stage 2, linker sees:

 /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/usr/gcc-4.6/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/crtbegin.o
/tmp/ccsgGNAQ.obj-only.o /tmp/ccrzbXDQ.ltrans0.ltrans.o --no-whole-archive
/usr/gcc-4.6/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/libgcc.a
/usr/gcc-4.6/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64/libgcc_s.so
/usr/lib/../lib64/libc.so --no-whole-archive
/usr/gcc-4.6/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/libgcc.a
/usr/gcc-4.6/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64/libgcc_s.so
/usr/gcc-4.6/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/crtend.o
/usr/lib/../lib64/crtn.o

address@hidden pr12430]$ nm /tmp/ccrzbXDQ.ltrans0.ltrans.o
address@hidden pr12430]$ 

Since LTO doesn't see foo be called from main, LTO optimizes it out.
ld.hjl gives correct diagnostic.

Is there a way in LTO API for linker to inform LTO that a symbol is
referenced from an non-IR object?

-- 
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]