[lld] r299212 - [ELF] Add a NOP instruction to make LLVM generate a mapping symbol

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 06:08:49 PDT 2017


Author: psmith
Date: Fri Mar 31 08:08:49 2017
New Revision: 299212

URL: http://llvm.org/viewvc/llvm-project?rev=299212&view=rev
Log:
[ELF] Add a NOP instruction to make LLVM generate a mapping symbol

This is a test change applicable for ARM targets.

Previously LLVM would generate a mapping symbol when code contains only
data. This was changed as part of

https://reviews.llvm.org/D30724

and to be more close to the ARM ELF ABI.

The test case is changed to check for behavior with minimal changes.

Patch by Shankar Easwaran

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


Modified:
    lld/trunk/test/ELF/arm-target1.s

Modified: lld/trunk/test/ELF/arm-target1.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/arm-target1.s?rev=299212&r1=299211&r2=299212&view=diff
==============================================================================
--- lld/trunk/test/ELF/arm-target1.s (original)
+++ lld/trunk/test/ELF/arm-target1.s Fri Mar 31 08:08:49 2017
@@ -22,7 +22,9 @@
 .text
   .word patatino(target1)
   patatino:
-
+        .word 32
+// Force generation of $d.0 as section is not all data
+  nop
 // RELATIVE: Disassembly of section .text:
 // RELATIVE: $d.0:
 // RELATIVE:     1000:       04 00 00 00     .word   0x00000004




More information about the llvm-commits mailing list