[PATCH] D59649: [ELF] Improve error message for relocations to symbols defined in discarded COMDAT

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 13:12:18 PDT 2019


ruiu added inline comments.


================
Comment at: ELF/Relocations.cpp:698
+  ObjFile<ELFT> *File = Sec.getFile<ELFT>();
+  if (File == Sym.File) {
+    uint32_t SecIdx = File->getSectionIndex(
----------------
This is a big chunk of new code. Is there any way to factor out?


================
Comment at: ELF/Relocations.cpp:709-711
+          Msg = ("relocation refers to " + Visibility() +
+                 "symbol: " + toString(Sym) +
+                 ", which is defined in a discarded section\n>>> section group "
----------------
I think the following message would be better:

  relocation refers to a symbol in a discarded section: <symbol name here>


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59649/new/

https://reviews.llvm.org/D59649





More information about the llvm-commits mailing list