summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/invalid-undef-section-symbol.test
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/ELF/invalid-undef-section-symbol.test')
-rw-r--r--lld/test/ELF/invalid-undef-section-symbol.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/lld/test/ELF/invalid-undef-section-symbol.test b/lld/test/ELF/invalid-undef-section-symbol.test
new file mode 100644
index 00000000000..80e5a1464d7
--- /dev/null
+++ b/lld/test/ELF/invalid-undef-section-symbol.test
@@ -0,0 +1,26 @@
+# RUN: yaml2obj %s -o %t.o
+# RUN: not ld.lld -r --fatal-warnings %t.o -o /dev/null 2>&1 | FileCheck %s
+
+# We used to crash at this.
+# CHECK: STT_SECTION symbol should be defined
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_X86_64
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ - Name: .rela.text
+ Type: SHT_RELA
+ AddressAlign: 0x0000000000000008
+ Info: .text
+ Relocations:
+ - Offset: 0x0000000000000000
+ Symbol: .text
+ Type: R_X86_64_NONE
+Symbols:
+ - Name: .text
+ Type: STT_SECTION
OpenPOWER on IntegriCloud