[PATCH] D25433: [ELF] Don't crash if relocation target section is discarded

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 11:19:51 PDT 2016


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

LGTM



================
Comment at: ELF/Symbols.cpp:57
+    if (!SC->Live) {
+      warn("relocation refers to discarded section");
+      return D.Value;
----------------
evgeny777 wrote:
> ruiu wrote:
> > Please include a filename and symbol name in the error message.
> symbol name is typically nothing more than '.section + addend'. 
Ah, right. Since this is an error path, maybe this should suffice.

  warn(SC->getFile()->getName() + ": relocation refers to discarded section");


https://reviews.llvm.org/D25433





More information about the llvm-commits mailing list