mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-24 22:34:11 +08:00

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.
161 lines
4.8 KiB
Makefile
161 lines
4.8 KiB
Makefile
#PROG: objcopy
|
|
#source: compressed-1.s
|
|
#as: --32 --compress-debug-sections
|
|
#objcopy:
|
|
#readelf: -w
|
|
#name: objcopy on compressed debug sections
|
|
|
|
Contents of the .[z]?debug_abbrev section:
|
|
|
|
Number TAG \(0x0\)
|
|
1 DW_TAG_compile_unit \[has children\]
|
|
DW_AT_producer DW_FORM_strp
|
|
DW_AT_language DW_FORM_data1
|
|
DW_AT_name DW_FORM_strp
|
|
DW_AT_comp_dir DW_FORM_strp
|
|
DW_AT_low_pc DW_FORM_addr
|
|
DW_AT_high_pc DW_FORM_addr
|
|
DW_AT_stmt_list DW_FORM_data4
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
2 DW_TAG_subprogram \[no children\]
|
|
DW_AT_external DW_FORM_flag
|
|
DW_AT_name DW_FORM_strp
|
|
DW_AT_decl_file DW_FORM_data1
|
|
DW_AT_decl_line DW_FORM_data1
|
|
DW_AT_low_pc DW_FORM_addr
|
|
DW_AT_high_pc DW_FORM_addr
|
|
DW_AT_frame_base DW_FORM_block1
|
|
DW_AT value: 0 DW_FORM value: 0
|
|
|
|
Contents of the .[z]?debug_info section:
|
|
|
|
Compilation Unit @ offset 0x0:
|
|
Length: 0x46 \(32-bit\)
|
|
Version: 3
|
|
Abbrev Offset: 0x0
|
|
Pointer Size: 4
|
|
<0><b>: Abbrev Number: 1 \(DW_TAG_compile_unit\)
|
|
<c> DW_AT_producer : \(indirect string, offset: 0x0\): GNU C 4.4.4
|
|
<10> DW_AT_language : 1 \(ANSI C\)
|
|
<11> DW_AT_name : \(indirect string, offset: 0x18\): compressed-1.c
|
|
<15> DW_AT_comp_dir : \(indirect string, offset: 0x16\): .
|
|
<19> DW_AT_low_pc : 0x0
|
|
<1d> DW_AT_high_pc : 0x1b
|
|
<21> DW_AT_stmt_list : 0x0
|
|
<1><25>: Abbrev Number: 2 \(DW_TAG_subprogram\)
|
|
<26> DW_AT_external : 1
|
|
<27> DW_AT_name : \(indirect string, offset: 0xc\): foo2
|
|
<2b> DW_AT_decl_file : 1
|
|
<2c> DW_AT_decl_line : 10
|
|
<2d> DW_AT_low_pc : 0x0
|
|
<31> DW_AT_high_pc : 0x2
|
|
<35> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\)
|
|
<1><37>: Abbrev Number: 2 \(DW_TAG_subprogram\)
|
|
<38> DW_AT_external : 1
|
|
<39> DW_AT_name : \(indirect string, offset: 0x11\): foo1
|
|
<3d> DW_AT_decl_file : 1
|
|
<3e> DW_AT_decl_line : 4
|
|
<3f> DW_AT_low_pc : 0x10
|
|
<43> DW_AT_high_pc : 0x1b
|
|
<47> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\)
|
|
<1><49>: Abbrev Number: 0
|
|
|
|
Raw dump of debug contents of section .[z]?debug_line:
|
|
|
|
Offset: 0x0
|
|
Length: 64
|
|
DWARF Version: 2
|
|
Prologue Length: 37
|
|
Minimum Instruction Length: 1
|
|
Initial value of 'is_stmt': 1
|
|
Line Base: -5
|
|
Line Range: 14
|
|
Opcode Base: 13
|
|
|
|
Opcodes:
|
|
Opcode 1 has 0 args
|
|
Opcode 2 has 1 arg
|
|
Opcode 3 has 1 arg
|
|
Opcode 4 has 1 arg
|
|
Opcode 5 has 1 arg
|
|
Opcode 6 has 0 args
|
|
Opcode 7 has 0 args
|
|
Opcode 8 has 0 args
|
|
Opcode 9 has 1 arg
|
|
Opcode 10 has 0 args
|
|
Opcode 11 has 0 args
|
|
Opcode 12 has 1 arg
|
|
|
|
The Directory Table is empty.
|
|
|
|
The File Name Table \(offset 0x.*\):
|
|
Entry Dir Time Size Name
|
|
1 0 0 0 compressed-1.c
|
|
|
|
Line Number Statements:
|
|
\[0x.*\] Extended opcode 2: set Address to 0x0
|
|
\[0x.*\] Advance Line by 10 to 11
|
|
\[0x.*\] Copy
|
|
\[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 12 \(view 1\)
|
|
\[0x.*\] Advance Line by -7 to 5
|
|
\[0x.*\] Special opcode 229: advance Address by 16 to 0x10 and Line by 0 to 5
|
|
\[0x.*\] Special opcode 49: advance Address by 3 to 0x13 and Line by 2 to 7
|
|
\[0x.*\] Special opcode 46: advance Address by 3 to 0x16 and Line by -1 to 6
|
|
\[0x.*\] Advance PC by 5 to 0x1b
|
|
\[0x.*\] Extended opcode 1: End of Sequence
|
|
|
|
|
|
Contents of the .[z]?debug_pubnames section:
|
|
|
|
Length: 32
|
|
Version: 2
|
|
Offset into .[z]?debug_info section: 0x0
|
|
Size of area in .[z]?debug_info section: 74
|
|
|
|
Offset Name
|
|
25 foo2
|
|
37 foo1
|
|
|
|
Contents of the .[z]?debug_aranges section:
|
|
|
|
Length: 28
|
|
Version: 2
|
|
Offset into .[z]?debug_info: 0x0
|
|
Pointer Size: 4
|
|
Segment Size: 0
|
|
|
|
Address Length
|
|
00000000 0000001b
|
|
00000000 00000000
|
|
|
|
Contents of the .[z]?debug_str section:
|
|
|
|
0x00000000 474e5520 4320342e 342e3400 666f6f32 GNU C 4.4.4.foo2
|
|
0x00000010 00666f6f 31002e00 636f6d70 72657373 .foo1...compress
|
|
0x00000020 65642d31 2e6300 ed-1.c.
|
|
|
|
Contents of the .[z]?debug_frame section:
|
|
|
|
00000000 00000010 ffffffff CIE
|
|
Version: 1
|
|
Augmentation: ""
|
|
Code alignment factor: 1
|
|
Data alignment factor: -4
|
|
Return address column: 8
|
|
|
|
DW_CFA_def_cfa: r4 \(esp\) ofs 4
|
|
DW_CFA_offset: r8 \(eip\) at cfa-4
|
|
DW_CFA_nop
|
|
DW_CFA_nop
|
|
|
|
00000014 0000000c 00000000 FDE cie=00000000 pc=00000000..00000002
|
|
|
|
00000024 00000014 00000000 FDE cie=00000000 pc=00000010..0000001b
|
|
DW_CFA_advance_loc: 3 to 00000013
|
|
DW_CFA_def_cfa_offset: 16
|
|
DW_CFA_advance_loc: 3 to 00000016
|
|
DW_CFA_def_cfa_offset: 4
|
|
DW_CFA_nop
|
|
DW_CFA_nop
|
|
|