summaryrefslogtreecommitdiff
path: root/test/old-elf/eh_frame_hdr.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/old-elf/eh_frame_hdr.test')
-rw-r--r--test/old-elf/eh_frame_hdr.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/old-elf/eh_frame_hdr.test b/test/old-elf/eh_frame_hdr.test
new file mode 100644
index 000000000000..74383b8dbc5b
--- /dev/null
+++ b/test/old-elf/eh_frame_hdr.test
@@ -0,0 +1,30 @@
+#RUN: yaml2obj -format=elf %s > %t
+#RUN: lld -flavor old-gnu -target x86_64-linux %t --noinhibit-exec \
+#RUN: -o %t1
+#RUN: llvm-objdump -s %t1 | FileCheck %s
+
+!ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_X86_64
+
+Sections:
+- Name: .eh_frame
+ Type: SHT_PROGBITS
+ Content: "00"
+ AddressAlign: 8
+ Flags: [SHF_ALLOC]
+
+Symbols:
+ Local:
+ - Name: .eh_frame
+ Type: STT_SECTION
+ Section: .eh_frame
+
+# CHECK: Contents of section .eh_frame:
+# CHECK-NEXT: 4001e0 00
+# CHECK-NEXT: Contents of section .eh_frame_hdr:
+# CHECK-NEXT: 4001e8 011bffff f4ffffff
+# ^ 0x4001e0 - 0x4001e8 - 4 = 0xfffffff4