aboutsummaryrefslogtreecommitdiff
path: root/test/old-elf/X86_64/sectionmap.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/old-elf/X86_64/sectionmap.test')
-rw-r--r--test/old-elf/X86_64/sectionmap.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/old-elf/X86_64/sectionmap.test b/test/old-elf/X86_64/sectionmap.test
new file mode 100644
index 000000000000..5fa04bd87051
--- /dev/null
+++ b/test/old-elf/X86_64/sectionmap.test
@@ -0,0 +1,22 @@
+# This tests that we are able to merge the section .gcc_except_table,
+# .data.rel.local, .data.rel.ro, any other sections that belong to .data
+# into appropriate output sections
+RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/sectionmap.o \
+RUN: --noinhibit-exec -o %t
+RUN: llvm-readobj -sections %t | FileCheck %s -check-prefix=VERIFYSECTIONHEADERS
+
+VERIFYSECTIONHEADERS: Section {
+VERIFYSECTIONHEADERS: Name: .data
+VERIFYSECTIONHEADERS: }
+VERIFYSECTIONHEADERS: Section {
+VERIFYSECTIONHEADERS: Name: .gcc_except_table
+VERIFYSECTIONHEADERS: }
+VERIFYSECTIONHEADERS: Section {
+VERIFYSECTIONHEADERS: Name: .data.rel.local
+VERIFYSECTIONHEADERS: }
+VERIFYSECTIONHEADERS: Section {
+VERIFYSECTIONHEADERS: Name: .data.rel.ro
+VERIFYSECTIONHEADERS: }
+VERIFYSECTIONHEADERS: Section {
+VERIFYSECTIONHEADERS: Name: .bss
+VERIFYSECTIONHEADERS: }