[PATCH] D53645: Include input section name and output section name in an error message.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 11:17:47 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL345172: Include input section name and output section name in an error message. (authored by ruiu, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D53645?vs=170887&id=170936#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D53645

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


Index: lld/trunk/test/ELF/execute-only-mixed-data.s
===================================================================
--- lld/trunk/test/ELF/execute-only-mixed-data.s
+++ lld/trunk/test/ELF/execute-only-mixed-data.s
@@ -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
 
Index: lld/trunk/ELF/Writer.cpp
===================================================================
--- lld/trunk/ELF/Writer.cpp
+++ lld/trunk/ELF/Writer.cpp
@@ -1759,7 +1759,8 @@
     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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53645.170936.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181024/3f752ec8/attachment.bin>


More information about the llvm-commits mailing list