[PATCH] D33621: Fix for -wrap linker option and LTO, PR 33145

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 10:58:02 PDT 2017


Davide Italiano <dccitaliano at gmail.com> writes:

> On Fri, Jun 2, 2017 at 10:11 PM, Mikulin, Dmitry
> <dmitry.mikulin at sony.com> wrote:
>> If a symbol is either defined or referenced in one of the bitcode files, post-LTO when the symbols are re-created, it will get the IsUsedInRegularObj set, so no harm if we set it early. The only way I can see it happen is when both defs and refs come from shared objects, but I don’t think it’s possible to do –wrap or –defsym in this case.
>>
>
> What I'm saying here is that for non-LTO builds you set the flag
> unconditionally for all the wrap symbols (if I understand the patch
> correctly). This wasn't done before (at least inside `wrap()`). My
> question is whether this has any observable effect.

If it is non-lto, this could only make a difference if the wrapped
symbol was not present in a .o.

Cheers,
Rafael


More information about the llvm-commits mailing list