2017-02-24 05:54:02 +08:00
|
|
|
Contents of the .debug_info section:
|
|
|
|
|
|
|
|
Compilation Unit @ offset 0x0:
|
|
|
|
Length: 0x160 \(32-bit\)
|
|
|
|
Version: 5
|
2020-09-23 22:48:35 +08:00
|
|
|
Unit Type: DW_UT_compile \(1\)
|
2017-02-24 05:54:02 +08:00
|
|
|
Abbrev Offset: 0x0
|
|
|
|
Pointer Size: 8
|
|
|
|
<0><c>: Abbrev Number: 6 \(DW_TAG_compile_unit\)
|
|
|
|
<d> DW_AT_producer : \(indirect string, offset: 0x43\): GNU C11 7.0.1 20170218 \(experimental\) -mtune=generic -march=x86-64 -gdwarf-5 -O2
|
|
|
|
<11> DW_AT_language : 29 \(C11\)
|
|
|
|
<12> DW_AT_name : \(indirect line string, offset: 0x14\): main.c
|
|
|
|
<16> DW_AT_comp_dir : \(indirect line string, offset: 0x0\):
|
|
|
|
<1a> DW_AT_ranges : 0xc
|
|
|
|
<1e> DW_AT_low_pc : 0x0
|
|
|
|
<26> DW_AT_stmt_list : 0x0
|
|
|
|
<1><2a>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<2b> DW_AT_byte_size : 1
|
|
|
|
<2c> DW_AT_encoding : 8 \(unsigned char\)
|
|
|
|
<2d> DW_AT_name : \(indirect string, offset: 0x94\): unsigned char
|
|
|
|
<1><31>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<32> DW_AT_byte_size : 2
|
|
|
|
<33> DW_AT_encoding : 7 \(unsigned\)
|
|
|
|
<34> DW_AT_name : \(indirect string, offset: 0xbc\): short unsigned int
|
|
|
|
<1><38>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<39> DW_AT_byte_size : 4
|
|
|
|
<3a> DW_AT_encoding : 7 \(unsigned\)
|
|
|
|
<3b> DW_AT_name : \(indirect string, offset: 0x0\): unsigned int
|
|
|
|
<1><3f>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<40> DW_AT_byte_size : 8
|
|
|
|
<41> DW_AT_encoding : 7 \(unsigned\)
|
|
|
|
<42> DW_AT_name : \(indirect string, offset: 0x2a\): long unsigned int
|
|
|
|
<1><46>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<47> DW_AT_byte_size : 1
|
|
|
|
<48> DW_AT_encoding : 6 \(signed char\)
|
|
|
|
<49> DW_AT_name : \(indirect string, offset: 0x19\): signed char
|
|
|
|
<1><4d>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<4e> DW_AT_byte_size : 2
|
|
|
|
<4f> DW_AT_encoding : 5 \(signed\)
|
|
|
|
<50> DW_AT_name : \(indirect string, offset: 0xef\): short int
|
|
|
|
<1><54>: Abbrev Number: 7 \(DW_TAG_base_type\)
|
|
|
|
<55> DW_AT_byte_size : 4
|
|
|
|
<56> DW_AT_encoding : 5 \(signed\)
|
|
|
|
<57> DW_AT_name : int
|
|
|
|
<1><5b>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<5c> DW_AT_byte_size : 8
|
|
|
|
<5d> DW_AT_encoding : 5 \(signed\)
|
|
|
|
<5e> DW_AT_name : \(indirect string, offset: 0xae\): long int
|
|
|
|
<1><62>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<63> DW_AT_byte_size : 8
|
|
|
|
<64> DW_AT_encoding : 7 \(unsigned\)
|
|
|
|
<65> DW_AT_name : \(indirect string, offset: 0xff\): sizetype
|
|
|
|
<1><69>: Abbrev Number: 3 \(DW_TAG_pointer_type\)
|
|
|
|
<6a> DW_AT_byte_size : 8
|
|
|
|
<6a> DW_AT_type : <0x6e>
|
|
|
|
<1><6e>: Abbrev Number: 1 \(DW_TAG_base_type\)
|
|
|
|
<6f> DW_AT_byte_size : 1
|
|
|
|
<70> DW_AT_encoding : 6 \(signed char\)
|
|
|
|
<71> DW_AT_name : \(indirect string, offset: 0xa2\): char
|
|
|
|
<1><75>: Abbrev Number: 8 \(DW_TAG_variable\)
|
|
|
|
<76> DW_AT_name : \(indirect string, offset: 0xd9\): __environ
|
|
|
|
<7a> DW_AT_decl_file : 2
|
|
|
|
<7b> DW_AT_decl_line : 546
|
|
|
|
<7d> DW_AT_type : <0x81>
|
|
|
|
<81> DW_AT_external : 1
|
|
|
|
<81> DW_AT_declaration : 1
|
|
|
|
<1><81>: Abbrev Number: 3 \(DW_TAG_pointer_type\)
|
|
|
|
<82> DW_AT_byte_size : 8
|
|
|
|
<82> DW_AT_type : <0x69>
|
|
|
|
<1><86>: Abbrev Number: 2 \(DW_TAG_variable\)
|
|
|
|
<87> DW_AT_name : \(indirect string, offset: 0xe8\): optarg
|
|
|
|
<8b> DW_AT_decl_file : 3
|
|
|
|
<8b> DW_AT_decl_line : 57
|
|
|
|
<8c> DW_AT_type : <0x69>
|
|
|
|
<90> DW_AT_external : 1
|
|
|
|
<90> DW_AT_declaration : 1
|
|
|
|
<1><90>: Abbrev Number: 2 \(DW_TAG_variable\)
|
|
|
|
<91> DW_AT_name : \(indirect string, offset: 0xa7\): optind
|
|
|
|
<95> DW_AT_decl_file : 3
|
|
|
|
<95> DW_AT_decl_line : 71
|
|
|
|
<96> DW_AT_type : <0x54>
|
|
|
|
<9a> DW_AT_external : 1
|
|
|
|
<9a> DW_AT_declaration : 1
|
|
|
|
<1><9a>: Abbrev Number: 2 \(DW_TAG_variable\)
|
|
|
|
<9b> DW_AT_name : \(indirect string, offset: 0x3c\): opterr
|
|
|
|
<9f> DW_AT_decl_file : 3
|
|
|
|
<9f> DW_AT_decl_line : 76
|
|
|
|
<a0> DW_AT_type : <0x54>
|
|
|
|
<a4> DW_AT_external : 1
|
|
|
|
<a4> DW_AT_declaration : 1
|
|
|
|
<1><a4>: Abbrev Number: 2 \(DW_TAG_variable\)
|
|
|
|
<a5> DW_AT_name : \(indirect string, offset: 0xd\): optopt
|
|
|
|
<a9> DW_AT_decl_file : 3
|
|
|
|
<a9> DW_AT_decl_line : 80
|
|
|
|
<aa> DW_AT_type : <0x54>
|
|
|
|
<ae> DW_AT_external : 1
|
|
|
|
<ae> DW_AT_declaration : 1
|
|
|
|
<1><ae>: Abbrev Number: 4 \(DW_TAG_variable\)
|
|
|
|
<af> DW_AT_name : \(indirect string, offset: 0x25\): xvar
|
|
|
|
<b3> DW_AT_decl_file : 1
|
|
|
|
<b3> DW_AT_decl_line : 2
|
|
|
|
<b4> DW_AT_type : <0x54>
|
|
|
|
<b8> DW_AT_external : 1
|
|
|
|
<b8> DW_AT_location : 9 byte block: 3 (0|34) (0|12) 0 0 0 0 (0|12) (0|34) \(DW_OP_addr: 1234\)
|
|
|
|
<1><c2>: Abbrev Number: 4 \(DW_TAG_variable\)
|
|
|
|
<c3> DW_AT_name : \(indirect string, offset: 0xcf\): yvar
|
|
|
|
<c7> DW_AT_decl_file : 1
|
|
|
|
<c7> DW_AT_decl_line : 3
|
|
|
|
<c8> DW_AT_type : <0x54>
|
|
|
|
<cc> DW_AT_external : 1
|
|
|
|
<cc> DW_AT_location : 9 byte block: 3 (0|34) (0|12) 0 0 0 0 (0|12) (0|34) \(DW_OP_addr: 1234\)
|
|
|
|
<1><d6>: Abbrev Number: 4 \(DW_TAG_variable\)
|
|
|
|
<d7> DW_AT_name : \(indirect string, offset: 0xd4\): pvar
|
|
|
|
<db> DW_AT_decl_file : 1
|
|
|
|
<db> DW_AT_decl_line : 4
|
|
|
|
<dc> DW_AT_type : <0xea>
|
|
|
|
<e0> DW_AT_external : 1
|
|
|
|
<e0> DW_AT_location : 9 byte block: 3 (0|34) (0|12) 0 0 0 0 (0|12) (0|34) \(DW_OP_addr: 1234\)
|
|
|
|
<1><ea>: Abbrev Number: 3 \(DW_TAG_pointer_type\)
|
|
|
|
<eb> DW_AT_byte_size : 8
|
|
|
|
<eb> DW_AT_type : <0x54>
|
|
|
|
<1><ef>: Abbrev Number: 9 \(DW_TAG_subprogram\)
|
|
|
|
<f0> DW_AT_external : 1
|
|
|
|
<f0> DW_AT_name : \(indirect string, offset: 0x14\): main
|
|
|
|
<f4> DW_AT_decl_file : 1
|
|
|
|
<f5> DW_AT_decl_line : 6
|
|
|
|
<f6> DW_AT_prototyped : 1
|
|
|
|
<f6> DW_AT_type : <0x54>
|
|
|
|
<fa> DW_AT_low_pc : 0x1234
|
|
|
|
<102> DW_AT_high_pc : 0x5678
|
|
|
|
<10a> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\)
|
|
|
|
<10c> DW_AT_call_all_calls: 1
|
|
|
|
<10c> DW_AT_sibling : <0x13e>
|
|
|
|
<2><110>: Abbrev Number: 5 \(DW_TAG_formal_parameter\)
|
|
|
|
<111> DW_AT_name : \(indirect string, offset: 0xb7\): argc
|
|
|
|
<115> DW_AT_decl_file : 1
|
|
|
|
<115> DW_AT_decl_line : 6
|
|
|
|
<115> DW_AT_type : <0x54>
|
|
|
|
<119> DW_AT_location : 0xc \(location list\)
|
|
|
|
<2><11d>: Abbrev Number: 5 \(DW_TAG_formal_parameter\)
|
|
|
|
<11e> DW_AT_name : \(indirect string, offset: 0x108\): argv
|
|
|
|
<122> DW_AT_decl_file : 1
|
|
|
|
<122> DW_AT_decl_line : 6
|
|
|
|
<122> DW_AT_type : <0x81>
|
|
|
|
<126> DW_AT_location : 0x23 \(location list\)
|
|
|
|
<2><12a>: Abbrev Number: 10 \(DW_TAG_call_site\)
|
|
|
|
<12b> DW_AT_call_return_pc: 0x12345
|
|
|
|
<133> DW_AT_call_origin : <0x157>
|
|
|
|
<3><137>: Abbrev Number: 11 \(DW_TAG_call_site_parameter\)
|
|
|
|
<138> DW_AT_location : 1 byte block: 55 \(DW_OP_reg5 \([^()]*\)\)
|
|
|
|
<13a> DW_AT_call_value : 1 byte block: 30 \(DW_OP_lit0\)
|
|
|
|
<3><13c>: Abbrev Number: 0
|
|
|
|
<2><13d>: Abbrev Number: 0
|
|
|
|
<1><13e>: Abbrev Number: 12 \(DW_TAG_subprogram\)
|
|
|
|
<13f> DW_AT_external : 1
|
|
|
|
<13f> DW_AT_name : \(indirect string, offset: 0xe3\): func
|
|
|
|
<143> DW_AT_decl_file : 1
|
|
|
|
<144> DW_AT_decl_line : 5
|
|
|
|
<145> DW_AT_prototyped : 1
|
|
|
|
<145> DW_AT_low_pc : 0x1234
|
|
|
|
<14d> DW_AT_high_pc : 0x5678
|
|
|
|
<155> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\)
|
|
|
|
<157> DW_AT_call_all_calls: 1
|
|
|
|
<1><157>: Abbrev Number: 13 \(DW_TAG_subprogram\)
|
|
|
|
<158> DW_AT_external : 1
|
|
|
|
<158> DW_AT_declaration : 1
|
|
|
|
<158> DW_AT_linkage_name: \(indirect string, offset: 0xf9\): alarm
|
|
|
|
<15c> DW_AT_name : \(indirect string, offset: 0xf9\): alarm
|
|
|
|
<160> DW_AT_decl_file : 2
|
|
|
|
<161> DW_AT_decl_line : 435
|
|
|
|
<1><163>: Abbrev Number: 0
|
|
|
|
|
|
|
|
Contents of the .debug_abbrev section:
|
|
|
|
|
|
|
|
Number TAG \(0x0\)
|
|
|
|
1 DW_TAG_base_type \[no children\]
|
|
|
|
DW_AT_byte_size DW_FORM_data1
|
|
|
|
DW_AT_encoding DW_FORM_data1
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
2 DW_TAG_variable \[no children\]
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT_decl_file DW_FORM_implicit_const: 3
|
|
|
|
DW_AT_decl_line DW_FORM_data1
|
|
|
|
DW_AT_type DW_FORM_ref4
|
|
|
|
DW_AT_external DW_FORM_flag_present
|
|
|
|
DW_AT_declaration DW_FORM_flag_present
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
3 DW_TAG_pointer_type \[no children\]
|
|
|
|
DW_AT_byte_size DW_FORM_implicit_const: 8
|
|
|
|
DW_AT_type DW_FORM_ref4
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
4 DW_TAG_variable \[no children\]
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT_decl_file DW_FORM_implicit_const: 1
|
|
|
|
DW_AT_decl_line DW_FORM_data1
|
|
|
|
DW_AT_type DW_FORM_ref4
|
|
|
|
DW_AT_external DW_FORM_flag_present
|
|
|
|
DW_AT_location DW_FORM_exprloc
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
5 DW_TAG_formal_parameter \[no children\]
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT_decl_file DW_FORM_implicit_const: 1
|
|
|
|
DW_AT_decl_line DW_FORM_implicit_const: 6
|
|
|
|
DW_AT_type DW_FORM_ref4
|
|
|
|
DW_AT_location DW_FORM_sec_offset
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
6 DW_TAG_compile_unit \[has children\]
|
|
|
|
DW_AT_producer DW_FORM_strp
|
|
|
|
DW_AT_language DW_FORM_data1
|
|
|
|
DW_AT_name DW_FORM_line_strp
|
|
|
|
DW_AT_comp_dir DW_FORM_line_strp
|
|
|
|
DW_AT_ranges DW_FORM_sec_offset
|
|
|
|
DW_AT_low_pc DW_FORM_addr
|
|
|
|
DW_AT_stmt_list DW_FORM_sec_offset
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
7 DW_TAG_base_type \[no children\]
|
|
|
|
DW_AT_byte_size DW_FORM_data1
|
|
|
|
DW_AT_encoding DW_FORM_data1
|
|
|
|
DW_AT_name DW_FORM_string
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
8 DW_TAG_variable \[no children\]
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT_decl_file DW_FORM_data1
|
|
|
|
DW_AT_decl_line DW_FORM_data2
|
|
|
|
DW_AT_type DW_FORM_ref4
|
|
|
|
DW_AT_external DW_FORM_flag_present
|
|
|
|
DW_AT_declaration DW_FORM_flag_present
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
9 DW_TAG_subprogram \[has children\]
|
|
|
|
DW_AT_external DW_FORM_flag_present
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT_decl_file DW_FORM_data1
|
|
|
|
DW_AT_decl_line DW_FORM_data1
|
|
|
|
DW_AT_prototyped DW_FORM_flag_present
|
|
|
|
DW_AT_type DW_FORM_ref4
|
|
|
|
DW_AT_low_pc DW_FORM_addr
|
|
|
|
DW_AT_high_pc DW_FORM_data8
|
|
|
|
DW_AT_frame_base DW_FORM_exprloc
|
|
|
|
DW_AT_call_all_calls DW_FORM_flag_present
|
|
|
|
DW_AT_sibling DW_FORM_ref4
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
10 DW_TAG_call_site \[has children\]
|
|
|
|
DW_AT_call_return_pc DW_FORM_addr
|
|
|
|
DW_AT_call_origin DW_FORM_ref4
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
11 DW_TAG_call_site_parameter \[no children\]
|
|
|
|
DW_AT_location DW_FORM_exprloc
|
|
|
|
DW_AT_call_value DW_FORM_exprloc
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
12 DW_TAG_subprogram \[no children\]
|
|
|
|
DW_AT_external DW_FORM_flag_present
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT_decl_file DW_FORM_data1
|
|
|
|
DW_AT_decl_line DW_FORM_data1
|
|
|
|
DW_AT_prototyped DW_FORM_flag_present
|
|
|
|
DW_AT_low_pc DW_FORM_addr
|
|
|
|
DW_AT_high_pc DW_FORM_data8
|
|
|
|
DW_AT_frame_base DW_FORM_exprloc
|
|
|
|
DW_AT_call_all_calls DW_FORM_flag_present
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
13 DW_TAG_subprogram \[no children\]
|
|
|
|
DW_AT_external DW_FORM_flag_present
|
|
|
|
DW_AT_declaration DW_FORM_flag_present
|
|
|
|
DW_AT_linkage_name DW_FORM_strp
|
|
|
|
DW_AT_name DW_FORM_strp
|
|
|
|
DW_AT_decl_file DW_FORM_data1
|
|
|
|
DW_AT_decl_line DW_FORM_data2
|
|
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
#...
|
|
|
|
Contents of the .debug_loclists section:
|
|
|
|
#...
|
|
|
|
Offset Begin End Expression
|
|
|
|
0000000c 0000000000001234 \(base address\)
|
|
|
|
00000015 0000000000001234 0000000000001236 \(DW_OP_reg5 \([^()]*\)\)
|
|
|
|
0000001a 0000000000001236 0000000000001239 \(DW_OP_entry_value: \(DW_OP_reg5 \([^()]*\)\); DW_OP_stack_value\)
|
|
|
|
00000022 <End of list>
|
|
|
|
00000023 0000000000001234 \(base address\)
|
|
|
|
0000002c 0000000000001234 0000000000001236 \(DW_OP_reg4 \([^()]*\)\)
|
|
|
|
00000031 0000000000001236 0000000000001239 \(DW_OP_entry_value: \(DW_OP_reg4 \([^()]*\)\); DW_OP_stack_value\)
|
|
|
|
00000039 <End of list>
|
|
|
|
|
|
|
|
Contents of the .debug_rnglists section:
|
|
|
|
|
|
|
|
Offset Begin End
|
|
|
|
0000000c 0000000000001234 0000000000001236
|
|
|
|
00000016 0000000000001234 0000000000001239
|
|
|
|
00000020 <End of list>
|
|
|
|
|
|
|
|
Raw dump of debug contents of section .debug_line:
|
|
|
|
|
|
|
|
Offset: 0x0
|
|
|
|
Length: 144
|
|
|
|
DWARF Version: 5
|
2020-03-11 18:17:14 +08:00
|
|
|
Address size \(bytes\): 8
|
|
|
|
Segment selector \(bytes\): 0
|
2017-02-24 05:54:02 +08:00
|
|
|
Prologue Length: 60
|
|
|
|
Minimum Instruction Length: 1
|
|
|
|
Maximum Ops per Instruction: 1
|
|
|
|
Initial value of 'is_stmt': 1
|
|
|
|
Line Base: -10
|
|
|
|
Line Range: 242
|
|
|
|
Opcode Base: 13
|
|
|
|
|
|
|
|
Opcodes:
|
|
|
|
Opcode 1 has 0 args
|
readelf ngettext fixes
This patch is a first pass at fixing readelf message pluralization.
I've deliberately not fixed the "out of memory" errors since it's very
unlikely that they will ever be complaining about not being able to
allocate for a single entry, and a few others where the size is very
unlikely to be 1 byte.
Then there are messages like this one:
"Out of %lu items there are %zu bucket clashes (longest of %zu entries).\n"
I suppose this could be split into three parts, "Of %lu items ",
"there are %zu bucket clashes ", and "(longest of %zu entries).\n",
each part being printed separately, but that might not be ideal for
sentence construction in other languages. For now I'm punting on this
one.
Changes to readelf output require lots of testsuite adjustment..
binutils/
* dwarf.c (read_uleb128): Properly pluralize messages.
(display_debug_lines_raw, display_debug_loc): Likewise.
(display_debug_names, process_cu_tu_index): Likewise.
* od-macho.c (dump_code_signature_superblob): Likewise.
* readelf.c (process_program_headers): Likewise.
(process_section_header, process_relocs): Likewise.
(hppa_process_unwind, arm_process_unwind): Likewise.
(process_dynamic_section, process_version_sections): Likewise.
(process_symbol_table, process_syminfo): Likewise.
(apply_relocations, process_mips_specific): Likewise.
(process_gnu_liblist, process_notes_at): Likewise.
(process_archive): Likewise.
* testsuite/binutils-all/dw2-1.W,
* testsuite/binutils-all/dw2-3.W,
* testsuite/binutils-all/dw2-3gabi.W,
* testsuite/binutils-all/dw5.S,
* testsuite/binutils-all/dw5.W,
* testsuite/binutils-all/i386/compressed-1a.d,
* testsuite/binutils-all/libdw2-compressedgabi.out,
* testsuite/binutils-all/objdump.W,
* testsuite/binutils-all/readelf.r,
* testsuite/binutils-all/readelf.r-64,
* testsuite/binutils-all/x86-64/compressed-1a.d: Update
for pluralization fixes.
gas/
* testsuite/gas/arm/got_prel.d,
* testsuite/gas/elf/dwarf2-1.d,
* testsuite/gas/elf/dwarf2-2.d,
* testsuite/gas/elf/dwarf2-3.d,
* testsuite/gas/elf/dwarf2-5.d,
* testsuite/gas/elf/dwarf2-6.d,
* testsuite/gas/i386/debug1.d,
* testsuite/gas/i386/dw2-compress-1.d,
* testsuite/gas/i386/dw2-compress-3a.d,
* testsuite/gas/i386/dw2-compress-3b.d,
* testsuite/gas/i386/dw2-compressed-1.d,
* testsuite/gas/i386/dw2-compressed-3a.d,
* testsuite/gas/i386/dw2-compressed-3b.d,
* testsuite/gas/i386/ilp32/x86-64-localpic.d,
* testsuite/gas/i386/localpic.d,
* testsuite/gas/i386/x86-64-localpic.d,
* testsuite/gas/ia64/pr13167.d,
* testsuite/gas/mips/loc-swap-2.d,
* testsuite/gas/mips/loc-swap.d,
* testsuite/gas/mips/micromips@loc-swap-2.d,
* testsuite/gas/mips/micromips@loc-swap.d,
* testsuite/gas/mips/mips16-dwarf2-n32.d,
* testsuite/gas/mips/mips16-dwarf2.d,
* testsuite/gas/mips/mips16@loc-swap-2.d,
* testsuite/gas/mips/mips16@loc-swap.d,
* testsuite/gas/mips/mips16e@loc-swap.d,
* testsuite/gas/mmix/bspec-1.d,
* testsuite/gas/mmix/bspec-2.d,
* testsuite/gas/tic6x/unwind-1.d,
* testsuite/gas/tic6x/unwind-2.d,
* testsuite/gas/tic6x/unwind-3.d: Update for pluralization
fixes.
ld/
* testsuite/ld-aarch64/ifunc-13.d,
* testsuite/ld-aarch64/ifunc-15.d,
* testsuite/ld-aarch64/ifunc-20.d,
* testsuite/ld-alpha/tlsbin.rd,
* testsuite/ld-alpha/tlspic.rd,
* testsuite/ld-arm/ifunc-3.rd,
* testsuite/ld-arm/ifunc-9.rd,
* testsuite/ld-arm/unwind-mix.d,
* testsuite/ld-arm/unwind-rel.d,
* testsuite/ld-cris/hiddef1.d,
* testsuite/ld-cris/libdso-13.d,
* testsuite/ld-cris/libdso-2.d,
* testsuite/ld-cris/pr16044.d,
* testsuite/ld-cris/tls-local-63.d,
* testsuite/ld-cris/tls-local-64.d,
* testsuite/ld-cris/tls-und-38.d,
* testsuite/ld-cris/tls-und-42.d,
* testsuite/ld-cris/tls-und-46.d,
* testsuite/ld-cris/tls-und-50.d,
* testsuite/ld-cris/weakref3.d,
* testsuite/ld-cris/weakref4.d,
* testsuite/ld-elf/comm-data2r.rd,
* testsuite/ld-elf/discard1.d,
* testsuite/ld-elf/discard2.d,
* testsuite/ld-elf/pr19539.d,
* testsuite/ld-elf/pr22374-1.r,
* testsuite/ld-elf/pr22374-2.r,
* testsuite/ld-i386/combreloc.d,
* testsuite/ld-i386/emit-relocs-nacl.rd,
* testsuite/ld-i386/emit-relocs.rd,
* testsuite/ld-i386/pr13302.d,
* testsuite/ld-i386/pr17709-nacl.rd,
* testsuite/ld-i386/pr17709.rd,
* testsuite/ld-i386/pr19539.d,
* testsuite/ld-i386/pr19615.d,
* testsuite/ld-i386/pr19636-1a.d,
* testsuite/ld-i386/pr19636-1e.d,
* testsuite/ld-i386/pr19636-1f.d,
* testsuite/ld-i386/pr19636-2a.d,
* testsuite/ld-i386/pr19636-2b.d,
* testsuite/ld-i386/pr19636-2d-nacl.d,
* testsuite/ld-i386/pr19636-2e-nacl.d,
* testsuite/ld-i386/pr19636-3a.d,
* testsuite/ld-i386/pr19636-3d.d,
* testsuite/ld-i386/pr19636-3e.d,
* testsuite/ld-i386/pr19636-4a.d,
* testsuite/ld-i386/pr19645.d,
* testsuite/ld-i386/pr19827-nacl.rd,
* testsuite/ld-i386/pr19827.rd,
* testsuite/ld-i386/pr20253-4a.d,
* testsuite/ld-i386/pr20253-4b.d,
* testsuite/ld-i386/pr20253-5.d,
* testsuite/ld-i386/tlsbin-nacl.rd,
* testsuite/ld-i386/tlsbin.rd,
* testsuite/ld-i386/tlspic-nacl.rd,
* testsuite/ld-i386/tlspic.rd,
* testsuite/ld-i386/undefweakb.d,
* testsuite/ld-ia64/tlsbin.rd,
* testsuite/ld-ia64/tlspic.rd,
* testsuite/ld-ifunc/ifunc-13-i386.d,
* testsuite/ld-ifunc/ifunc-13-x86-64.d,
* testsuite/ld-ifunc/ifunc-15-i386.d,
* testsuite/ld-ifunc/ifunc-15-x86-64.d,
* testsuite/ld-ifunc/ifunc-20-i386.d,
* testsuite/ld-ifunc/ifunc-20-x86-64.d,
* testsuite/ld-ifunc/ifunc-23a-x86.d,
* testsuite/ld-ifunc/ifunc-23b-x86.d,
* testsuite/ld-ifunc/ifunc-23c-x86.d,
* testsuite/ld-ifunc/ifunc-24a-x86.d,
* testsuite/ld-ifunc/ifunc-24b-x86.d,
* testsuite/ld-ifunc/ifunc-24c-x86.d,
* testsuite/ld-ifunc/ifunc-25a-x86.d,
* testsuite/ld-ifunc/ifunc-25b-x86.d,
* testsuite/ld-ifunc/ifunc-25c-x86.d,
* testsuite/ld-m68k/got-1.d,
* testsuite/ld-mips-elf/vxworks1.rd,
* testsuite/ld-powerpc/ambiguousv1.d,
* testsuite/ld-powerpc/ambiguousv1b.d,
* testsuite/ld-powerpc/ambiguousv2.d,
* testsuite/ld-powerpc/ambiguousv2b.d,
* testsuite/ld-powerpc/tlsexe.r,
* testsuite/ld-powerpc/tlsexe32.r,
* testsuite/ld-powerpc/tlsexetoc.r,
* testsuite/ld-powerpc/tlsso.r,
* testsuite/ld-powerpc/tlsso32.r,
* testsuite/ld-powerpc/tlstocso.r,
* testsuite/ld-powerpc/vle-multiseg-1.d,
* testsuite/ld-powerpc/vle-multiseg-2.d,
* testsuite/ld-powerpc/vle-multiseg-3.d,
* testsuite/ld-s390/tlsbin.rd,
* testsuite/ld-s390/tlsbin_64.rd,
* testsuite/ld-s390/tlspic.rd,
* testsuite/ld-s390/tlspic_64.rd,
* testsuite/ld-sh/ld-r-1.d,
* testsuite/ld-sh/sh64/gotplt.d,
* testsuite/ld-sh/shared-1.d,
* testsuite/ld-sh/tlsbin-2.d,
* testsuite/ld-sh/tlspic-2.d,
* testsuite/ld-sparc/gotop32.rd,
* testsuite/ld-sparc/gotop64.rd,
* testsuite/ld-sparc/tlssunpic32.rd,
* testsuite/ld-sparc/tlssunpic64.rd,
* testsuite/ld-sparc/vxworks1-lib.rd,
* testsuite/ld-tic6x/shlib-app-1.rd,
* testsuite/ld-tic6x/shlib-app-1b.rd,
* testsuite/ld-tic6x/shlib-app-1r.rd,
* testsuite/ld-tic6x/shlib-app-1rb.rd,
* testsuite/ld-tic6x/shlib-noindex.rd,
* testsuite/ld-vax-elf/export-class-data.rd,
* testsuite/ld-x86-64/pr13082-1a.d,
* testsuite/ld-x86-64/pr13082-1b.d,
* testsuite/ld-x86-64/pr13082-2a.d,
* testsuite/ld-x86-64/pr13082-2b.d,
* testsuite/ld-x86-64/pr13082-3a.d,
* testsuite/ld-x86-64/pr13082-3c.d,
* testsuite/ld-x86-64/pr13082-4a.d,
* testsuite/ld-x86-64/pr13082-5a.d,
* testsuite/ld-x86-64/pr13082-5b.d,
* testsuite/ld-x86-64/pr13082-6a.d,
* testsuite/ld-x86-64/pr13082-6b.d,
* testsuite/ld-x86-64/pr17709-nacl.rd,
* testsuite/ld-x86-64/pr17709.rd,
* testsuite/ld-x86-64/pr19539a.d,
* testsuite/ld-x86-64/pr19539b.d,
* testsuite/ld-x86-64/pr19615.d,
* testsuite/ld-x86-64/pr19636-1a.d,
* testsuite/ld-x86-64/pr19636-1d.d,
* testsuite/ld-x86-64/pr19636-1e.d,
* testsuite/ld-x86-64/pr19636-2a.d,
* testsuite/ld-x86-64/pr19636-2e.d,
* testsuite/ld-x86-64/pr19636-2f.d,
* testsuite/ld-x86-64/pr19636-3a.d,
* testsuite/ld-x86-64/pr19645.d,
* testsuite/ld-x86-64/pr19807-2b.d,
* testsuite/ld-x86-64/pr19807-2d.d,
* testsuite/ld-x86-64/pr19827-nacl.rd,
* testsuite/ld-x86-64/pr19827.rd,
* testsuite/ld-x86-64/pr20253-4a.d,
* testsuite/ld-x86-64/pr20253-4b.d,
* testsuite/ld-x86-64/pr20253-4d.d,
* testsuite/ld-x86-64/pr20253-4e.d,
* testsuite/ld-x86-64/pr20253-5a.d,
* testsuite/ld-x86-64/pr20253-5b.d,
* testsuite/ld-x86-64/tlsbin-nacl.rd,
* testsuite/ld-x86-64/tlsbin.rd,
* testsuite/ld-x86-64/tlspic-nacl.rd,
* testsuite/ld-x86-64/tlspic.rd,
* testsuite/ld-x86-64/tlspic2-nacl.rd: Update for
pluralization fixes.
2017-11-07 08:48:29 +08:00
|
|
|
Opcode 2 has 1 arg
|
|
|
|
Opcode 3 has 1 arg
|
|
|
|
Opcode 4 has 1 arg
|
|
|
|
Opcode 5 has 1 arg
|
2017-02-24 05:54:02 +08:00
|
|
|
Opcode 6 has 0 args
|
|
|
|
Opcode 7 has 0 args
|
|
|
|
Opcode 8 has 0 args
|
readelf ngettext fixes
This patch is a first pass at fixing readelf message pluralization.
I've deliberately not fixed the "out of memory" errors since it's very
unlikely that they will ever be complaining about not being able to
allocate for a single entry, and a few others where the size is very
unlikely to be 1 byte.
Then there are messages like this one:
"Out of %lu items there are %zu bucket clashes (longest of %zu entries).\n"
I suppose this could be split into three parts, "Of %lu items ",
"there are %zu bucket clashes ", and "(longest of %zu entries).\n",
each part being printed separately, but that might not be ideal for
sentence construction in other languages. For now I'm punting on this
one.
Changes to readelf output require lots of testsuite adjustment..
binutils/
* dwarf.c (read_uleb128): Properly pluralize messages.
(display_debug_lines_raw, display_debug_loc): Likewise.
(display_debug_names, process_cu_tu_index): Likewise.
* od-macho.c (dump_code_signature_superblob): Likewise.
* readelf.c (process_program_headers): Likewise.
(process_section_header, process_relocs): Likewise.
(hppa_process_unwind, arm_process_unwind): Likewise.
(process_dynamic_section, process_version_sections): Likewise.
(process_symbol_table, process_syminfo): Likewise.
(apply_relocations, process_mips_specific): Likewise.
(process_gnu_liblist, process_notes_at): Likewise.
(process_archive): Likewise.
* testsuite/binutils-all/dw2-1.W,
* testsuite/binutils-all/dw2-3.W,
* testsuite/binutils-all/dw2-3gabi.W,
* testsuite/binutils-all/dw5.S,
* testsuite/binutils-all/dw5.W,
* testsuite/binutils-all/i386/compressed-1a.d,
* testsuite/binutils-all/libdw2-compressedgabi.out,
* testsuite/binutils-all/objdump.W,
* testsuite/binutils-all/readelf.r,
* testsuite/binutils-all/readelf.r-64,
* testsuite/binutils-all/x86-64/compressed-1a.d: Update
for pluralization fixes.
gas/
* testsuite/gas/arm/got_prel.d,
* testsuite/gas/elf/dwarf2-1.d,
* testsuite/gas/elf/dwarf2-2.d,
* testsuite/gas/elf/dwarf2-3.d,
* testsuite/gas/elf/dwarf2-5.d,
* testsuite/gas/elf/dwarf2-6.d,
* testsuite/gas/i386/debug1.d,
* testsuite/gas/i386/dw2-compress-1.d,
* testsuite/gas/i386/dw2-compress-3a.d,
* testsuite/gas/i386/dw2-compress-3b.d,
* testsuite/gas/i386/dw2-compressed-1.d,
* testsuite/gas/i386/dw2-compressed-3a.d,
* testsuite/gas/i386/dw2-compressed-3b.d,
* testsuite/gas/i386/ilp32/x86-64-localpic.d,
* testsuite/gas/i386/localpic.d,
* testsuite/gas/i386/x86-64-localpic.d,
* testsuite/gas/ia64/pr13167.d,
* testsuite/gas/mips/loc-swap-2.d,
* testsuite/gas/mips/loc-swap.d,
* testsuite/gas/mips/micromips@loc-swap-2.d,
* testsuite/gas/mips/micromips@loc-swap.d,
* testsuite/gas/mips/mips16-dwarf2-n32.d,
* testsuite/gas/mips/mips16-dwarf2.d,
* testsuite/gas/mips/mips16@loc-swap-2.d,
* testsuite/gas/mips/mips16@loc-swap.d,
* testsuite/gas/mips/mips16e@loc-swap.d,
* testsuite/gas/mmix/bspec-1.d,
* testsuite/gas/mmix/bspec-2.d,
* testsuite/gas/tic6x/unwind-1.d,
* testsuite/gas/tic6x/unwind-2.d,
* testsuite/gas/tic6x/unwind-3.d: Update for pluralization
fixes.
ld/
* testsuite/ld-aarch64/ifunc-13.d,
* testsuite/ld-aarch64/ifunc-15.d,
* testsuite/ld-aarch64/ifunc-20.d,
* testsuite/ld-alpha/tlsbin.rd,
* testsuite/ld-alpha/tlspic.rd,
* testsuite/ld-arm/ifunc-3.rd,
* testsuite/ld-arm/ifunc-9.rd,
* testsuite/ld-arm/unwind-mix.d,
* testsuite/ld-arm/unwind-rel.d,
* testsuite/ld-cris/hiddef1.d,
* testsuite/ld-cris/libdso-13.d,
* testsuite/ld-cris/libdso-2.d,
* testsuite/ld-cris/pr16044.d,
* testsuite/ld-cris/tls-local-63.d,
* testsuite/ld-cris/tls-local-64.d,
* testsuite/ld-cris/tls-und-38.d,
* testsuite/ld-cris/tls-und-42.d,
* testsuite/ld-cris/tls-und-46.d,
* testsuite/ld-cris/tls-und-50.d,
* testsuite/ld-cris/weakref3.d,
* testsuite/ld-cris/weakref4.d,
* testsuite/ld-elf/comm-data2r.rd,
* testsuite/ld-elf/discard1.d,
* testsuite/ld-elf/discard2.d,
* testsuite/ld-elf/pr19539.d,
* testsuite/ld-elf/pr22374-1.r,
* testsuite/ld-elf/pr22374-2.r,
* testsuite/ld-i386/combreloc.d,
* testsuite/ld-i386/emit-relocs-nacl.rd,
* testsuite/ld-i386/emit-relocs.rd,
* testsuite/ld-i386/pr13302.d,
* testsuite/ld-i386/pr17709-nacl.rd,
* testsuite/ld-i386/pr17709.rd,
* testsuite/ld-i386/pr19539.d,
* testsuite/ld-i386/pr19615.d,
* testsuite/ld-i386/pr19636-1a.d,
* testsuite/ld-i386/pr19636-1e.d,
* testsuite/ld-i386/pr19636-1f.d,
* testsuite/ld-i386/pr19636-2a.d,
* testsuite/ld-i386/pr19636-2b.d,
* testsuite/ld-i386/pr19636-2d-nacl.d,
* testsuite/ld-i386/pr19636-2e-nacl.d,
* testsuite/ld-i386/pr19636-3a.d,
* testsuite/ld-i386/pr19636-3d.d,
* testsuite/ld-i386/pr19636-3e.d,
* testsuite/ld-i386/pr19636-4a.d,
* testsuite/ld-i386/pr19645.d,
* testsuite/ld-i386/pr19827-nacl.rd,
* testsuite/ld-i386/pr19827.rd,
* testsuite/ld-i386/pr20253-4a.d,
* testsuite/ld-i386/pr20253-4b.d,
* testsuite/ld-i386/pr20253-5.d,
* testsuite/ld-i386/tlsbin-nacl.rd,
* testsuite/ld-i386/tlsbin.rd,
* testsuite/ld-i386/tlspic-nacl.rd,
* testsuite/ld-i386/tlspic.rd,
* testsuite/ld-i386/undefweakb.d,
* testsuite/ld-ia64/tlsbin.rd,
* testsuite/ld-ia64/tlspic.rd,
* testsuite/ld-ifunc/ifunc-13-i386.d,
* testsuite/ld-ifunc/ifunc-13-x86-64.d,
* testsuite/ld-ifunc/ifunc-15-i386.d,
* testsuite/ld-ifunc/ifunc-15-x86-64.d,
* testsuite/ld-ifunc/ifunc-20-i386.d,
* testsuite/ld-ifunc/ifunc-20-x86-64.d,
* testsuite/ld-ifunc/ifunc-23a-x86.d,
* testsuite/ld-ifunc/ifunc-23b-x86.d,
* testsuite/ld-ifunc/ifunc-23c-x86.d,
* testsuite/ld-ifunc/ifunc-24a-x86.d,
* testsuite/ld-ifunc/ifunc-24b-x86.d,
* testsuite/ld-ifunc/ifunc-24c-x86.d,
* testsuite/ld-ifunc/ifunc-25a-x86.d,
* testsuite/ld-ifunc/ifunc-25b-x86.d,
* testsuite/ld-ifunc/ifunc-25c-x86.d,
* testsuite/ld-m68k/got-1.d,
* testsuite/ld-mips-elf/vxworks1.rd,
* testsuite/ld-powerpc/ambiguousv1.d,
* testsuite/ld-powerpc/ambiguousv1b.d,
* testsuite/ld-powerpc/ambiguousv2.d,
* testsuite/ld-powerpc/ambiguousv2b.d,
* testsuite/ld-powerpc/tlsexe.r,
* testsuite/ld-powerpc/tlsexe32.r,
* testsuite/ld-powerpc/tlsexetoc.r,
* testsuite/ld-powerpc/tlsso.r,
* testsuite/ld-powerpc/tlsso32.r,
* testsuite/ld-powerpc/tlstocso.r,
* testsuite/ld-powerpc/vle-multiseg-1.d,
* testsuite/ld-powerpc/vle-multiseg-2.d,
* testsuite/ld-powerpc/vle-multiseg-3.d,
* testsuite/ld-s390/tlsbin.rd,
* testsuite/ld-s390/tlsbin_64.rd,
* testsuite/ld-s390/tlspic.rd,
* testsuite/ld-s390/tlspic_64.rd,
* testsuite/ld-sh/ld-r-1.d,
* testsuite/ld-sh/sh64/gotplt.d,
* testsuite/ld-sh/shared-1.d,
* testsuite/ld-sh/tlsbin-2.d,
* testsuite/ld-sh/tlspic-2.d,
* testsuite/ld-sparc/gotop32.rd,
* testsuite/ld-sparc/gotop64.rd,
* testsuite/ld-sparc/tlssunpic32.rd,
* testsuite/ld-sparc/tlssunpic64.rd,
* testsuite/ld-sparc/vxworks1-lib.rd,
* testsuite/ld-tic6x/shlib-app-1.rd,
* testsuite/ld-tic6x/shlib-app-1b.rd,
* testsuite/ld-tic6x/shlib-app-1r.rd,
* testsuite/ld-tic6x/shlib-app-1rb.rd,
* testsuite/ld-tic6x/shlib-noindex.rd,
* testsuite/ld-vax-elf/export-class-data.rd,
* testsuite/ld-x86-64/pr13082-1a.d,
* testsuite/ld-x86-64/pr13082-1b.d,
* testsuite/ld-x86-64/pr13082-2a.d,
* testsuite/ld-x86-64/pr13082-2b.d,
* testsuite/ld-x86-64/pr13082-3a.d,
* testsuite/ld-x86-64/pr13082-3c.d,
* testsuite/ld-x86-64/pr13082-4a.d,
* testsuite/ld-x86-64/pr13082-5a.d,
* testsuite/ld-x86-64/pr13082-5b.d,
* testsuite/ld-x86-64/pr13082-6a.d,
* testsuite/ld-x86-64/pr13082-6b.d,
* testsuite/ld-x86-64/pr17709-nacl.rd,
* testsuite/ld-x86-64/pr17709.rd,
* testsuite/ld-x86-64/pr19539a.d,
* testsuite/ld-x86-64/pr19539b.d,
* testsuite/ld-x86-64/pr19615.d,
* testsuite/ld-x86-64/pr19636-1a.d,
* testsuite/ld-x86-64/pr19636-1d.d,
* testsuite/ld-x86-64/pr19636-1e.d,
* testsuite/ld-x86-64/pr19636-2a.d,
* testsuite/ld-x86-64/pr19636-2e.d,
* testsuite/ld-x86-64/pr19636-2f.d,
* testsuite/ld-x86-64/pr19636-3a.d,
* testsuite/ld-x86-64/pr19645.d,
* testsuite/ld-x86-64/pr19807-2b.d,
* testsuite/ld-x86-64/pr19807-2d.d,
* testsuite/ld-x86-64/pr19827-nacl.rd,
* testsuite/ld-x86-64/pr19827.rd,
* testsuite/ld-x86-64/pr20253-4a.d,
* testsuite/ld-x86-64/pr20253-4b.d,
* testsuite/ld-x86-64/pr20253-4d.d,
* testsuite/ld-x86-64/pr20253-4e.d,
* testsuite/ld-x86-64/pr20253-5a.d,
* testsuite/ld-x86-64/pr20253-5b.d,
* testsuite/ld-x86-64/tlsbin-nacl.rd,
* testsuite/ld-x86-64/tlsbin.rd,
* testsuite/ld-x86-64/tlspic-nacl.rd,
* testsuite/ld-x86-64/tlspic.rd,
* testsuite/ld-x86-64/tlspic2-nacl.rd: Update for
pluralization fixes.
2017-11-07 08:48:29 +08:00
|
|
|
Opcode 9 has 1 arg
|
2017-02-24 05:54:02 +08:00
|
|
|
Opcode 10 has 0 args
|
|
|
|
Opcode 11 has 0 args
|
readelf ngettext fixes
This patch is a first pass at fixing readelf message pluralization.
I've deliberately not fixed the "out of memory" errors since it's very
unlikely that they will ever be complaining about not being able to
allocate for a single entry, and a few others where the size is very
unlikely to be 1 byte.
Then there are messages like this one:
"Out of %lu items there are %zu bucket clashes (longest of %zu entries).\n"
I suppose this could be split into three parts, "Of %lu items ",
"there are %zu bucket clashes ", and "(longest of %zu entries).\n",
each part being printed separately, but that might not be ideal for
sentence construction in other languages. For now I'm punting on this
one.
Changes to readelf output require lots of testsuite adjustment..
binutils/
* dwarf.c (read_uleb128): Properly pluralize messages.
(display_debug_lines_raw, display_debug_loc): Likewise.
(display_debug_names, process_cu_tu_index): Likewise.
* od-macho.c (dump_code_signature_superblob): Likewise.
* readelf.c (process_program_headers): Likewise.
(process_section_header, process_relocs): Likewise.
(hppa_process_unwind, arm_process_unwind): Likewise.
(process_dynamic_section, process_version_sections): Likewise.
(process_symbol_table, process_syminfo): Likewise.
(apply_relocations, process_mips_specific): Likewise.
(process_gnu_liblist, process_notes_at): Likewise.
(process_archive): Likewise.
* testsuite/binutils-all/dw2-1.W,
* testsuite/binutils-all/dw2-3.W,
* testsuite/binutils-all/dw2-3gabi.W,
* testsuite/binutils-all/dw5.S,
* testsuite/binutils-all/dw5.W,
* testsuite/binutils-all/i386/compressed-1a.d,
* testsuite/binutils-all/libdw2-compressedgabi.out,
* testsuite/binutils-all/objdump.W,
* testsuite/binutils-all/readelf.r,
* testsuite/binutils-all/readelf.r-64,
* testsuite/binutils-all/x86-64/compressed-1a.d: Update
for pluralization fixes.
gas/
* testsuite/gas/arm/got_prel.d,
* testsuite/gas/elf/dwarf2-1.d,
* testsuite/gas/elf/dwarf2-2.d,
* testsuite/gas/elf/dwarf2-3.d,
* testsuite/gas/elf/dwarf2-5.d,
* testsuite/gas/elf/dwarf2-6.d,
* testsuite/gas/i386/debug1.d,
* testsuite/gas/i386/dw2-compress-1.d,
* testsuite/gas/i386/dw2-compress-3a.d,
* testsuite/gas/i386/dw2-compress-3b.d,
* testsuite/gas/i386/dw2-compressed-1.d,
* testsuite/gas/i386/dw2-compressed-3a.d,
* testsuite/gas/i386/dw2-compressed-3b.d,
* testsuite/gas/i386/ilp32/x86-64-localpic.d,
* testsuite/gas/i386/localpic.d,
* testsuite/gas/i386/x86-64-localpic.d,
* testsuite/gas/ia64/pr13167.d,
* testsuite/gas/mips/loc-swap-2.d,
* testsuite/gas/mips/loc-swap.d,
* testsuite/gas/mips/micromips@loc-swap-2.d,
* testsuite/gas/mips/micromips@loc-swap.d,
* testsuite/gas/mips/mips16-dwarf2-n32.d,
* testsuite/gas/mips/mips16-dwarf2.d,
* testsuite/gas/mips/mips16@loc-swap-2.d,
* testsuite/gas/mips/mips16@loc-swap.d,
* testsuite/gas/mips/mips16e@loc-swap.d,
* testsuite/gas/mmix/bspec-1.d,
* testsuite/gas/mmix/bspec-2.d,
* testsuite/gas/tic6x/unwind-1.d,
* testsuite/gas/tic6x/unwind-2.d,
* testsuite/gas/tic6x/unwind-3.d: Update for pluralization
fixes.
ld/
* testsuite/ld-aarch64/ifunc-13.d,
* testsuite/ld-aarch64/ifunc-15.d,
* testsuite/ld-aarch64/ifunc-20.d,
* testsuite/ld-alpha/tlsbin.rd,
* testsuite/ld-alpha/tlspic.rd,
* testsuite/ld-arm/ifunc-3.rd,
* testsuite/ld-arm/ifunc-9.rd,
* testsuite/ld-arm/unwind-mix.d,
* testsuite/ld-arm/unwind-rel.d,
* testsuite/ld-cris/hiddef1.d,
* testsuite/ld-cris/libdso-13.d,
* testsuite/ld-cris/libdso-2.d,
* testsuite/ld-cris/pr16044.d,
* testsuite/ld-cris/tls-local-63.d,
* testsuite/ld-cris/tls-local-64.d,
* testsuite/ld-cris/tls-und-38.d,
* testsuite/ld-cris/tls-und-42.d,
* testsuite/ld-cris/tls-und-46.d,
* testsuite/ld-cris/tls-und-50.d,
* testsuite/ld-cris/weakref3.d,
* testsuite/ld-cris/weakref4.d,
* testsuite/ld-elf/comm-data2r.rd,
* testsuite/ld-elf/discard1.d,
* testsuite/ld-elf/discard2.d,
* testsuite/ld-elf/pr19539.d,
* testsuite/ld-elf/pr22374-1.r,
* testsuite/ld-elf/pr22374-2.r,
* testsuite/ld-i386/combreloc.d,
* testsuite/ld-i386/emit-relocs-nacl.rd,
* testsuite/ld-i386/emit-relocs.rd,
* testsuite/ld-i386/pr13302.d,
* testsuite/ld-i386/pr17709-nacl.rd,
* testsuite/ld-i386/pr17709.rd,
* testsuite/ld-i386/pr19539.d,
* testsuite/ld-i386/pr19615.d,
* testsuite/ld-i386/pr19636-1a.d,
* testsuite/ld-i386/pr19636-1e.d,
* testsuite/ld-i386/pr19636-1f.d,
* testsuite/ld-i386/pr19636-2a.d,
* testsuite/ld-i386/pr19636-2b.d,
* testsuite/ld-i386/pr19636-2d-nacl.d,
* testsuite/ld-i386/pr19636-2e-nacl.d,
* testsuite/ld-i386/pr19636-3a.d,
* testsuite/ld-i386/pr19636-3d.d,
* testsuite/ld-i386/pr19636-3e.d,
* testsuite/ld-i386/pr19636-4a.d,
* testsuite/ld-i386/pr19645.d,
* testsuite/ld-i386/pr19827-nacl.rd,
* testsuite/ld-i386/pr19827.rd,
* testsuite/ld-i386/pr20253-4a.d,
* testsuite/ld-i386/pr20253-4b.d,
* testsuite/ld-i386/pr20253-5.d,
* testsuite/ld-i386/tlsbin-nacl.rd,
* testsuite/ld-i386/tlsbin.rd,
* testsuite/ld-i386/tlspic-nacl.rd,
* testsuite/ld-i386/tlspic.rd,
* testsuite/ld-i386/undefweakb.d,
* testsuite/ld-ia64/tlsbin.rd,
* testsuite/ld-ia64/tlspic.rd,
* testsuite/ld-ifunc/ifunc-13-i386.d,
* testsuite/ld-ifunc/ifunc-13-x86-64.d,
* testsuite/ld-ifunc/ifunc-15-i386.d,
* testsuite/ld-ifunc/ifunc-15-x86-64.d,
* testsuite/ld-ifunc/ifunc-20-i386.d,
* testsuite/ld-ifunc/ifunc-20-x86-64.d,
* testsuite/ld-ifunc/ifunc-23a-x86.d,
* testsuite/ld-ifunc/ifunc-23b-x86.d,
* testsuite/ld-ifunc/ifunc-23c-x86.d,
* testsuite/ld-ifunc/ifunc-24a-x86.d,
* testsuite/ld-ifunc/ifunc-24b-x86.d,
* testsuite/ld-ifunc/ifunc-24c-x86.d,
* testsuite/ld-ifunc/ifunc-25a-x86.d,
* testsuite/ld-ifunc/ifunc-25b-x86.d,
* testsuite/ld-ifunc/ifunc-25c-x86.d,
* testsuite/ld-m68k/got-1.d,
* testsuite/ld-mips-elf/vxworks1.rd,
* testsuite/ld-powerpc/ambiguousv1.d,
* testsuite/ld-powerpc/ambiguousv1b.d,
* testsuite/ld-powerpc/ambiguousv2.d,
* testsuite/ld-powerpc/ambiguousv2b.d,
* testsuite/ld-powerpc/tlsexe.r,
* testsuite/ld-powerpc/tlsexe32.r,
* testsuite/ld-powerpc/tlsexetoc.r,
* testsuite/ld-powerpc/tlsso.r,
* testsuite/ld-powerpc/tlsso32.r,
* testsuite/ld-powerpc/tlstocso.r,
* testsuite/ld-powerpc/vle-multiseg-1.d,
* testsuite/ld-powerpc/vle-multiseg-2.d,
* testsuite/ld-powerpc/vle-multiseg-3.d,
* testsuite/ld-s390/tlsbin.rd,
* testsuite/ld-s390/tlsbin_64.rd,
* testsuite/ld-s390/tlspic.rd,
* testsuite/ld-s390/tlspic_64.rd,
* testsuite/ld-sh/ld-r-1.d,
* testsuite/ld-sh/sh64/gotplt.d,
* testsuite/ld-sh/shared-1.d,
* testsuite/ld-sh/tlsbin-2.d,
* testsuite/ld-sh/tlspic-2.d,
* testsuite/ld-sparc/gotop32.rd,
* testsuite/ld-sparc/gotop64.rd,
* testsuite/ld-sparc/tlssunpic32.rd,
* testsuite/ld-sparc/tlssunpic64.rd,
* testsuite/ld-sparc/vxworks1-lib.rd,
* testsuite/ld-tic6x/shlib-app-1.rd,
* testsuite/ld-tic6x/shlib-app-1b.rd,
* testsuite/ld-tic6x/shlib-app-1r.rd,
* testsuite/ld-tic6x/shlib-app-1rb.rd,
* testsuite/ld-tic6x/shlib-noindex.rd,
* testsuite/ld-vax-elf/export-class-data.rd,
* testsuite/ld-x86-64/pr13082-1a.d,
* testsuite/ld-x86-64/pr13082-1b.d,
* testsuite/ld-x86-64/pr13082-2a.d,
* testsuite/ld-x86-64/pr13082-2b.d,
* testsuite/ld-x86-64/pr13082-3a.d,
* testsuite/ld-x86-64/pr13082-3c.d,
* testsuite/ld-x86-64/pr13082-4a.d,
* testsuite/ld-x86-64/pr13082-5a.d,
* testsuite/ld-x86-64/pr13082-5b.d,
* testsuite/ld-x86-64/pr13082-6a.d,
* testsuite/ld-x86-64/pr13082-6b.d,
* testsuite/ld-x86-64/pr17709-nacl.rd,
* testsuite/ld-x86-64/pr17709.rd,
* testsuite/ld-x86-64/pr19539a.d,
* testsuite/ld-x86-64/pr19539b.d,
* testsuite/ld-x86-64/pr19615.d,
* testsuite/ld-x86-64/pr19636-1a.d,
* testsuite/ld-x86-64/pr19636-1d.d,
* testsuite/ld-x86-64/pr19636-1e.d,
* testsuite/ld-x86-64/pr19636-2a.d,
* testsuite/ld-x86-64/pr19636-2e.d,
* testsuite/ld-x86-64/pr19636-2f.d,
* testsuite/ld-x86-64/pr19636-3a.d,
* testsuite/ld-x86-64/pr19645.d,
* testsuite/ld-x86-64/pr19807-2b.d,
* testsuite/ld-x86-64/pr19807-2d.d,
* testsuite/ld-x86-64/pr19827-nacl.rd,
* testsuite/ld-x86-64/pr19827.rd,
* testsuite/ld-x86-64/pr20253-4a.d,
* testsuite/ld-x86-64/pr20253-4b.d,
* testsuite/ld-x86-64/pr20253-4d.d,
* testsuite/ld-x86-64/pr20253-4e.d,
* testsuite/ld-x86-64/pr20253-5a.d,
* testsuite/ld-x86-64/pr20253-5b.d,
* testsuite/ld-x86-64/tlsbin-nacl.rd,
* testsuite/ld-x86-64/tlsbin.rd,
* testsuite/ld-x86-64/tlspic-nacl.rd,
* testsuite/ld-x86-64/tlspic.rd,
* testsuite/ld-x86-64/tlspic2-nacl.rd: Update for
pluralization fixes.
2017-11-07 08:48:29 +08:00
|
|
|
Opcode 12 has 1 arg
|
2017-02-24 05:54:02 +08:00
|
|
|
|
2020-03-11 18:17:14 +08:00
|
|
|
The Directory Table \(offset 0x22, lines 3, columns 1\):
|
2017-02-24 05:54:02 +08:00
|
|
|
Entry Name
|
|
|
|
0 \(indirect line string, offset: 0x0\):
|
|
|
|
1 \(indirect line string, offset: 0x1\):
|
|
|
|
2 \(indirect line string, offset: 0x22\): /usr/include
|
|
|
|
|
2020-03-11 18:17:14 +08:00
|
|
|
The File Name Table \(offset 0x34, lines 4, columns 2\):
|
2017-02-24 05:54:02 +08:00
|
|
|
Entry Dir Name
|
|
|
|
0 0 \(indirect line string, offset: 0x14\): main.c
|
|
|
|
1 1 \(indirect line string, offset: 0x1b\): main.c
|
|
|
|
2 2 \(indirect line string, offset: 0xb\): unistd.h
|
|
|
|
3 2 \(indirect line string, offset: 0x2\): getopt.h
|
|
|
|
|
|
|
|
Line Number Statements:
|
|
|
|
\[0x00000048\] Extended opcode 2: set Address to 0x1234
|
|
|
|
\[0x00000053\] Special opcode 15: advance Address by 0 to 0x1234 and Line by 5 to 6
|
|
|
|
\[0x00000054\] Extended opcode 2: set Address to 0x12346
|
|
|
|
\[0x0000005f\] Copy
|
|
|
|
\[0x00000060\] Extended opcode 2: set Address to 0x1234
|
|
|
|
\[0x0000006b\] Extended opcode 1: End of Sequence
|
|
|
|
|
|
|
|
\[0x0000006e\] Extended opcode 2: set Address to 0x1234
|
|
|
|
\[0x00000079\] Special opcode 14: advance Address by 0 to 0x1234 and Line by 4 to 5
|
|
|
|
\[0x0000007a\] Extended opcode 2: set Address to 0x1234
|
|
|
|
\[0x00000085\] Copy
|
|
|
|
\[0x00000086\] Extended opcode 2: set Address to 0x1234
|
|
|
|
\[0x00000091\] Extended opcode 1: End of Sequence
|
|
|
|
|
|
|
|
|
Add support to readelf and objdump for following links to separate debug information files.
Hi Guys,
I am applying the rather large patch attached to this email to enhance
the readelf and objdump programs so that they now have the ability to
follow links to separate debug info files. (As requested by PR
15152). So for example whereas before we had this output:
$ readelf -wi main.exe
Contents of the .debug_info section:
[...]
<15> DW_AT_comp_dir : (alt indirect string, offset: 0x30c)
[...]
With the new option enabled we get:
$ readelf -wiK main.exe
main.exe: Found separate debug info file: dwz.debug
Contents of the .debug_info section (loaded from main.exe):
[...]
<15> DW_AT_comp_dir : (alt indirect string, offset: 0x30c) /home/nickc/Downloads/dwzm
[...]
The link following feature also means that we can get two lots of
output if the same section exists in both the main file and the
separate debug info file:
$ readelf -wiK main.exe
main.exe: Found separate debug info file: dwz.debug
Contents of the .debug_info section (loaded from main.exe):
[...]
Contents of the .debug_info section (loaded from dwz.debug):
[...]
The patch also adds the ability to display the contents of debuglink
sections:
$ readelf -wk main.exe
Contents of the .gnu_debugaltlink section:
Separate debug info file: dwz.debug
Build-ID (0x14 bytes):
c4 a8 89 8d 64 cf 70 8a 35 68 21 f2 ed 24 45 3e 18 7a 7a 93
Naturally there are long versions of these options (=follow-links and
=links). The documentation has been updated as well, and since both
readelf and objdump use the same set of debug display options, I have
moved the text into a separate file. There are also a couple of new
binutils tests to exercise the new behaviour.
There are a couple of missing features in the current patch however,
although I do intend to address them in follow up submissions:
Firstly the code does not check the build-id inside separate debug
info files when it is searching for a file specified by a
.gnu_debugaltlink section. It just assumes that if the file is there,
then it contains the information being sought.
Secondly I have not checked the DWARF-5 version of these link
features, so there will probably be code to add there.
Thirdly I have only implemented link following for the
DW_FORM_GNU_strp_alt format. Other alternate formats (eg
DW_FORM_GNU_ref_alt) have yet to be implemented.
Lastly, whilst implementing this feature I found it necessary to move
some of the global variables used by readelf (eg section_headers) into
a structure that can be passed around. I have moved all of the global
variables that were necessary to get the patch working, but I need to
complete the operation and move the remaining, file-specific variables
(eg dynamic_strings).
Cheers
Nick
binutils PR 15152
* dwarf.h (enum dwarf_section_display_enum): Add gnu_debuglink,
gnu_debugaltlink and separate_debug_str.
(struct dwarf_section): Add filename field.
Add prototypes for load_separate_debug_file, close_debug_file and
open_debug_file.
* dwarf.c (do_debug_links): New.
(do_follow_links): New.
(separate_debug_file, separate_debug_filename): New.
(fetch_alt_indirect_string): New function. Retrieves a string
from the debug string table in the separate debug info file.
(read_and_display_attr_value): Use it with DW_FORM_GNU_strp_alt.
(load_debug_section_with_follow): New function. Like
load_debug_section, but if the first attempt fails, then tries
again in the separate debug info file.
(introduce): New function.
(process_debug_info): Use load_debug_section_with_follow and
introduce.
(load_debug_info): Likewise.
(display_debug_lines_raw): Likewise.
(display_debug_lines_decoded): Likewise.
(display_debug_macinfo): Likewise.
(display_debug_macro): Likewise.
(display_debug_abbrev): Likewise.
(display_debug_loc): Likewise.
(display_debug_str): Likewise.
(display_debug_aranges): Likewise.
(display_debug_addr); Likewise.
(display_debug_frames): Likewise.
(display_gdb_index): Likewise.
(process_cu_tu_index): Likewise.
(load_cu_tu_indexes): Likewise.
(display_debug_links): New function. Displays the contents of a
.gnu_debuglink or .gnu_debugaltlink section.
(calc_gnu_debuglink_ctc32):New function. Calculates a CRC32
value.
(check_gnu_debuglink): New function. Checks the CRC of a
potential separate debug info file.
(parse_gnu_debuglink): New function. Reads a CRC value out of a
.gnu_debuglink section.
(check_gnu_debugaltlink): New function.
(parse_gnu_debugaltlink): New function. Reads the build-id value
out of a .gnu_debugaltlink section.
(load_separate_debug_info): New function. Finds and loads a
separate debug info file.
(load_separate_debug_file): New function. Attempts to find and
follow a link to a separate debug info file.
(free_debug_memory): Free the separate debug info file
information.
(opts_table): Add "follow-links" and "links".
(dwarf_select_sections_by_letters): Add "k" and "K".
(debug_displays): Reformat. Add .gnu-debuglink and
.gnu_debugaltlink.
Add an extra entry for .debug_str in a separate debug info file.
* doc/binutils.texi: Move description of debug dump features
common to both readelf and objdump into...
* objdump.c (usage): Add -Wk and -WK.
(load_specific_debug_section): Initialise the filename field in
the dwarf_section structure.
(close_debug_file): New function.
(open_debug_file): New function.
(dump_dwarf): Load and dump the separate debug info sections.
* readelf.c (struct filedata): New structure. Contains various
variables that used to be global:
(current_file_size, string_table, string_table_length, elf_header)
(section_headers, program_headers, dump_sects, num_dump_sects):
Move into filedata structure.
(cmdline): New global variable. Contains list of sections to dump
by number, as specified on the command line.
Add filedata parameter to most functions.
(load_debug_section): Load the string table if it has not already
been retrieved.
(close_file): New function.
(close_debug_file): New function.
(open_file): New function.
(open_debug_file): New function.
(process_object): Process sections in any separate debug info files.
* doc/debug.options.texi: New file. Add description of =links and
=follow-links options.
* NEWS: Mention the new feature.
* elfcomm.c: Have the byte gte functions take a const pointer.
* elfcomm.h: Update prototypes.
* testsuite/binutils-all/dw5.W: Update expected output.
* testsuite/binutils-all/objdump.WL: Update expected output.
* testsuite/binutils-all/objdump.exp: Add test of -WK and -Wk.
* testsuite/binutils-all/readelf.exp: Add test of -wK and -wk.
* testsuite/binutils-all/readelf.k: New file.
* testsuite/binutils-all/objdump.Wk: New file.
* testsuite/binutils-all/objdump.WK2: New file.
* testsuite/binutils-all/linkdebug.s: New file.
* testsuite/binutils-all/debuglink.s: New file.
gas * testsuite/gas/avr/large-debug-line-table.d: Update expected
output.
* testsuite/gas/elf/dwarf2-11.d: Likewise.
* testsuite/gas/elf/dwarf2-12.d: Likewise.
* testsuite/gas/elf/dwarf2-13.d: Likewise.
* testsuite/gas/elf/dwarf2-14.d: Likewise.
* testsuite/gas/elf/dwarf2-15.d: Likewise.
* testsuite/gas/elf/dwarf2-16.d: Likewise.
* testsuite/gas/elf/dwarf2-17.d: Likewise.
* testsuite/gas/elf/dwarf2-18.d: Likewise.
* testsuite/gas/elf/dwarf2-5.d: Likewise.
* testsuite/gas/elf/dwarf2-6.d: Likewise.
* testsuite/gas/elf/dwarf2-7.d: Likewise.
ld * testsuite/ld-avr/gc-section-debugline.d: Update expected
output.
2017-11-15 19:34:03 +08:00
|
|
|
Contents of the .debug_line section:
|
2017-02-24 05:54:02 +08:00
|
|
|
|
|
|
|
CU: ./main.c:
|
2018-09-20 01:56:29 +08:00
|
|
|
File name Line number Starting address View Stmt
|
|
|
|
main.c 6 0x1234 x
|
|
|
|
main.c 6 0x12346 x
|
2020-07-10 18:25:44 +08:00
|
|
|
main.c - 0x1234
|
2017-02-24 05:54:02 +08:00
|
|
|
|
2018-09-20 01:56:29 +08:00
|
|
|
main.c 5 0x1234 x
|
|
|
|
main.c 5 0x1234 x
|
2020-07-10 18:25:44 +08:00
|
|
|
main.c - 0x1234
|
2017-02-24 05:54:02 +08:00
|
|
|
|
|
|
|
|