[DWARF] - Add testcase for checking message about broken relocations.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 11 Jul 2017 12:29:07 +0000 (12:29 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 11 Jul 2017 12:29:07 +0000 (12:29 +0000)
Addresses comments for r306677, which fixed error message itself.

llvm-svn: 307655

llvm/test/DebugInfo/invalid-relocations.test [new file with mode: 0644]

diff --git a/llvm/test/DebugInfo/invalid-relocations.test b/llvm/test/DebugInfo/invalid-relocations.test
new file mode 100644 (file)
index 0000000..2252e1a
--- /dev/null
@@ -0,0 +1,35 @@
+# RUN: yaml2obj %s > %t.o
+# RUN: llvm-dwarfdump %t.o 2>&1 | FileCheck %s
+# CHECK: failed to compute relocation: Unknown
+
+!ELF
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_386
+Sections:
+  - Type:            SHT_PROGBITS
+    Name:            .text
+    Flags:           [ ]
+    AddressAlign:    0x04
+    Content:         "0000"
+  - Type:            SHT_PROGBITS
+    Name:            .debug_info
+    Flags:           [ ]
+    AddressAlign:    0x04
+    Content:         "0000"
+  - Type:            SHT_REL
+    Name:            .rel.debug_info
+    Link:            .symtab
+    Info:            .debug_info
+    Relocations:
+      - Offset:          0
+        Symbol:          _start
+        Type:            0xFF
+Symbols:
+  Global:
+    - Name:     _start
+      Type:     STT_FUNC
+      Section:  .text
+      Value:    0x0