[PATCH] D50289: [ELF] Don't copy STT_TLS in copy relocation

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 6 11:09:26 PDT 2018


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: ELF/Relocations.cpp:469
     if (S.st_shndx == SHN_UNDEF || S.st_shndx == SHN_ABS ||
-        S.st_value != SS.Value)
+        S.st_value != SS.Value || S.getType() == STT_TLS)
       continue;
----------------
nit: I'd check the value equality at the last of these boolean expressions. (i.e. instead of adding your new expression at the end, insert it to the place where it feels more natural, which is after the comparison against SHN_ABS).


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50289





More information about the llvm-commits mailing list