mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
d1c4b12b9d
PR binutils/18374 bin * dwarf.h (struct dwarf_section): Add reloc_info and num_relocs fields. (struct dwarf_section_display): Change bitfield to boolean. (reloc_at): Add prototype. * dwarf.c (display_loc_list): Ignore list terminators if there are relocs against them. (display_debug_loc): Issue a warning if there are relocs against the .debug_loc section. (display_displays): Initialise reloc_info and num_relocs fields. * objdump.c (load_specific_debug_section): Initialise reloc_info and num_relocs fields. (reloc_at): New function. * readelf.c (is_32bit_abs_reloc): Add IA64's R_IA64_DIS32LSB reloc. (reloc_at): New function. (apply_relocations): Add relocs_return and num_relocs_return parameters. Fill them in with the loaded relocs if non-NULL. (dump_section_as_bytes): Update call to apply_relocations. (load_specific_debug_section): Initialise reloc_info and num_relocs fields. tests * binutils-all/pr18374.s: New test file. * binutils-all/readelf.exp: Assemble and run the new test. * binutils-all/readelf.pr18374: Expected output from readelf.
235 lines
3.0 KiB
ArmAsm
235 lines
3.0 KiB
ArmAsm
.section .debug_info,"",%progbits
|
|
.4byte 0x77
|
|
.2byte 0x4
|
|
.4byte .Ldebug_abbrev0
|
|
.byte 0x4
|
|
.uleb128 0x1
|
|
.4byte .LASF3
|
|
.byte 0xc
|
|
.ascii "x.c\000"
|
|
.4byte .LASF4
|
|
.4byte .Ltext0
|
|
.4byte .Letext0
|
|
.4byte .Ldebug_line0
|
|
.uleb128 0x2
|
|
.ascii "foo\000"
|
|
.byte 0x1
|
|
.byte 0x2
|
|
.4byte .LFB0
|
|
.4byte .LFE0
|
|
.uleb128 0x1
|
|
.byte 0x9c
|
|
.4byte 0x64
|
|
.uleb128 0x3
|
|
.ascii "b\000"
|
|
.byte 0x1
|
|
.byte 0x2
|
|
.4byte 0x64
|
|
.4byte .LLST0
|
|
.uleb128 0x4
|
|
.4byte .LASF0
|
|
.byte 0x1
|
|
.byte 0x2
|
|
.4byte 0x66
|
|
.4byte .LLST1
|
|
.uleb128 0x5
|
|
.ascii "ptr\000"
|
|
.byte 0x1
|
|
.byte 0x4
|
|
.4byte 0x6d
|
|
.uleb128 0x1
|
|
.byte 0x50
|
|
.byte 0
|
|
.uleb128 0x6
|
|
.byte 0x4
|
|
.uleb128 0x7
|
|
.byte 0x4
|
|
.byte 0x7
|
|
.4byte .LASF1
|
|
.uleb128 0x8
|
|
.byte 0x4
|
|
.4byte 0x73
|
|
.uleb128 0x7
|
|
.byte 0x1
|
|
.byte 0x8
|
|
.4byte .LASF2
|
|
.byte 0
|
|
|
|
.section .debug_abbrev,"",%progbits
|
|
.Ldebug_abbrev0:
|
|
.uleb128 0x1
|
|
.uleb128 0x11
|
|
.byte 0x1
|
|
.uleb128 0x25
|
|
.uleb128 0xe
|
|
.uleb128 0x13
|
|
.uleb128 0xb
|
|
.uleb128 0x3
|
|
.uleb128 0x8
|
|
.uleb128 0x1b
|
|
.uleb128 0xe
|
|
.uleb128 0x11
|
|
.uleb128 0x1
|
|
.uleb128 0x12
|
|
.uleb128 0x6
|
|
.uleb128 0x10
|
|
.uleb128 0x17
|
|
.byte 0
|
|
.byte 0
|
|
.uleb128 0x2
|
|
.uleb128 0x2e
|
|
.byte 0x1
|
|
.uleb128 0x3f
|
|
.uleb128 0x19
|
|
.uleb128 0x3
|
|
.uleb128 0x8
|
|
.uleb128 0x3a
|
|
.uleb128 0xb
|
|
.uleb128 0x3b
|
|
.uleb128 0xb
|
|
.uleb128 0x27
|
|
.uleb128 0x19
|
|
.uleb128 0x11
|
|
.uleb128 0x1
|
|
.uleb128 0x12
|
|
.uleb128 0x6
|
|
.uleb128 0x40
|
|
.uleb128 0x18
|
|
.uleb128 0x2117
|
|
.uleb128 0x19
|
|
.uleb128 0x1
|
|
.uleb128 0x13
|
|
.byte 0
|
|
.byte 0
|
|
.uleb128 0x3
|
|
.uleb128 0x5
|
|
.byte 0
|
|
.uleb128 0x3
|
|
.uleb128 0x8
|
|
.uleb128 0x3a
|
|
.uleb128 0xb
|
|
.uleb128 0x3b
|
|
.uleb128 0xb
|
|
.uleb128 0x49
|
|
.uleb128 0x13
|
|
.uleb128 0x2
|
|
.uleb128 0x17
|
|
.byte 0
|
|
.byte 0
|
|
.uleb128 0x4
|
|
.uleb128 0x5
|
|
.byte 0
|
|
.uleb128 0x3
|
|
.uleb128 0xe
|
|
.uleb128 0x3a
|
|
.uleb128 0xb
|
|
.uleb128 0x3b
|
|
.uleb128 0xb
|
|
.uleb128 0x49
|
|
.uleb128 0x13
|
|
.uleb128 0x2
|
|
.uleb128 0x17
|
|
.byte 0
|
|
.byte 0
|
|
.uleb128 0x5
|
|
.uleb128 0x34
|
|
.byte 0
|
|
.uleb128 0x3
|
|
.uleb128 0x8
|
|
.uleb128 0x3a
|
|
.uleb128 0xb
|
|
.uleb128 0x3b
|
|
.uleb128 0xb
|
|
.uleb128 0x49
|
|
.uleb128 0x13
|
|
.uleb128 0x2
|
|
.uleb128 0x18
|
|
.byte 0
|
|
.byte 0
|
|
.uleb128 0x6
|
|
.uleb128 0xf
|
|
.byte 0
|
|
.uleb128 0xb
|
|
.uleb128 0xb
|
|
.byte 0
|
|
.byte 0
|
|
.uleb128 0x7
|
|
.uleb128 0x24
|
|
.byte 0
|
|
.uleb128 0xb
|
|
.uleb128 0xb
|
|
.uleb128 0x3e
|
|
.uleb128 0xb
|
|
.uleb128 0x3
|
|
.uleb128 0xe
|
|
.byte 0
|
|
.byte 0
|
|
.uleb128 0x8
|
|
.uleb128 0xf
|
|
.byte 0
|
|
.uleb128 0xb
|
|
.uleb128 0xb
|
|
.uleb128 0x49
|
|
.uleb128 0x13
|
|
.byte 0
|
|
.byte 0
|
|
.byte 0
|
|
|
|
.section .debug_loc,"",%progbits
|
|
.Ldebug_loc0:
|
|
.LLST0:
|
|
.4byte .LVL0
|
|
.4byte .LVL2
|
|
.2byte 0x1
|
|
.byte 0x50
|
|
.4byte .LVL2
|
|
.4byte .LFE0
|
|
.2byte 0x4
|
|
.byte 0xf3
|
|
.uleb128 0x1
|
|
.byte 0x50
|
|
.byte 0x9f
|
|
.4byte 0
|
|
.4byte 0
|
|
.LLST1:
|
|
.4byte .LVL0
|
|
.4byte .LVL1
|
|
.2byte 0x1
|
|
.byte 0x51
|
|
.4byte .LVL1
|
|
.4byte .LVL2
|
|
.2byte 0x3
|
|
.byte 0x71
|
|
.sleb128 -1
|
|
.byte 0x9f
|
|
.4byte .LVL2
|
|
.4byte .LVL3
|
|
.2byte 0xb
|
|
.byte 0x70
|
|
.sleb128 0
|
|
.byte 0x20
|
|
.byte 0xf3
|
|
.uleb128 0x1
|
|
.byte 0x51
|
|
.byte 0x22
|
|
.byte 0x70
|
|
.sleb128 0
|
|
.byte 0x22
|
|
.byte 0x9f
|
|
.4byte .LVL3
|
|
.4byte .LFE0
|
|
.2byte 0xb
|
|
.byte 0x70
|
|
.sleb128 0
|
|
.byte 0x20
|
|
.byte 0x70
|
|
.sleb128 0
|
|
.byte 0x22
|
|
.byte 0xf3
|
|
.uleb128 0x1
|
|
.byte 0x51
|
|
.byte 0x22
|
|
.byte 0x9f
|
|
.4byte 0
|
|
.4byte 0
|