summaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2019-01-10 17:45:56 +0000
committerRui Ueyama <ruiu@google.com>2019-01-10 17:45:56 +0000
commitd2088317a052dffac3adf26ff0c0e4e4446193c8 (patch)
treea6f8614a0d260bc45402c69d1f76d0a3e6480ecd /lld
parentc92b5fa1bf6dad88d879a1b8dededda8733d9bee (diff)
TrapInstr must be 4 bytes long. Currently we write two zeros on every two bytes.
Diffstat (limited to 'lld')
-rw-r--r--lld/ELF/Arch/MSP430.cpp2
-rw-r--r--lld/test/ELF/msp430.s3
2 files changed, 4 insertions, 1 deletions
diff --git a/lld/ELF/Arch/MSP430.cpp b/lld/ELF/Arch/MSP430.cpp
index 073283374f8..fe0c0fe64da 100644
--- a/lld/ELF/Arch/MSP430.cpp
+++ b/lld/ELF/Arch/MSP430.cpp
@@ -42,7 +42,7 @@ public:
MSP430::MSP430() {
// mov.b #0, r3
- TrapInstr = {0x43, 0x43};
+ TrapInstr = {0x43, 0x43, 0x43, 0x43};
}
RelExpr MSP430::getRelExpr(RelType Type, const Symbol &S,
diff --git a/lld/test/ELF/msp430.s b/lld/test/ELF/msp430.s
index 2d063696282..83548fdf4ce 100644
--- a/lld/test/ELF/msp430.s
+++ b/lld/test/ELF/msp430.s
@@ -38,3 +38,6 @@ foo:
; CHECK: Contents of section .data:
; CHECK-NEXT: 2000 21008000 800000
+
+; RUN: od -x %t3 | FileCheck -check-prefix=TRAP %s
+; TRAP: 4343 4343 4343 4343 4343 4343 4343 4343