[PATCH] D23514: [ELF] - Do not change binding for hidden symbols when creating relocatable output.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 13:36:16 PDT 2016


On Mon, Aug 15, 2016 at 11:02 PM, George Rimar <grimar at accesssoftek.com>
wrote:

> grimar added inline comments.
>
> ================
> Comment at: ELF/OutputSections.cpp:1319
> @@ -1318,2 +1318,3 @@
>    Symbol *S = Body->symbol();
>    uint8_t Visibility = S->Visibility;
> +  if (!Config->Relocatable)
> ----------------
> ruiu wrote:
> > I'm not sure if this would fix the problem entirely. My gut is that we
> want to keep the original symbol type if -r is specified. If that's the
> case, we want to add
> >
> >   if (Config->Relocatable)
> >     return S->Binding;
> >
> > here. But I don't know if that's correct.
> gold allows GNU_UNIQUE->STB_GLOBAL transformation for relocatable output,
> so I tried to be consistent with it here.
> That is the only difference with your suggestion I think. And looks gnu ld
> does not support
> --no-gnu-unique at all, so probably we can go with any solution here.
>

Do you think what GNU gold does makes sense?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160816/8d2edbfb/attachment.html>


More information about the llvm-commits mailing list