This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LTO symtab sections vs. missing symbols (libcalls maybe?) and lto-plugin vs. COFF
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 15 Oct 2010 17:02:17 +0100
- Subject: Re: LTO symtab sections vs. missing symbols (libcalls maybe?) and lto-plugin vs. COFF
- References: <4CB71AE3.10608@gmail.com> <mcrhbgood8z.fsf@google.com>
On 14/10/2010 19:11, Ian Lance Taylor wrote:
> Dave Korn writes:
>
>> The consequence of this is that either there are going to be undefined
>> symbols in the final executable, or the linker has to perform another round of
>> library scanning. It occurred to me that the semantics of this might even not
>> have been decided yet, since ELF platforms are perfectly happy with undefined
>> symbols at final link time.
>
> Only when linking dynamically, though. This suggests that your test
> case should fail on ELF when linking with -static. If not, why not?
>
> Ian
My testcase was pretty much just hello world, and the reason it wouldn't
fail on ELF with -static is because:
> %{fuse-linker-plugin: \
> -plugin %(linker_plugin_file) \
> -plugin-opt=%(lto_wrapper) \
> -plugin-opt=-fresolution=%u.res \
> %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \
> %{static:-plugin-opt=-pass-through=-lc} \
> } \
... -lc gets added back in right at the very end of the link, thanks to that
pass-through option.
What I'm planning on COFF is to figure a way to add further pass-through
options for all the -l options and .a files in LIB_SPEC.
cheers,
DaveK