[PATCH] D18731: ELF: Create dynamic symbols for symbol aliases of copy relocations.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 2 14:55:58 PDT 2016


pcc added inline comments.

================
Comment at: ELF/Writer.cpp:388
@@ -387,5 +387,3 @@
       if (Target->needsCopyRel<ELFT>(Type, *B)) {
-        B->NeedsCopyOrPltAddr = true;
-        Out<ELFT>::RelaDyn->addReloc(
-            {Target->CopyRel, DynamicReloc<ELFT>::Off_Bss, B});
+        addCopyRelSymbol(B);
         continue;
----------------
ruiu wrote:
> How is it guaranteed that this function is not called more than once for each shared symbol?
We set the `NeedsCopyOrPltAddr` flag on each alias. That causes the test on line 385 to succeed.


http://reviews.llvm.org/D18731





More information about the llvm-commits mailing list