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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 23:02:04 PDT 2016


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.


https://reviews.llvm.org/D23514





More information about the llvm-commits mailing list