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

Nick Lewycky nlewycky at google.com
Mon Jun 14 13:16:12 PDT 2010


On 14 June 2010 12:28, Rafael Espindola <espindola at google.com> wrote:

> The attached patch has two small fixes to the gold plugin. First, it
> moves two checks out of the per file loop. I assume this was broken in
> the recent changes. Right now the plugin will produce no output if any
> file was fully unused.
>

Right. I even remember noticing that at one point, but got distracted.
Please commit the second hunk of your patch. Thanks.

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?

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100614/6ada068a/attachment.html>


More information about the llvm-commits mailing list