summaryrefslogtreecommitdiff
path: root/test/elf/ARM/rel-arm-prel31.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/elf/ARM/rel-arm-prel31.test')
-rw-r--r--test/elf/ARM/rel-arm-prel31.test47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/elf/ARM/rel-arm-prel31.test b/test/elf/ARM/rel-arm-prel31.test
new file mode 100644
index 0000000000000..1effc4eceb0e4
--- /dev/null
+++ b/test/elf/ARM/rel-arm-prel31.test
@@ -0,0 +1,47 @@
+# Check handling of R_ARM_PREL31 relocation.
+# RUN: yaml2obj -format=elf %s > %t-o.o
+# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
+# RUN: --noinhibit-exec %t-o.o -o %t
+# RUN: llvm-objdump -s -t %t | FileCheck %s
+
+# CHECK: Contents of section .ARM.extab:
+# CHECK: 4000a4 b1fffe7f
+# CHECK: SYMBOL TABLE:
+# CHECK: 00400054 g F .text {{[0-9a-f]+}} __gxx_personality_v0
+
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_ARM
+ Flags: [ EF_ARM_EABI_VER5 ]
+Sections:
+ - Name: .ARM.extab
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC ]
+ AddressAlign: 0x4
+ Content: 0000FF7F84019701B0B0B008FFFF01080E2432003A040000
+ - Name: .rel.ARM.extab
+ Type: SHT_REL
+ Link: .symtab
+ AddressAlign: 0x4
+ Info: .ARM.extab
+ Relocations:
+ - Offset: 0
+ Symbol: __gxx_personality_v0
+ Type: R_ARM_PREL31
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x4
+ Content: 80B400AF00231846BD465DF8047B704780B582B000AF3B1D1846FFF7FEFFFFF7FEFFFFF7FEFF0420FFF7FEFF0346184601230360002240F20001C0F20001FFF7FEFF3B1D1846FFF7FEFFFFF7FEFF00BF
+Symbols:
+ Local:
+ Global:
+ - Name: __gxx_personality_v0
+ Type: STT_FUNC
+ Section: .text
+ Value: 0x1
+...
+