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

Nick Lewycky nicholas at mxc.ca
Mon Jun 14 21:42:59 PDT 2010


Rafael Espindola wrote:
>>> 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.

Thanks!

Nick

>> Nick
>>
>
> Thanks,




More information about the llvm-commits mailing list