[PATCH] D30279: [ELF] Ignore R_*_NONE relocs when relocating non-alloc sections

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 15:04:09 PST 2017


ruiu added inline comments.


================
Comment at: ELF/InputSection.cpp:471
+      continue;
+    } else if (Expr != R_ABS) {
       error(this->getLocation(Offset) + ": has non-ABS reloc");
----------------
nit: no `else` after continue/return/break/etc.


================
Comment at: ELF/Relocations.cpp:323
   if (isRelExprOneOf<R_SIZE, R_GOT_FROM_END, R_GOT_OFF, R_MIPS_GOT_LOCAL_PAGE,
-                     R_MIPS_GOT_OFF, R_MIPS_GOT_OFF32, R_MIPS_TLSGD,
+                     R_MIPS_GOT_OFF, R_MIPS_GOT_OFF32, R_MIPS_TLSGD, R_NONE,
                      R_GOT_PAGE_PC, R_GOT_PC, R_PLT_PC, R_TLSGD_PC, R_TLSGD,
----------------
Is this needed? If a relocation is R_NONE, the control shouldn't reach here in the first place, I think.


Repository:
  rL LLVM

https://reviews.llvm.org/D30279





More information about the llvm-commits mailing list