binutils-gdb/binutils/ChangeLog

468 lines
16 KiB
Plaintext
Raw Normal View History

2017-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (debug_displays_assert): New static assertion.
2017-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.h (enum dwarf_section_display_enum): Add loclists and rnglists.
Add support for displaying and merging GNU_BUILD_NOTEs. include * elf/common.h (SHF_GNU_BUILD_NOTE): Define. (NT_GNU_PROPERTY_TYPE_0): Define. (NT_GNU_BUILD_ATTRIBUTE_OPEN): Define. (NT_GNU_BUILD_ATTRIBUTE_FUN): Define. (GNU_BUILD_ATTRIBUTE_TYPE_NUMERIC): Define. (GNU_BUILD_ATTRIBUTE_TYPE_STRING): Define. (GNU_BUILD_ATTRIBUTE_TYPE_BOOL_TRUE): Define. (GNU_BUILD_ATTRIBUTE_TYPE_BOOL_FALSE): Define. (GNU_BUILD_ATTRIBUTE_VERSION): Define. (GNU_BUILD_ATTRIBUTE_STACK_PROT): Define. (GNU_BUILD_ATTRIBUTE_RELRO): Define. (GNU_BUILD_ATTRIBUTE_STACK_SIZE): Define. (GNU_BUILD_ATTRIBUTE_TOOL): Define. (GNU_BUILD_ATTRIBUTE_ABI): Define. (GNU_BUILD_ATTRIBUTE_PIC): Define. (NOTE_GNU_PROPERTY_SECTION_NAME): Define. (GNU_BUILD_ATTRS_SECTION_NAME): Define. (GNU_PROPERTY_STACK_SIZE): Define. (GNU_PROPERTY_NO_COPY_ON_PROTECTED): Define. (GNU_PROPERTY_X86_ISA_1_USED): Define. (GNU_PROPERTY_X86_ISA_1_NEEDED): Define. (GNU_PROPERTY_X86_ISA_1_486): Define. (GNU_PROPERTY_X86_ISA_1_586): Define. (GNU_PROPERTY_X86_ISA_1_686): Define. (GNU_PROPERTY_X86_ISA_1_SSE): Define. (GNU_PROPERTY_X86_ISA_1_SSE2): Define. (GNU_PROPERTY_X86_ISA_1_SSE3): Define. (GNU_PROPERTY_X86_ISA_1_SSSE3): Define. (GNU_PROPERTY_X86_ISA_1_SSE4_1): Define. (GNU_PROPERTY_X86_ISA_1_SSE4_2): Define. (GNU_PROPERTY_X86_ISA_1_AVX): Define. (GNU_PROPERTY_X86_ISA_1_AVX2): Define. (GNU_PROPERTY_X86_ISA_1_AVX512F): Define. (GNU_PROPERTY_X86_ISA_1_AVX512CD): Define. (GNU_PROPERTY_X86_ISA_1_AVX512ER): Define. (GNU_PROPERTY_X86_ISA_1_AVX512PF): Define. (GNU_PROPERTY_X86_ISA_1_AVX512VL): Define. (GNU_PROPERTY_X86_ISA_1_AVX512DQ): Define. (GNU_PROPERTY_X86_ISA_1_AVX512BW): Define. binutils* readelf.c (get_note_type): Add support for GNU_BUILD_NOTEs. (get_gnu_elf_note_type): Add support for GNU_PROPERTY_NOTEs. (decode_x86_isa): New function. (print_gnu_property_note): New function. (print_gnu_note): Handle GNU_PROPERTY_NOTEs. (print_gnu_build_attribute_description): New function. (print_gnu_build_attribute_name): New function. (process_note): Add support for GNU_BUILD_NOTEs. * objcopy.c (--merge-notes): New command line option. (copy_options): Add merge-notes. (copy_usage): Likewise. (is_merge_note_section): New function. (merge_gnu_build_notes): New function. (copy_object): Merge note sections if asked to do so. (skip_section): Add skip_copy parameter. Add support for skipping merged note sections. (copy_relocations_in_section): Update call to skip_section. (copy_section): Likewise. (copy_main): Add support for merge-notes option. * doc/binutils.texi: Document the new option to objcopy. * NEWS: Mention the new feature. * testsuite/binutils-all/note-2-32.d: New test. Checks note merging on 32-bit targets. * testsuite/binutils-all/note-2-32.s: New test source file. * testsuite/binutils-all/note-2-64.d: New test. Like note-2-32.d but for 64-bit targets. * testsuite/binutils-all/note-2-64.s: New test source file. * testsuite/binutils-all/objcopy.exp: Run the new test.
2017-03-01 12:09:46 +01:00
2017-03-01 Nick Clifton <nickc@redhat.com>
* readelf.c (get_note_type): Add support for GNU_BUILD_NOTEs.
(get_gnu_elf_note_type): Add support for GNU_PROPERTY_NOTEs.
(decode_x86_isa): New function.
(print_gnu_property_note): New function.
(print_gnu_note): Handle GNU_PROPERTY_NOTEs.
(print_gnu_build_attribute_description): New function.
(print_gnu_build_attribute_name): New function.
(process_note): Add support for GNU_BUILD_NOTEs.
* objcopy.c (--merge-notes): New command line option.
(copy_options): Add merge-notes.
(copy_usage): Likewise.
(is_merge_note_section): New function.
(merge_gnu_build_notes): New function.
(copy_object): Merge note sections if asked to do so.
(skip_section): Add skip_copy parameter. Add support for skipping
merged note sections.
(copy_relocations_in_section): Update call to skip_section.
(copy_section): Likewise.
(copy_main): Add support for merge-notes option.
* doc/binutils.texi: Document the new option to objcopy.
* NEWS: Mention the new feature.
* testsuite/binutils-all/note-2-32.d: New test. Checks note
merging on 32-bit targets.
* testsuite/binutils-all/note-2-32.s: New test source file.
* testsuite/binutils-all/note-2-64.d: New test. Like note-2-32.d
but for 64-bit targets.
* testsuite/binutils-all/note-2-64.s: New test source file.
* testsuite/binutils-all/objcopy.exp: Run the new test.
GDB: Add support for the new set/show disassembler-options commands. This commit adds support to GDB so that it can modify the disassembler-options value that is passed to the disassembler, similar to objdump's -M option. Currently, the only supported targets are ARM, PowerPC and S/390, but adding support for a new target(s) is not difficult. include/ * dis-asm.h (disasm_options_t): New typedef. (parse_arm_disassembler_option): Remove prototype. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (get_arm_regname_num_options): Likewise. (disassemble_init_s390): New prototype. (disassembler_options_powerpc): Likewise. (disassembler_options_arm): Likewise. (disassembler_options_s390): Likewise. (remove_whitespace_and_extra_commas): Likewise. (disassembler_options_cmp): Likewise. (next_disassembler_option): New inline function. (FOR_EACH_DISASSEMBLER_OPTION): New macro. opcodes/ * disassemble.c Include "safe-ctype.h". (disassemble_init_for_target): Handle s390 init. (remove_whitespace_and_extra_commas): New function. (disassembler_options_cmp): Likewise. * arm-dis.c: Include "libiberty.h". (NUM_ELEM): Delete. (regnames): Use long disassembler style names. Add force-thumb and no-force-thumb options. (NUM_ARM_REGNAMES): Rename from this... (NUM_ARM_OPTIONS): ...to this. Use ARRAY_SIZE. (get_arm_regname_num_options): Delete. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (parse_disassembler_options): Likewise. (parse_arm_disassembler_option): Rename from this... (parse_arm_disassembler_options): ...to this. Make static. Use new FOR_EACH_DISASSEMBLER_OPTION macro to scan over options. (print_insn): Use parse_arm_disassembler_options. (disassembler_options_arm): New function. (print_arm_disassembler_options): Handle updated regnames. * ppc-dis.c: Include "libiberty.h". (ppc_opts): Add "32" and "64" entries. (ppc_parse_cpu): Use ARRAY_SIZE and disassembler_options_cmp. (powerpc_init_dialect): Add break to switch statement. Use new FOR_EACH_DISASSEMBLER_OPTION macro. (disassembler_options_powerpc): New function. (print_ppc_disassembler_options): Use ARRAY_SIZE. Remove printing of "32" and "64". * s390-dis.c: Include "libiberty.h". (init_flag): Remove unneeded variable. (struct s390_options_t): New structure type. (options): New structure. (init_disasm): Rename from this... (disassemble_init_s390): ...to this. Add initializations for current_arch_mask and option_use_insn_len_bits_p. Remove init_flag. (print_insn_s390): Delete call to init_disasm. (disassembler_options_s390): New function. (print_s390_disassembler_options): Print using information from struct 'options'. * po/opcodes.pot: Regenerate. binutils/ * objdump.c (main): Use remove_whitespace_and_extra_commas. gdb/ * NEWS: Mention new set/show disassembler-options commands. * doc/gdb.texinfo: Document new set/show disassembler-options commands. * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h". (prospective_options): New static variable. (gdb_disassembler::gdb_disassembler): Initialize m_di.disassembler_options. (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options. (get_disassembler_options): New function. (set_disassembler_options): Likewise. (set_disassembler_options_sfunc): Likewise. (show_disassembler_options_sfunc): Likewise. (disassembler_options_completer): Likewise. (_initialize_disasm): Likewise. * disasm.h (get_disassembler_options): New prototype. (set_disassembler_options): Likewise. * gdbarch.sh (gdbarch_disassembler_options): New variable. (gdbarch_verify_disassembler_options): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Likewise. * arm-tdep.c (num_disassembly_options): Delete. (set_disassembly_style): Likewise. (arm_disassembler_options): New static variable. (set_disassembly_style_sfunc): Convert short style name into long option name. Call set_disassembler_options. (show_disassembly_style_sfunc): New function. (arm_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. (_initialize_arm_tdep): Delete regnames variable and update callers. (arm_disassembler_options): Initialize. (disasm_options): New variable. (num_disassembly_options): Rename from this... (num_disassembly_styles): ...to this. Compute by scanning through disasm_options. (valid_disassembly_styles): Initialize using disasm_options. Remove calls to parse_arm_disassembler_option, get_arm_regnames and set_arm_regname_option. Pass show_disassembly_style_sfunc to the "disassembler" setshow command. * rs6000-tdep.c (powerpc_disassembler_options): New static variable. (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. * s390-tdep.c (s390_disassembler_options): New static variable. (s390_gdbarch_init):all set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. gdb/testsuite/ * gdb.arch/powerpc-power.exp: Delete test. * gdb.arch/powerpc-power.s: Likewise. * gdb.disasm/disassembler-options.exp: New test. * gdb.arch/powerpc-altivec.exp: Likewise. * gdb.arch/powerpc-altivec.s: Likewise. * gdb.arch/powerpc-altivec2.exp: Likewise. * gdb.arch/powerpc-altivec2.s: Likewise. * gdb.arch/powerpc-altivec3.exp: Likewise. * gdb.arch/powerpc-altivec3.s: Likewise. * gdb.arch/powerpc-power7.exp: Likewise. * gdb.arch/powerpc-power7.s: Likewise. * gdb.arch/powerpc-power8.exp: Likewise. * gdb.arch/powerpc-power8.s: Likewise. * gdb.arch/powerpc-power9.exp: Likewise. * gdb.arch/powerpc-power9.s: Likewise. * gdb.arch/powerpc-vsx.exp: Likewise. * gdb.arch/powerpc-vsx.s: Likewise. * gdb.arch/powerpc-vsx2.exp: Likewise. * gdb.arch/powerpc-vsx2.s: Likewise. * gdb.arch/powerpc-vsx3.exp: Likewise. * gdb.arch/powerpc-vsx3.s: Likewise. * gdb.arch/arm-disassembler-options.exp: Likewise. * gdb.arch/powerpc-disassembler-options.exp: Likewise. * gdb.arch/s390-disassembler-options.exp: Likewise.
2017-02-28 19:32:07 +01:00
2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
* objdump.c (main): Use remove_whitespace_and_extra_commas.
2017-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compilation with GCC 4.4.7.
* dwarf.c (display_loclists_list, display_debug_rnglists_list):
Initialize begin and end.
2017-02-25 Alan Modra <amodra@gmail.com>
* testsuite/binutils-all/dw5.S: Replace .string with .asciz.
Support hpux .comm variant.
* testsuite/binutils-all/readelf.exp: Define HPUX when assembling
dw5 test for hppa64-hpux.
Tidy up readelf's use of boolean values. * readelf.c (show_name, do_dynamic, do_syms, do_dyn_syms, (do_reloc, do_sections, do_section_groups, do_section_details, (do_segments, do_unwind, do_using_dynamic, do_header, do_dump, (do_version, do_histogram, do_debugging, do_arch, do_notes, (do_archive_index, is_32bit_elf, decompress_dumps): Use bfd_boolean type. (parse_args): Treat the do_* variables as booleans. (print_vma): Return an unsigned int. (print_symbol): Change width parameter to signed int. (is_ia64_vms): Change return type to bfd_boolean. (guess_is_rela): Likewise. (slurp_rela_relocs): Likewise. (slurp_rel_relocs): Likewise. (dump_relocations): Likewise. (process_file_header): Likewise. (get_program_headers): Likewise. (process_program_headers): Likewise. (process_section_headers): Likewise. (process_section_groups): Likewise. (dump_ia64_vms_dynamic_fixups): Likewise. (dump_ia64_vms_dynamic_relocs): Likewise. (process_ia64_vms_dynamic_relocs): Likewise. (process_relocs): Likewise. (dump_ia64_unwind): Likewise. (ia64_process_unwind): Likewise. (dump_hppa_unwind): Likewise. (slurp_hppa_unwind_table): Likewise. (hppa_process_unwind): Likewise. (decode_arm_unwind_bytecode): Likewise. (decode_tic6x_unwind_bytecode): Likewise. (decode_arm_unwind): Likewise. (dump_arm_unwind): Likewise. (arm_process_unwind): Likewise. (process_unwind): Likewise. (get_32bit_dynamic_section): Likewise. (get_64bit_dynamic_section): Likewise. (process_dynamic_section): Likewise. (process_version_sections): Likewise. (process_symbol_table): Likewise. (process_syminfo): Likewise. (apply_relocations): Likewise. (disassemble_section): Likewise. (dump_section_as_strings): Likewise. (dump_section_as_bytes): Likewise. (load_specific_debug_section): Likewise. (load_debug_section): Likewise. (display_debug_section): Likewise. (process_section_contents): Likewise. (process_attributes): Likewise. (process_nds32_specific): Likewise. (process_gnu_liblist): Likewise. (print_core_note): Likewise. (print_gnu_note): Likewise. (print_v850_note): Likewise. (process_netbsd_elf_note): Likewise. (print_stapsdt_note): Likewise. (print_ia64_vms_note): Likewise. (process_note): Likewise. (process_notes_at): Likewise. (process_corefile_note_segments): Likewise. (process_v850_notes): Likewise. (process_note_sections): Likewise. (process_notes): Likewise. (process_arch_specific): Likewise. (get_file_header): Likewise. (process_object): Likewise. (process_archive): Likewise. (process_file): Likewise. (section_subset): Make static. (get_mips_reg_size): Return a signed integer. (process_object): Reverse the logic of the return value. (process_archive): Likewise. (process_file): Likewise.
2017-02-24 15:48:19 +01:00
2017-02-24 Nick Clifton <nickc@redhat.com>
* readelf.c (show_name, do_dynamic, do_syms, do_dyn_syms,
(do_reloc, do_sections, do_section_groups, do_section_details,
(do_segments, do_unwind, do_using_dynamic, do_header, do_dump,
(do_version, do_histogram, do_debugging, do_arch, do_notes,
(do_archive_index, is_32bit_elf, decompress_dumps): Use
bfd_boolean type.
(parse_args): Treat the do_* variables as booleans.
(print_vma): Return an unsigned int.
(print_symbol): Change width parameter to signed int.
(is_ia64_vms): Change return type to bfd_boolean.
(guess_is_rela): Likewise.
(slurp_rela_relocs): Likewise.
(slurp_rel_relocs): Likewise.
(dump_relocations): Likewise.
(process_file_header): Likewise.
(get_program_headers): Likewise.
(process_program_headers): Likewise.
(process_section_headers): Likewise.
(process_section_groups): Likewise.
(dump_ia64_vms_dynamic_fixups): Likewise.
(dump_ia64_vms_dynamic_relocs): Likewise.
(process_ia64_vms_dynamic_relocs): Likewise.
(process_relocs): Likewise.
(dump_ia64_unwind): Likewise.
(ia64_process_unwind): Likewise.
(dump_hppa_unwind): Likewise.
(slurp_hppa_unwind_table): Likewise.
(hppa_process_unwind): Likewise.
(decode_arm_unwind_bytecode): Likewise.
(decode_tic6x_unwind_bytecode): Likewise.
(decode_arm_unwind): Likewise.
(dump_arm_unwind): Likewise.
(arm_process_unwind): Likewise.
(process_unwind): Likewise.
(get_32bit_dynamic_section): Likewise.
(get_64bit_dynamic_section): Likewise.
(process_dynamic_section): Likewise.
(process_version_sections): Likewise.
(process_symbol_table): Likewise.
(process_syminfo): Likewise.
(apply_relocations): Likewise.
(disassemble_section): Likewise.
(dump_section_as_strings): Likewise.
(dump_section_as_bytes): Likewise.
(load_specific_debug_section): Likewise.
(load_debug_section): Likewise.
(display_debug_section): Likewise.
(process_section_contents): Likewise.
(process_attributes): Likewise.
(process_nds32_specific): Likewise.
(process_gnu_liblist): Likewise.
(print_core_note): Likewise.
(print_gnu_note): Likewise.
(print_v850_note): Likewise.
(process_netbsd_elf_note): Likewise.
(print_stapsdt_note): Likewise.
(print_ia64_vms_note): Likewise.
(process_note): Likewise.
(process_notes_at): Likewise.
(process_corefile_note_segments): Likewise.
(process_v850_notes): Likewise.
(process_note_sections): Likewise.
(process_notes): Likewise.
(process_arch_specific): Likewise.
(get_file_header): Likewise.
(process_object): Likewise.
(process_archive): Likewise.
(process_file): Likewise.
(section_subset): Make static.
(get_mips_reg_size): Return a signed integer.
(process_object): Reverse the logic of the return value.
(process_archive): Likewise.
(process_file): Likewise.
(process_program_headers): Fix snafu - if the program headers are
not available then this is not a cause to fail.
(process_corefile_note_segments): Likewise.
Tidy up readelf's use of boolean values. * readelf.c (show_name, do_dynamic, do_syms, do_dyn_syms, (do_reloc, do_sections, do_section_groups, do_section_details, (do_segments, do_unwind, do_using_dynamic, do_header, do_dump, (do_version, do_histogram, do_debugging, do_arch, do_notes, (do_archive_index, is_32bit_elf, decompress_dumps): Use bfd_boolean type. (parse_args): Treat the do_* variables as booleans. (print_vma): Return an unsigned int. (print_symbol): Change width parameter to signed int. (is_ia64_vms): Change return type to bfd_boolean. (guess_is_rela): Likewise. (slurp_rela_relocs): Likewise. (slurp_rel_relocs): Likewise. (dump_relocations): Likewise. (process_file_header): Likewise. (get_program_headers): Likewise. (process_program_headers): Likewise. (process_section_headers): Likewise. (process_section_groups): Likewise. (dump_ia64_vms_dynamic_fixups): Likewise. (dump_ia64_vms_dynamic_relocs): Likewise. (process_ia64_vms_dynamic_relocs): Likewise. (process_relocs): Likewise. (dump_ia64_unwind): Likewise. (ia64_process_unwind): Likewise. (dump_hppa_unwind): Likewise. (slurp_hppa_unwind_table): Likewise. (hppa_process_unwind): Likewise. (decode_arm_unwind_bytecode): Likewise. (decode_tic6x_unwind_bytecode): Likewise. (decode_arm_unwind): Likewise. (dump_arm_unwind): Likewise. (arm_process_unwind): Likewise. (process_unwind): Likewise. (get_32bit_dynamic_section): Likewise. (get_64bit_dynamic_section): Likewise. (process_dynamic_section): Likewise. (process_version_sections): Likewise. (process_symbol_table): Likewise. (process_syminfo): Likewise. (apply_relocations): Likewise. (disassemble_section): Likewise. (dump_section_as_strings): Likewise. (dump_section_as_bytes): Likewise. (load_specific_debug_section): Likewise. (load_debug_section): Likewise. (display_debug_section): Likewise. (process_section_contents): Likewise. (process_attributes): Likewise. (process_nds32_specific): Likewise. (process_gnu_liblist): Likewise. (print_core_note): Likewise. (print_gnu_note): Likewise. (print_v850_note): Likewise. (process_netbsd_elf_note): Likewise. (print_stapsdt_note): Likewise. (print_ia64_vms_note): Likewise. (process_note): Likewise. (process_notes_at): Likewise. (process_corefile_note_segments): Likewise. (process_v850_notes): Likewise. (process_note_sections): Likewise. (process_notes): Likewise. (process_arch_specific): Likewise. (get_file_header): Likewise. (process_object): Likewise. (process_archive): Likewise. (process_file): Likewise. (section_subset): Make static. (get_mips_reg_size): Return a signed integer. (process_object): Reverse the logic of the return value. (process_archive): Likewise. (process_file): Likewise.
2017-02-24 15:48:19 +01:00
2017-02-24 Maciej W. Rozycki <macro@imgtec.com>
* readelf.c (get_ver_flags): Tidy the formatting of the string
returned
2017-02-24 Maciej W. Rozycki <macro@imgtec.com>
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Make
`isum' unsigned.
<SHT_GNU_verneed>: Likewise.
readelf: Fix incorrect "Version definition past end of section" message Fix a commit 74e1a04b9787 ("More fixes for reading corrupt ELF files.") `readelf --version-info' regression that caused "Version definition past end of section" to be always printed at the end, even with good section data. For example with the `mips-linux' target we get: $ cat ver_def.s .data .globl new_foo .type new_foo, %object new_foo: .symver new_foo, foo@@ver_foo $ cat ver_def.ver { global: *foo*; local: *; }; $ as -o ver_def.o ver_def.s $ ld -e 0 --export-dynamic --version-script=ver_def.ver -o ver_def ver_def.o $ readelf -V ver_def Version symbols section '.gnu.version' contains 4 entries: Addr: 000000000000007e Offset: 0x01007e Link: 2 (.dynsym) 000: 0 (*local*) 2 (ver_foo) 1 (*global*) 2 (ver_foo) Version definition section '.gnu.version_d' contains 2 entries: Addr: 0x0000000000000088 Offset: 0x010088 Link: 3 (.dynstr) 000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: ver_def 0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_foo Version definition past end of section $ The cause is the `if (idx + ent.vd_next <= idx)' condition introduced to ensure forward progress, which however always triggers for good version definition section data as the last entry will have its `vd_next' value set to 0. Adjust the condition then, to say `if (idx + ent.vd_next < idx)' instead and to ensure forward progress limit the number of entries processed to the size of the version definition section, removing the problematic message from output quoted above, while ensuring the original PR 17531 test case is still handled gracefully. Add a suitable test case so that we have `readelf --version-info' coverage; due to the lack of infrastructure needed to run the linker in the `binutils' test suite and limited justification to implement it add a new `readelf.exp' script to the `ld' test suite instead, intended to gather any `readelf' test cases that require the linker to be run. If ever we decide to have linker infrastructure added to the `binutils' test suite, then the script can be moved between the test suites. binutils/ * readelf.c (process_version_sections) <SHT_GNU_verdef>: Limit the number of entries processed by the section size. Don't break out of the loop if `ent.vd_next' is 0. ld/ * testsuite/ld-elf/ver_def.d: New test. * testsuite/ld-elf/ver_def.ld: New test linker script. * testsuite/ld-elf/ver_def.ver: New test version script. * testsuite/ld-elf/ver_def.s: New test source. * testsuite/ld-elf/readelf.exp: New test script.
2017-02-23 19:16:11 +01:00
2017-02-24 Maciej W. Rozycki <macro@imgtec.com>
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Limit
the number of entries processed by the section size. Don't
break out of the loop if `ent.vd_next' is 0.
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* testsuite/binutils-all/dw5.S: New file.
* testsuite/binutils-all/dw5.W: New file.
* testsuite/binutils-all/readelf.exp (readelf -wiaoRlL): New test.
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (read_and_display_attr_value): Support DW_FORM_data16.
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (display_debug_macro): Support DWARF-5. Rename
DW_MACRO_GNU_*.
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (decode_location_expression): Support DW_OP_implicit_pointer,
DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type, DW_OP_convert
and DW_OP_reinterpret.
(read_and_display_attr_value): Support DW_AT_call_value,
DW_AT_call_data_value, DW_AT_call_target and
DW_AT_call_target_clobbered.
DWARF-5 basic functionality binutils/ 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf.c (fetch_indirect_line_string): New function. (abbrev_attr): New field implicit_const. (add_abbrev_attr): New parameter implicit_const. (process_abbrev_section): Support DW_FORM_implicit_const. (decode_location_expression): Support DW_OP_entry_value. (read_and_display_attr_value): Add parameter implicit_const. Support DW_FORM_line_strp and DW_FORM_implicit_const. (read_and_display_attr): Add parameter implicit_const. (process_debug_info): Support line_str and DWARF-5. (read_debug_line_header): Support DWARF-5. (display_formatted_table): New function. (display_debug_lines_raw): New parameter file. Support DWARF-5. (display_debug_lines_decoded): New parameter fileptr. Support DWARF-5. (display_debug_lines): Pass file parameter. (display_debug_macro): Update read_and_display_attr_value caller. (display_debug_abbrev): Support DW_FORM_implicit_const. (display_loclists_list): New function. (display_loc_list): Support .debug_loclists. (display_debug_ranges_list): New function from display_debug_ranges. (display_debug_rnglists_list): New function. (display_debug_ranges): Support .debug_rnglists. (debug_displays): Add .debug_line_str, .debug_loclists and .debug_rnglists. * dwarf.h: Include dwarf2.h (DWARF2_Internal_LineInfo): Add li_offset_size. (DWARF2_Internal_CompUnit): Add cu_unit_type. (enum dwarf_section_display_enum): Add line_str. * readelf.c (process_section_headers): Add rnglists and loclists.
2017-02-23 22:54:01 +01:00
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (fetch_indirect_line_string): New function.
(abbrev_attr): New field implicit_const.
(add_abbrev_attr): New parameter implicit_const.
(process_abbrev_section): Support DW_FORM_implicit_const.
(decode_location_expression): Support DW_OP_entry_value.
(read_and_display_attr_value): Add parameter implicit_const. Support
DW_FORM_line_strp and DW_FORM_implicit_const.
(read_and_display_attr): Add parameter implicit_const.
(process_debug_info): Support line_str and DWARF-5.
(read_debug_line_header): Support DWARF-5.
(display_formatted_table): New function.
(display_debug_lines_raw): New parameter file. Support DWARF-5.
(display_debug_lines_decoded): New parameter fileptr. Support DWARF-5.
(display_debug_lines): Pass file parameter.
(display_debug_macro): Update read_and_display_attr_value caller.
(display_debug_abbrev): Support DW_FORM_implicit_const.
(display_loclists_list): New function.
(display_loc_list): Support .debug_loclists.
(display_debug_ranges_list): New function from display_debug_ranges.
(display_debug_rnglists_list): New function.
(display_debug_ranges): Support .debug_rnglists.
(debug_displays): Add .debug_line_str, .debug_loclists and
.debug_rnglists.
* dwarf.h: Include dwarf2.h
(DWARF2_Internal_LineInfo): Add li_offset_size.
(DWARF2_Internal_CompUnit): Add cu_unit_type.
(enum dwarf_section_display_enum): Add line_str.
* readelf.c (process_section_headers): Add rnglists and loclists.
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (display_block): Add parameter delimiter.
(decode_location_expression): Update display_block callers.
(read_and_display_attr_value): Add parameter delimiter.
(read_and_display_attr, display_debug_macro): Update
read_and_display_attr_value caller.
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (display_loc_list): Use dwarf_vma for offset, base_address
and off.
(display_loc_list_dwo): Use dwarf_vma for offset.
(display_debug_loc): Use dwarf_vma for offset, base_address.
(struct range_entry, range_entry_compar): Use dwarf_vma for
ranges_offset.
(display_debug_ranges): Use dwarf_vma for ranges_offset, offset and
base_address.
2017-02-23 Nick Clifton <nickc@redhat.com>
* readelf.c (display_tag_value): Use an explicit signed type for
the tag parameter.
(display_gnu_attributes): Use an unsigned integer type for
attribute tags.
(display_power_gnu_attribute): Likewise.
(display_s390_gnu_attribute): Likewise.
(display_sparc_hwcaps): Likewise.
(display_sparc_hwcaps2): Likewise.
(display_sparc_gnu_attribute): Likewise.
(display_mips_gnu_attribute): Likewise.
(display_tic6x_attribute): Likewise.
(display_raw_attribute): Likewise.
(process_attributes): Likewise.
(process_arm_specific): Delete redundant function.
(process_power_specific): Likewise.
(process_s390_specific): Likewise.
(process_sparc_specific): Likewise.
(process_tic6x_specific): Likewise.
(process_msp430x_specific): Likewise.
(display_public_gnu_attributes): New function. Displays known
information about an unknown gnu attribute.
(display_generic_attribute): New function. Calls
display_tag_value for non-nul tags.
(process_arch_specific): Call process_attributes even for
architectures not known to specifically support gnu attributes.
2017-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (decode_location_expression): Display also OP.
readelf: Restore a lost new line in version information Fix a commit 74e1a04b9787 ("More fixes for reading corrupt ELF files.") `readelf --version-info' output formatting regression where a dropped new line caused section header information from the `.gnu.version_d' version definition section to be printed on the same line as this section's first entry. For example with the `mips-linux' target we get: $ cat ver_def.s .data .globl new_foo .type new_foo, %object new_foo: .symver new_foo, foo@@ver_foo $ cat ver_def.ver { global: *foo*; local: *; }; $ as -o ver_def.o ver_def.s $ ld -e 0 --export-dynamic --version-script=ver_def.ver -o ver_def ver_def.o $ readelf -V ver_def Version symbols section '.gnu.version' contains 4 entries: Addr: 000000000000007e Offset: 0x01007e Link: 2 (.dynsym) 000: 0 (*local*) 2 (ver_foo) 1 (*global*) 2 (ver_foo) Version definition section '.gnu.version_d' contains 2 entries: Addr: 0x0000000000000088 Offset: 0x010088 Link: 3 (.dynstr) 000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: ver_def 0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_foo Version definition past end of section $ Add the new line then, to get: $ readelf -V ver_def Version symbols section '.gnu.version' contains 4 entries: Addr: 000000000000007e Offset: 0x01007e Link: 2 (.dynsym) 000: 0 (*local*) 2 (ver_foo) 1 (*global*) 2 (ver_foo) Version definition section '.gnu.version_d' contains 2 entries: Addr: 0x0000000000000088 Offset: 0x010088 Link: 3 (.dynstr) 000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: ver_def 0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_foo Version definition past end of section $ instead. binutils/ * readelf.c (process_version_sections) <SHT_GNU_verdef>: Print a new line between the heading and the first version definition entry.
2017-02-22 19:09:41 +01:00
2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Print a
new line between the heading and the first version definition
entry.
2017-02-20 Nick Clifton <nickc@redhat.com>
PR binutils/21156
* dwarf.c (cu_tu_indexes_read): Move into...
(load_cu_tu_indexes): ... here. Change the variable into
tri-state. Change the function into boolean, returning
false if the indicies could not be loaded.
(find_cu_tu_set): Return NULL if the indicies could not be
loaded.
2017-02-17 Nick Clifton <nickc@redhat.com>
PR binutils/21156
* readelf.c (find_section_in_set): Test for invalid section
indicies.
2017-02-17 Nick Clifton <nickc@redhat.com>
* readelf.c (get_section_type_name): Add decoding of GNU section
types.
2017-02-15 Nick Clifton <nickc@redhat.com>
* MAINTAINERS: (MIPS, MN10300): Move Eric Christopher to Past
Maintainers section.
2017-02-14 Nick Clifton <nickc@redhat.com>
PR binutils/21159
* readelf.c (dump_section_as_strings): Reset the start address if
no decompression is perfromed.
(dump_section_as_bytes): Likewise.
2017-02-14 Nick Clifton <nickc@redhat.com>
PR binutils/21158
* rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
empty symbol name.
2017-02-14 Nick Clifton <nickc@redhat.com>
PR binutils/21157
* stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
pairs.
(parse_number): Exit early if passed an empty string.
2017-02-14 Nick Clifton <nickc@redhat.com>
PR binutils/21155
* readelf.c (IN_RANGE): New macro. Tests for an address + offset
being within a given range.
(target_specific_reloc_handling): Use macro to test for underflow
as well as overflow of reloc offset.
2017-02-13 Nick Clifton <nickc@redhat.com>
PR binutils/21150
* nm.c (file_symbol): Add test of string length before testing
string characters.
2017-02-13 Nick Clifton <nickc@redhat.com>
PR binutils/21135
* readelf.c (dump_section_as_bytes): Handle the case where
uncompress_section_contents returns false.
(dump_section_as_bytes, load_specific_debug_section): Likewise.
2017-02-13 Nick Clifton <nickc@redhat.com>
PR binutils/21149
* readelf.c (get_compression_header): Add size parameter. Check
size against sizeof compression header before attempting to
extract the header.
(process_section_headers): Pass size to get_compression_header.
(dump_section_as_strings): Likewise.
(dump_section_as_bytes): Likewise.
(load_specific_debug_section): Likewise.
2017-02-13 Nick Clifton <nickc@redhat.com>
PR binutils/21148
* readelf.c (process_version_sections): Include size of auxillary
version information when checking for buffer overflow.
2017-02-13 Nick Clifton <nickc@redhat.com>
PR binutils/21147
* readelf.c (process_section_contents): Fix off by one error
reporting un-dumped sections.
2017-02-13 Nick Clifton <nickc@redhat.com>
PR binutils/21139
* readelf.c (target_specific_reloc_handling): Add num_syms
parameter. Check for symbol table overflow before accessing
symbol value. If reloc pointer is NULL, discard all saved state.
(apply_relocations): Pass num_syms to target_specific_reloc_handling.
Call target_specific_reloc_handling with a NULL reloc pointer
after processing all of the relocs.
2017-02-13 Nick Clifton <nickc@redhat.com>
PR binutils/21137
* readelf.c (target_specific_reloc_handling): Add end parameter.
Check for buffer overflow before writing relocated values.
(apply_relocations): Pass end to target_specific_reloc_handling.
2017-01-27 Dilyan Palauzov <dilyan.palauzov@aegee.org>
Nick Clifton <nickc@redhat.com>
PR 20343
* doc/binutils.texi (ar): Extend documentation of the --plugin
option. Include a description of where the plugins should be
located.
(nm): Likewise.
2017-01-23 Nick Clifton <nickc@redhat.com>
* MAINTAINERS: Add Bernd to Past Maintainers section.
2017-01-23 17:28:46 +01:00
(SCORE): Remove Mei Ligang as maintainer. Add to Past Maintainers
2017-01-23 17:20:57 +01:00
section.
2017-01-23 Bernd Schmidt <bschmidt@redhat.com>
* MAINTAINERS (BFIN): Remove myself as Blackfin maintainer.
2017-01-20 Andrew Burgess <andrew.burgess@embecosm.com>
* objdump.c (dump_section_header): Extract max section name length
from data parameter, use this when formatting output.
(find_longest_section_name): New function.
(dump_headers): Calculate longest section name when in wide mode,
reformat to unify printing of header line.
2017-01-18 Bernhard Rosenkranzer <bero@lindev.ch>
PR 21059
* arlex.l: Support processing with flex 2.6.3.
* deflex.l: Likewise.
2017-01-17 Dmitry Timoshkov <dmitry@baikal.ru>
* resbin.c: Optional dialog control data immediately follows
the control description without alignment.
* testsuite/binutils-all/windres/controldata.rc: New test.
source.
* testsuite/binutils-all/windres/controldata.rsd: New test.
2017-01-12 Nick Clifton <nickc@redhat.com>
PR binutils/20876
* NEWS: Mention the new feature.
* testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
New proc to test the location of separate debug info files using
the build-id method.
2017-01-10 Nick Clifton <nickc@redhat.com>
PR 21034
* stabs.c (parse_stab_members): Fix thinko checking for g++
version 1 stabs information.
2017-01-09 Nick Clifton <nickc@redhat.com>
* objdump.c (display_file): Add new parameter 'last_file'. If
last_file is true, do not call bfd_close at the end of the
function.
(main): Set the value of the last_file parameter when calling
display_file.
2017-01-09 Alan Modra <amodra@gmail.com>
* readelf.c (process_section_headers): Correct .rel.dyn/.rela.dyn
comment.
2017-01-06 Nick Clifton <nickc@redhat.com>
* MAINTAINERS: Move Paul Brook to the Past Maintainers section.
2017-01-04 Dilan Palauzov <dilyan.palauzov@aegee.org>
PR 20958
* syslex.l (option): Add noyywrap
(yywrap): Delete.
2017-01-02 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files.
2017-01-02 04:25:05 +01:00
For older changes see ChangeLog-2016
2017-01-02 04:25:05 +01:00
Copyright (C) 2017 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Local Variables:
mode: change-log
left-margin: 8
fill-column: 74
version-control: never
End: