[llvm] r307655 - [DWARF] - Add testcase for checking message about broken relocations.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 05:29:07 PDT 2017
Author: grimar
Date: Tue Jul 11 05:29:07 2017
New Revision: 307655
URL: http://llvm.org/viewvc/llvm-project?rev=307655&view=rev
Log:
[DWARF] - Add testcase for checking message about broken relocations.
Addresses comments for r306677, which fixed error message itself.
Added:
llvm/trunk/test/DebugInfo/invalid-relocations.test
Added: llvm/trunk/test/DebugInfo/invalid-relocations.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/invalid-relocations.test?rev=307655&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/invalid-relocations.test (added)
+++ llvm/trunk/test/DebugInfo/invalid-relocations.test Tue Jul 11 05:29:07 2017
@@ -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
More information about the llvm-commits
mailing list