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