[patch] First step to fix pr11866 during LTO
Rafael Espíndola
rafael.espindola at gmail.com
Thu Sep 5 14:28:19 PDT 2013
>> I understand what you are saying from llvm’s point of view, but to my original question:
>> When would the linker call this new lto_codegen_add_symtab_symbol() function?
>
>
> Does it call it on every weak symbol which it did not call lto_codegen_add_must_preserve_symbol() on? If so, then what is the point. The LTO interface should be able to infer that.
No. It calls it when the only reason it was going to call
lto_codegen_add_must_preserve_symbol instead is if it wants it for the
symbol table.
In the previous example, LLVM alone cannot tell the difference from F
and G. It needs the linker to call
lto_codegen_add_must_preserve_symbol on the one that is used from a .o
(F) and lto_codegen_add_symtab_symbol on the one that it wants just
to put in a symbol table (G).
Cheers,
Rafael
More information about the llvm-commits
mailing list