[lld] r345172 - Include input section name and output section name in an error message.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 11:15:41 PDT 2018


Author: ruiu
Date: Wed Oct 24 11:15:40 2018
New Revision: 345172

URL: http://llvm.org/viewvc/llvm-project?rev=345172&view=rev
Log:
Include input section name and output section name in an error message.

Differential Revision: https://reviews.llvm.org/D53645

Modified:
    lld/trunk/ELF/Writer.cpp
    lld/trunk/test/ELF/execute-only-mixed-data.s

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=345172&r1=345171&r2=345172&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Oct 24 11:15:40 2018
@@ -1759,7 +1759,8 @@ template <class ELFT> void Writer<ELFT>:
     if (OS->Flags & SHF_EXECINSTR)
       for (InputSection *IS : getInputSections(OS))
         if (!(IS->Flags & SHF_EXECINSTR))
-          error("-execute-only does not support intermingling data and code");
+          error("cannot place " + toString(IS) + " into " + toString(OS->Name) +
+                ": -execute-only does not support intermingling data and code");
 }
 
 // The linker is expected to define SECNAME_start and SECNAME_end

Modified: lld/trunk/test/ELF/execute-only-mixed-data.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/execute-only-mixed-data.s?rev=345172&r1=345171&r2=345172&view=diff
==============================================================================
--- lld/trunk/test/ELF/execute-only-mixed-data.s (original)
+++ lld/trunk/test/ELF/execute-only-mixed-data.s Wed Oct 24 11:15:40 2018
@@ -16,7 +16,7 @@
 // RUN: }" > %t.lds
 // RUN: ld.lld -T%t.lds %t.o -o %t -execute-only 2>&1
 
-// CHECK: -execute-only does not support intermingling data and code
+// CHECK: cannot place {{.*}}:(.rodata.foo) into .text: -execute-only does not support intermingling data and code
 
     br lr
 




More information about the llvm-commits mailing list