[Top][All Lists]

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

[Bug ld/23935] [Regression] ld.bfd does not rescan fat LTO archives to r

From: hjl.tools at gmail dot com
Subject: [Bug ld/23935] [Regression] ld.bfd does not rescan fat LTO archives to resolve plugin-added references
Date: Fri, 30 Nov 2018 19:24:58 +0000


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

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |hjl.tools at gmail dot com
         Resolution|---                         |INVALID

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Vladislav Ivanishin from comment #0)

>     /usr/bin/ld: /tmp/ccvITLI4.ltrans0.ltrans.o: in function `main':
>     <artificial>:(.text+0xc): undefined reference to `puts'
> Notice the -ffat-lto-objects switch.  Without it, libfoo.a would contain only
> LTO bytecode and both linkers would error out.  It seems, the logic is off
> somewhere taking "contains LTO bytecode" for "contains only LTO bytecode".

I think it is a gcc bug:

address@hidden pr23935]$ gcc -c -flto -ffat-lto-objects prog.c
address@hidden pr23935]$ gcc-nm prog.o
00000000 T main
address@hidden pr23935]$ nm prog.o
0000000000000001 C __gnu_lto_v1
0000000000000000 T main
                 U puts
address@hidden pr23935]$ clang -flto -c prog.c
address@hidden pr23935]$ llvm-nm prog.o
---------------- T main
                 U printf
address@hidden pr23935]$ 

Reference to puts fin prog.o is missing from IR symbol table.  In fact, ld
is consistent for with and without -ffat-lto-objects.

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]