[PATCH] D52408: [ELF] - Do not fail on R_*_NONE relocations when parsing the debug info.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 07:12:12 PDT 2018


grimar added inline comments.


================
Comment at: ELF/DWARF.cpp:80
+    RelType Type = Rel.getType(Config->IsMips64EL);
+    if (Target->getRelExpr(Type, File->getRelocTargetSym(Rel), Loc) != R_NONE)
+      error(toString(File) + ": relocation " + lld::toString(Type) + " at 0x" +
----------------
ruiu wrote:
> Looks like calling `getRelExpr` is overkill as you don't really need a symbol and a relocation target location. You probably should define a more lightweight predicate or just `Target->NoneRelType`.
I was not sure that introducing `Target->NoneRelType` is acceptable. But that is what I would really prefer here. I'll do that change.


https://reviews.llvm.org/D52408





More information about the llvm-commits mailing list