1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/test/DebugInfo/X86/dbg-asm.s
Saleem Abdulrasool 86c034e0ff MC: correct DWARF header for PE/COFF assembly input
The header contains an offset to the DWARF abbreviations for the CU.  The offset
must be section relative for COFF and absolute for others.  The non-assembly
code path for the DWARF header generation already had the correct emission for
the headers.  This corrects just the assembly path.  Due to the invalid
relocation, processing of the debug information would halt previously on the
first assembly input as the associated abbreviations would be out of range as
they would have the location increased by image base and the section offset.

This address PR20332.

llvm-svn: 213275
2014-07-17 16:27:44 +00:00

23 lines
753 B
ArmAsm

# RUN: llvm-mc -triple i686-windows-gnu -g %s -filetype obj -o - \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix CHECK-COFF %s
# RUN: llvm-mc -triple i686-windows-itanium -g %s -filetype obj -o - \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix CHECK-COFF %s
# RUN: llvm-mc -triple i686-linux-gnu -g %s -filetype obj -o - \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix CHECK-ELF %s
_a:
movl $65, %eax
ret
# CHECK-COFF: Relocations [
# CHECK-COFF: Section {{.*}} .debug_info {
# CHECK-COFF: 0x6 IMAGE_REL_I386_SECREL .debug_abbrev
# CHECK-COFF: }
# CHECK-COFF: ]
# CHECK-ELF: Relocations [
# CHECK-ELF: Section {{.*}} .rel.debug_info {
# CHECK-ELF: 0x6 R_386_32 .debug_abbrev
# CHECK-ELF: }
# CHECK-ELF: ]