[PATCH] D26508: [ELF] - Better diagnostic for relative relocation to an absolute value error.
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 13:38:20 PST 2016
evgeny777 added inline comments.
================
Comment at: ELF/InputFiles.cpp:471
->body();
- return elf::Symtab<ELFT>::X->addRegular(Name, *Sym, Sec)->body();
+ return elf::Symtab<ELFT>::X->addRegular(Name, *Sym, Sec, this)->body();
}
----------------
Why do you need to pass 'this' pointer if you can use Sec->getFile()
================
Comment at: ELF/Relocations.cpp:345
return true;
- error("relocation " + getRelName(Type) +
+ error(getFilename(Body.File) + "relocation " + getRelName(Type) +
" cannot refer to absolute symbol " + Body.getName());
----------------
I suggest printing getLocation(Rel.Section, Rel.Offset) as it seems to be more useful than location of absolute symbol. Also please add ": " after location.
https://reviews.llvm.org/D26508
More information about the llvm-commits
mailing list