88 lines · yaml
1# Test if we are handling RELA relocations for ARM correctly using llvm-dwarfdump.2#3# RUN: yaml2obj %s -o %t4# RUN: llvm-dwarfdump -i %t | FileCheck %s5 6# CHECK: DW_TAG_compile_unit7# CHECK-NEXT: DW_AT_name {{.*}}("correct")8# CHECK-NEXT: DW_AT_type ([[TYPEDIE:0x[0-9A-Fa-f]+]] "correct")9# CHECK: [[TYPEDIE]]: DW_TAG_base_type10# CHECK-NEXT: DW_AT_name {{.*}}("correct")11 12--- !ELF13FileHeader:14 Class: ELFCLASS3215 Data: ELFDATA2LSB16 Type: ET_REL17 Machine: EM_ARM18 Flags: [ EF_ARM_EABI_VER5 ]19Sections:20 # A rudimentary v5 compile unit with an AT_name and an AT_type referencing21 # a rudimentary DW_TAG_base_type DIE with an AT_name attribute.22 - Name: .debug_info23 Type: SHT_PROGBITS24 Content: 17000000050001040000000001A00000000000000002000000000025 - Name: .debug_abbrev26 Type: SHT_PROGBITS27 Content: 011101030E49130000022400030E00000028 - Name: .debug_str29 Type: SHT_PROGBITS30 - Name: .rela.debug_info31 Type: SHT_RELA32 Link: .symtab33 AddressAlign: 0x434 Offset: 0x92935 Info: .debug_info36 Relocations:37 - Offset: 0x838 Symbol: .debug_abbrev39 Type: R_ARM_ABS3240 # The compile unit name is found via a R_ARM_ABS32 relocation.41 - Offset: 0xD42 Symbol: .debug_str43 Type: R_ARM_ABS3244 Addend: 645 # The DW_TAG_base_type is found via a R_ARM_REL32 relocation.46 # This is completely artificial and unlikely to be ever generated47 # by a compiler or other tool. We make sure that the relocation is48 # resolved by (Symbol - Offset + Addend).49 - Offset: 0x1150 Symbol: .debug_info51 Type: R_ARM_REL3252 Addend: 0x2653 - Offset: 0x1654 Symbol: .debug_str55 Type: R_ARM_ABS3256 Addend: 657 - Type: SectionHeaderTable58 Sections:59 - Name: .symtab60 - Name: .strtab61 - Name: .shstrtab62 - Name: .debug_info63 - Name: .debug_abbrev64 - Name: .debug_str65 - Name: .rela.debug_info66Symbols:67 - Name: test.cpp68 Type: STT_FILE69 Index: SHN_ABS70 - Name: .debug_info71 Type: STT_SECTION72 Section: .debug_info73 - Name: .debug_abbrev74 Type: STT_SECTION75 Section: .debug_abbrev76 - Name: .debug_str77 Type: STT_SECTION78 Section: .debug_str79 - Name: .debug_info_cudie80 Type: STT_OBJECT81 Section: .debug_info82 Value: 0xC83DWARF:84 debug_str:85 - 'wrong'86 - 'correct'87...88