[PATCH] D18043: Remember the input section of locals

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 15:30:01 PST 2016


ruiu added inline comments.

================
Comment at: ELF/OutputSections.cpp:272-277
@@ +271,8 @@
+        if (auto *L = dyn_cast<LocalSymbol<ELFT>>(Sym)) {
+          uintX_t Pos = L->Sym.st_value;
+          if (L->Sym.getType() == STT_SECTION) {
+            Pos += Addend;
+            Addend = 0;
+          }
+          VA = L->Section->OutSec->getVA() + L->Section->getOffset(Pos);
+        } else {
----------------
Can't you move this to getVA for LocalSymbol?


http://reviews.llvm.org/D18043





More information about the llvm-commits mailing list