[llvm-commits] [patch] Small fixes to the gold plugin

Rafael Espindola espindola at google.com
Mon Jun 14 14:18:19 PDT 2010


>> The second fix is a special case for _start. We need this for the
>> uncommon situation that a full program is LLVM IL (including the crt*
>> files). In this case the resolution of nothing is LDPR_PREVAILING_DEF
>> and we drop all symbols.
>
> Uh, no. This fix belongs in the gold linker since _start is a special case
> in the operating system and will apply to all forms of dead global
> elimination (including garbage collection inside the linker) and across all
> plugins. If gold is ported to a different operating system where _start
> isn't special but another symbol is, the plugins shouldn't all need to
> change.
> Gold should treat _start as though it were referenced by native code. Does
> that sound sensible?

Yes. I was not sure if we should count the runtime reference to it,
but it makes sense. It is similar to what gold tells us when producing
shared libraries. I will commit the other part and try to fix this in
gold.

> Nick
>

Thanks,
-- 
Rafael Ávila de Espíndola




More information about the llvm-commits mailing list