aboutsummaryrefslogtreecommitdiff
path: root/binutils
AgeCommit message (Collapse)AuthorFilesLines
2018-03-21DT_FLAGS_1: Add Solaris bitsH.J. Lu2-0/+20
The following bits in DT_FLAGS_1 are used by Solaris: #define DF_1_KMOD 0x10000000 /* kernel module */ #define DF_1_WEAKFILTER 0x20000000 /* apply weak binding to DT_FILTER */ #define DF_1_NOCOMMON 0x40000000 /* no COMMON symbols exist */ binutils/ * readelf.c (process_dynamic_section): Also dump DF_1_KMOD, DF_1_WEAKFILTER and DF_1_NOCOMMON. include/ * elf/common.h (DF_1_KMOD): New. (DF_1_WEAKFILTER): Likewise. (DF_1_NOCOMMON): Likewise.
2018-03-20Updated Russian and Spanish translations for the binutils/ sub-directory.Nick Clifton3-4758/+12056
* po/es.po: Updated Spanish translation. * po/ru.po: Updated Russian translation.
2018-03-13Prevent a buffer overrun when parsing corrupt STABS debug information.Nick Clifton2-1/+10
PR 22957 * stabs.c (pop_binincl): Fail if the file index is off the end of the stack.
2018-03-13Add range changing to STABS parsing functions, in order to prevent buffer ↵Nick Clifton2-144/+284
overruns. PR 22955 * stabs.c (parse_number): Add p_end parameter and use it to check the validity of the pp parameter. Add checks to prevent walking off the end of the string buffer. (parse_stab_string): Likewise. (parse_stab_type): Likewise. (parse_stab_type_number): Likewise. (parse_stab_range_type): Likewise. (parse_stab_sun_builtin_type): Likewise. (parse_stab_sun_floating_type): Likewise. (parse_stab_enum_type): Likewise. (parse_stab_struct_type): Likewise. (parse_stab_baseclasses): Likewise. (parse_stab_struct_fields): Likewise. (parse_stab_cpp_abbrev): Likewise. (parse_stab_one_struct_field): Likewise. (parse_stab_members): Likewise. (parse_stab_tilde_field): Likewise. (parse_stab_array_type): Likewise. * parse_stab: Compute the end of the string and then pass it on to individual parser functions.
2018-03-07Fix PR binutils/22923.Paul Pluzhnikov2-1/+7
A static buffer in get_ver_flags may overflow when e.g. German translation is longer than English original. Avoid that by expanding the buffer.
2018-03-07XCOFF disassemblerAlan Modra3-2/+7
xcoff (32-bit) objdump accepted but ignored -M options unless -mpowerpc was also given. This patch fixes that, leaving the default as -Mpwr for xcoff. I've also enabled more tests for xcoff targets. binutils/ * configure.ac: Add objdump_private_desc_xcoff for rs6000. * configure: Regenerate. gas/ * testsuite/gas/ppc/aix.exp: Run for rs6000 too. * testsuite/gas/ppc/ppc.exp: Run more tests for non-ELF targets. * testsuite/gas/ppc/machine.d: Don't run for PE targets. opcodes/ * disassemble.c (disassembler): Use bfd_arch_powerpc entry for bfd_arch_rs6000. * disassemble.h (print_insn_rs6000): Delete. * ppc-dis.c (powerpc_init_dialect): Handle rs6000. (disassemble_init_powerpc): Call powerpc_init_dialect for rs6000. (print_insn_rs6000): Delete.
2018-03-05Use binary search on dynamic relocationsH.J. Lu2-19/+50
Replace linear search with binary search on dynamic relocations. After finding a match, scan backward to the first matching relocation, then scan forward for a matching relocation with non-absolute symbol. On Fedora 27 x86-64, time for "objdump -d" on libxul.so from RHEL 7.4 x86-64 went from 134.46user 0.12system 2:15.03elapsed to 8.49user 0.14system 0:08.64elapsed PR binutils/22911 * objdump.c (is_significant_symbol_name): Return TRUE for all .plt* sections. (find_symbol_for_address): Replace linear search with binary search on dynamic relocations.
2018-03-01Prevent illegal memory accesses triggerd by intger overflow when parsing ↵Nick Clifton2-0/+21
corrupt DWARF information on a 32-bit host. PR 22905 * dwarf.c (display_debug_ranges): Check that the offset loaded from the range_entry structure is valid.
2018-03-01Add missing translations to ALL_LINGUASAlan Modra3-2/+7
binutils/ * configure.ac (ALL_LINGUAS): Add sr. Sort. * configure: Regenerate. gas/ * configure.ac (ALL_LINGUAS): Add uk. Sort. * configure: Regenerate. gprof/ * configure.ac (ALL_LINGUAS): Add it, ro, ru, uk. Sort. * configure: Regenerate. ld/ * configure.ac (ALL_LINGUAS): Add ja. Sort. * configure: Regenerate. opcodes/ * configure.ac (ALL_LINGUAS): Sort. * configure: Regenerate.
2018-02-27Add a new Portuguese translation for the binutils sub-directory, and update ↵Nick Clifton4-2/+11959
the Russian translation for the gas sub-directory. gas * po/ru.po: Updated Russian translation. binutils* po/pt.po: New Portuguese translation. * configure.ac (ALL_LINGUAS): Add pt. * configure: Regenerate.
2018-02-27Have info_to_howto functions return a success/fail status. Check this ↵Nick Clifton6-3/+46
result. Stop strip from completeing if one of these functions fails. bfd PR 22875 * elf-bfd.h (struct elf_backend_data): Change the return type of the elf_info_to_howto and elf_info_to_howto_rel function pointers to bfd_boolean. * elfcode.h (elf_slurp_reloc_table_from_section): Check the return value from the info_to_howto function and fail if that function failed. * elf32-h8300.c (elf32_h8_relocate_section): Check return value from the info_to_howto function. (elf32_h8_relax_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. (riscv_elf_relocate_section): Likewise. * elf-hppa.h (elf_hppa_info_to_howto): Change return type to bfd_boolean. Issue an error message, set an error value and return FALSE if the reloc is not recognized. (elf_hppa_info_to_howto_rel): Likewise. * elf-m10200.c (mn10200_info_to_howto): Likewise. * elf-m10300.c (mn10300_info_to_howto): Likewise. * elf.c (_bfd_elf_no_info_to_howto): Likewise. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-arm.c (elf32_arm_info_to_howto): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-bfin.c (bfin_info_to_howto): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise. * elf32-cris.c (elf_cr16c_info_to_howto_rel, cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela): Likewise. * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto, elf32_dlx_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela, frvfdpic_info_to_howto_rel): Likewise. * elf32-ft32.c (ft32_info_to_howto_rela): Likewise. * elf32-gen.c (elf_generic_info_to_howto, elf_generic_info_to_howto_rel): Likewise. * elf32-h8300.c (elf32_h8_info_to_howto, elf32_h8_info_to_howto_rel): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup, elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise. * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68k.c (rtype_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto): Likewise. * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-pru.c (pru_elf32_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-s390.c (elf_s390_info_to_howto): Likewise. * elf32-score.c (s3_bfd_score_info_to_howto, _bfd_score_info_to_howto): Likewise. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-tic6x.c (elf32_tic6x_info_to_howto, elf32_tic6x_info_to_howto_rel): Likewise. * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rel, v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-wasm32.c (elf32_wasm32_rtype_to_howto, elf32_wasm32_info_to_howto_rela): Likewise. * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-gen.c (elf_generic_info_to_howto, elf_generic_info_to_howto_rel): Likewise. * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto): Likewise. * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise. * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise. * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise. * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise. * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise. * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype. * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype. * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel): Default to NULL. binutils PR 22875 * objcopy.c (copy_object): Check the error status after marking symbols used in relocations. * testsuite/binutils-all/strip-13.s: New test source file. * testsuite/binutils-all/strip-13.s: New test driver file. * testsuite/binutils-all/objcopy.exp: Run the new test.
2018-02-26BFD messagesAlan Modra3-2/+7
bfd/ * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c, * syms.c: Standardize error/warning messages. binutils/ * testsuite/binutils-all/mips/mips-reginfo-n32.d, * testsuite/binutils-all/mips/mips-reginfo.d: Update. gas/ * testsuite/gas/mips/reginfo-2.l: Update. ld/ * testsuite/ld-arm/cmse-implib-errors.out, * testsuite/ld-arm/cmse-new-earlier-later-implib.out, * testsuite/ld-arm/cmse-new-implib-not-sg-in-implib.out, * testsuite/ld-arm/cmse-new-wrong-implib.out, * testsuite/ld-arm/cmse-veneers-no-gnu_sgstubs.out, * testsuite/ld-arm/cmse-veneers-wrong-entryfct.out, * testsuite/ld-cris/badgotr1.d, * testsuite/ld-cris/tls-err-24.d, * testsuite/ld-cris/tls-err-25.d, * testsuite/ld-cris/tls-err-26.d, * testsuite/ld-cris/tls-err-27.d, * testsuite/ld-cris/tls-err-28.d, * testsuite/ld-cris/tls-err-40.d, * testsuite/ld-cris/tls-err-44.d, * testsuite/ld-cris/tls-err-48.d, * testsuite/ld-cris/tls-err-52.d, * testsuite/ld-cris/tls-err-53.d, * testsuite/ld-cris/tls-err-55.d, * testsuite/ld-cris/tls-err-56.d, * testsuite/ld-cris/tls-err-62.d, * testsuite/ld-cris/tls-err-65.d, * testsuite/ld-cris/tls-err-77.d, * testsuite/ld-elf/empty-implib.out, * testsuite/ld-elf/indirect.exp: Update.
2018-02-26MIPS messagesAlan Modra3-2/+7
More standardization of messages. bfd/ * elfxx-mips.c: Standardize error/warning messages. binutils/ * testsuite/binutils-all/mips/mips-reginfo-n32.d, * testsuite/binutils-all/mips/mips-reginfo.d: Update. gas/ * testsuite/gas/mips/reginfo-2.l: Update. ld/ * testsuite/ld-mips-elf/attr-gnu-4-12.d, * testsuite/ld-mips-elf/attr-gnu-4-13.d, * testsuite/ld-mips-elf/attr-gnu-4-14.d, * testsuite/ld-mips-elf/attr-gnu-4-16.d, * testsuite/ld-mips-elf/attr-gnu-4-17.d, * testsuite/ld-mips-elf/attr-gnu-4-18.d, * testsuite/ld-mips-elf/attr-gnu-4-19.d, * testsuite/ld-mips-elf/attr-gnu-4-21.d, * testsuite/ld-mips-elf/attr-gnu-4-23.d, * testsuite/ld-mips-elf/attr-gnu-4-24.d, * testsuite/ld-mips-elf/attr-gnu-4-25.d, * testsuite/ld-mips-elf/attr-gnu-4-26.d, * testsuite/ld-mips-elf/attr-gnu-4-27.d, * testsuite/ld-mips-elf/attr-gnu-4-28.d, * testsuite/ld-mips-elf/attr-gnu-4-29.d, * testsuite/ld-mips-elf/attr-gnu-4-31.d, * testsuite/ld-mips-elf/attr-gnu-4-32.d, * testsuite/ld-mips-elf/attr-gnu-4-34.d, * testsuite/ld-mips-elf/attr-gnu-4-35.d, * testsuite/ld-mips-elf/attr-gnu-4-36.d, * testsuite/ld-mips-elf/attr-gnu-4-37.d, * testsuite/ld-mips-elf/attr-gnu-4-38.d, * testsuite/ld-mips-elf/attr-gnu-4-39.d, * testsuite/ld-mips-elf/attr-gnu-4-41.d, * testsuite/ld-mips-elf/attr-gnu-4-42.d, * testsuite/ld-mips-elf/attr-gnu-4-43.d, * testsuite/ld-mips-elf/attr-gnu-4-45.d, * testsuite/ld-mips-elf/attr-gnu-4-46.d, * testsuite/ld-mips-elf/attr-gnu-4-47.d, * testsuite/ld-mips-elf/attr-gnu-4-48.d, * testsuite/ld-mips-elf/attr-gnu-4-49.d, * testsuite/ld-mips-elf/attr-gnu-4-52.d, * testsuite/ld-mips-elf/attr-gnu-4-53.d, * testsuite/ld-mips-elf/attr-gnu-4-54.d, * testsuite/ld-mips-elf/attr-gnu-4-58.d, * testsuite/ld-mips-elf/attr-gnu-4-59.d, * testsuite/ld-mips-elf/attr-gnu-4-61.d, * testsuite/ld-mips-elf/attr-gnu-4-62.d, * testsuite/ld-mips-elf/attr-gnu-4-63.d, * testsuite/ld-mips-elf/attr-gnu-4-64.d, * testsuite/ld-mips-elf/attr-gnu-4-68.d, * testsuite/ld-mips-elf/attr-gnu-4-69.d, * testsuite/ld-mips-elf/attr-gnu-4-71.d, * testsuite/ld-mips-elf/attr-gnu-4-72.d, * testsuite/ld-mips-elf/attr-gnu-4-73.d, * testsuite/ld-mips-elf/attr-gnu-4-74.d, * testsuite/ld-mips-elf/attr-gnu-4-78.d, * testsuite/ld-mips-elf/attr-gnu-4-79.d, * testsuite/ld-mips-elf/attr-gnu-4-81.d, * testsuite/ld-mips-elf/attr-gnu-4-89.d, * testsuite/ld-mips-elf/attr-gnu-8-12.d, * testsuite/ld-mips-elf/attr-gnu-8-21.d, * testsuite/ld-mips-elf/bal-jalx-pic-micromips-n32.d, * testsuite/ld-mips-elf/bal-jalx-pic-micromips-n64.d, * testsuite/ld-mips-elf/bal-jalx-pic-micromips.d, * testsuite/ld-mips-elf/bal-jalx-pic-n32.d, * testsuite/ld-mips-elf/bal-jalx-pic-n64.d, * testsuite/ld-mips-elf/bal-jalx-pic.d, * testsuite/ld-mips-elf/mode-change-error-1.d, * testsuite/ld-mips-elf/unaligned-branch-2.d, * testsuite/ld-mips-elf/unaligned-branch-ignore-2.d, * testsuite/ld-mips-elf/unaligned-branch-ignore-micromips.d, * testsuite/ld-mips-elf/unaligned-branch-ignore-mips16.d, * testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1.d, * testsuite/ld-mips-elf/unaligned-branch-micromips.d, * testsuite/ld-mips-elf/unaligned-branch-mips16.d, * testsuite/ld-mips-elf/unaligned-branch-r6-1.d, * testsuite/ld-mips-elf/unaligned-branch-r6-2.d, * testsuite/ld-mips-elf/unaligned-branch.d, * testsuite/ld-mips-elf/unaligned-jalx-1.d, * testsuite/ld-mips-elf/unaligned-jalx-3.d, * testsuite/ld-mips-elf/unaligned-jalx-addend-1.d, * testsuite/ld-mips-elf/unaligned-jalx-addend-3.d, * testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d, * testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d, * testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d, * testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d, * testsuite/ld-mips-elf/unaligned-jump-micromips.d, * testsuite/ld-mips-elf/unaligned-jump-mips16.d, * testsuite/ld-mips-elf/unaligned-jump.d: Update.
2018-02-20Fix typo in listing of objcopy's command line options.Ronald Hoogenboom2-1/+6
binutils* doc/binutils.texi (objcopy): Add missing closing square parenthesis to listing of objcopy's command line options.
2018-02-19Fix mistake in the declaration of the --include-all-whitespace option of the ↵Matthias Klose2-1/+6
strings utility. * strings.c (long_options): Include-all-whitespace does not take an extra agument.
2018-02-13PR22836, "-r -s" doesn't work with -g3 using GCC 7Alan Modra6-0/+61
This fixes the case where all of a group is removed with ld -r, the situation in the PR, and failures where part of a group is removed that contain relocs. bfd/ PR 22836 * elf.c (_bfd_elf_fixup_group_sections): Account for removed relocation sections. If size reduces to just the flag word, remove that too and mark with SEC_EXCLUDE. * elflink.c (bfd_elf_final_link): Strip empty group sections. binutils/ * testsuite/binutils-all/group-7.s, * testsuite/binutils-all/group-7a.d, * testsuite/binutils-all/group-7b.d, * testsuite/binutils-all/group-7c.d: New tests. * testsuite/binutils-all/objcopy.exp: Run them. ld/ * testsuite/ld-elf/pr22836-2.d, * testsuite/ld-elf/pr22836-2.s: New test.
2018-02-08Speed up readelf and objdump by not looking for DWO links unless the user ↵Nick Clifton2-0/+12
has requested that they be displayed/followed. PR 22802 * dwarf.c (load_separate_debug_file): Return early if the user is not interested in debug links.
2018-02-06Replace reachable assertion with a test and return of NULL.Nick Clifton2-1/+21
PR 22793 * readelf.c (find_section): Replace assertion with test and return of NULL. (find_section_by_address): Add test of section header table existance. (find_section_by_type): Likewise. (find_section_in_set): Likewise.
2018-02-05MIPS/BFD: Correctly report unsupported `.reginfo' section sizeMaciej W. Rozycki5-0/+27
Report an error when an unsupported `.reginfo' section size is found in `_bfd_mips_elf_section_processing', removing an assertion that triggers at elfxx-mips.c:7105 in GAS when assembling input like: .section .reginfo .word 0xdeadbeef and in `objcopy --rename-section' when renaming an incorrectly sized section to `.reginfo'. bfd/ * elfxx-mips.c (_bfd_mips_elf_section_processing): For SHT_MIPS_REGINFO sections don't assert the correct size and report an error instead. binutils/ * testsuite/binutils-all/mips/mips-reginfo.d: New test. * testsuite/binutils-all/mips/mips-reginfo-n32.d: New test. * testsuite/binutils-all/mips/mips-reginfo.s: New test source. * testsuite/binutils-all/mips/mips.exp: Run the new tests. gas/ * testsuite/gas/mips/reginfo-2.d: New test. * testsuite/gas/mips/reginfo-2-n32.d: New test. * testsuite/gas/mips/reginfo-2.l: New test stderr output. * testsuite/gas/mips/reginfo-2.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests.
2018-02-05binutils/testsuite: Support stderr options with `run_dump_test'Maciej W. Rozycki3-43/+157
Add support for the `error', `error_output', `warning' and `warning_output' options for `run_dump_test' input files, based on the version of the procedure in ld/testsuite/lib/ld-lib.exp and providing compatible semantics. These options apply to PROG under test and let test cases specify output expected on stderr as well as express a requirement for PROG to exit unsuccessfully. Messages to match against can be supplied either inline or fetched from a named file. Update procedure description in the introductory comment accordingly. As the exit status from `remote_exec' is regrettably lost in our default implementation of `binutils_run', which is user-overridable, avoid changing this procedure's API and use a global `binutils_run_status' variable to pass the status up to the caller, similarly to how `binutils_run_failed' is handled. Document the new variable in the respective introductory comments. binutils/ * testsuite/config/default.exp (binutils_run): Document `binutils_run_status'. * testsuite/lib/utils-lib.exp (default_binutils_run): Likewise, and set it. (run_dump_test): Add `error', `error_output', `warning' and `warning_output' options. Update documentation accordingly.
2018-02-02binutils/riscv: Register names in DWARF outputAndrew Burgess4-0/+40
Adds a register name table for RiscV so that objdump and readelf can both use better register names. binutils/ChangeLog: * dwarf.c (dwarf_regnames_riscv): New register name table. (init_dwarf_regnames_riscv): New function. (init_dwarf_regnames): Add call to initialise RiscV register names. * dwarf.h (init_dwarf_regnames_riscv): Declare. * objdump.c (dump_dwarf): Add call to initialise RiscV register names.
2018-02-01PR22769, crash when running 32-bit objdump on corrupted fileAlan Modra2-2/+11
PR 22769 * objdump.c (load_specific_debug_section): Check for overflow when adding one to section size for a string section terminator.
2018-01-30Update description of nm's symbol bss type letters.Nick Clifton2-2/+12
PR 22734 * doc/binutils.texi (nm): Update description to point out that zero-initialized values can also be shown as type B, b, S or s since they can be stored in the BSS section.
2018-01-3032-bit objcopy build failAlan Modra2-2/+7
* objcopy.c (merge_gnu_build_notes): Use (bfd_vma) -1 as "artificially large" end address.
2018-01-28Update release notes with a reminder to check the gpg key being used.Nick Clifton2-2/+13
* README-how-to-make-a-release: Add note about checking gpg key and the results of gnupload.
2018-01-27Update documentation on making a releaseNick Clifton2-4/+100
2018-01-26Update notes on making a releaseNick Clifton2-24/+46
2018-01-22binutils/doc: Fix a "using" typo in `objcopy --rename-section' descriptionMaciej W. Rozycki2-1/+6
binutils/ * doc/binutils.texi (objcopy): Fix a typo in `--rename-section' option description.
2018-01-22MAINTAINERS: Update my company e-mail addressMaciej W. Rozycki2-1/+5
Following my recent transition from Imagination Technologies to the reincarnated MIPS company update MAINTAINERS entries accordingly. binutils/ * MAINTAINERS: Update my company e-mail address. gdb/ * MAINTAINERS: Update my company e-mail address. sim/ * MAINTAINERS: Update my company e-mail address.
2018-01-22Update Swedish translation for the binutils sub-directoryNick Clifton2-1640/+2082
2018-01-18Update Bulgarian translation of the binutils sub-directoryNick Clifton3-1606/+2057
2018-01-16binutils release procedure: Add AI to update branch name in crontabJoel Brobecker2-6/+24
binutils/ChangeLog: * README-how-to-make-a-release: Add reminder to update the branch name in gdbadmin's crontab on sourceware.
2018-01-16Update translations for various binutils components.Nick Clifton2-1652/+2167
ld * po/pt_BR.po: Updated Brazilian Portugese translation. opcodes * po/pt_BR.po: Updated Brazilian Portugese translation. * po/de.po: Updated German translation. gas * po/fr.po: Updated French translation. binutils* po/fr.po: Updated French translation.
2018-01-16Remove trailing spaces in binutils/README-how-to-make-a-releaseJoel Brobecker2-15/+19
binutils/ChangeLog: * README-how-to-make-a-release: Remove trailing spaces.
2018-01-15Update Ukranian translations for bfd, binutils, gas, gold, ld and opcodesNick Clifton2-1644/+2262
2018-01-13Update notes on how to make a releaseNick Clifton2-12/+10
2018-01-13Update pot filesNick Clifton2-1562/+1976
2018-01-13Bump version number to 2.30.51Nick Clifton3-10/+15
bfd/ * version.m4: Bump version to 2.30.51 * configure: Regenerate. binutils/ * configure: Regenerate. gas/ * configure: Regenerate. gprof/ * configure: Regenerate. ld/ * configure: Regenerate. opcodes/ * configure: Regenerate.
2018-01-13Add note about 2.30 branch creation to changelogsNick Clifton2-0/+2
2018-01-13Add 2.30 markers to NEWS files.Nick Clifton4-3/+14
binutils/ * NEWS: Add marker for 2.30. gas/ * NEWS: Add marker for 2.30. ld/ * NEWS: Add marker for 2.30.
2018-01-12Add notes on how to make a branch and a pre-release snapshot.Nick Clifton3-0/+80
* README-how-to-make-a-release: Add notes on how to make the branch and prelease snapshot. * BRANCHES: Add binutils-2_29-branch.
2018-01-10Update top level configure files by synchronizing them with gcc.Nick Clifton2-1/+10
. * config-ml.in: Sync with gcc sources. * config.guess: Likewise. * config.sub: Likewise. * configure.ac: Likewise. * configure: Regenerate. config * Sync with GCC sources: 2017-11-14 Boris Kolpackov <boris@codesynthesis.com> * gcc-plugin.m4: Add support for MinGW. 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com> * cet.m4: New file. 2017-11-15 Alexandre Oliva <aoliva@redhat.com> * bootstrap-debug-lean.mk (do-compare): Use the contrib/compare-debug script. 2017-10-24 H.J. Lu <hongjiu.lu@intel.com> * bootstrap-cet.mk: New file. 2017-06-19 Martin Liska <mliska@suse.cz> * bootstrap-lto-noplugin.mk: Enable -flto in all PGO stages. * bootstrap-lto.mk: Likewise. 2017-06-03 Eric Botcazou <ebotcazou@adacore.com> * mt-android: New file. 2017-02-13 Richard Biener <rguenther@suse.de> * isl.m4: Remove support for ISL 0.14. 2017-01-19 Uros Bizjak <ubizjak@gmail.com> PR target/78478 * ax_check_define.m4: New file. 2017-01-17 Jakub Jelinek <jakub@redhat.com> PR other/79046 * acx.m4 (GCC_BASE_VER): New m4 function. (ACX_TOOL_DIRS): Require GCC_BASE_VER, for --with-gcc-major-version-only use just major number from BASE-VER. 2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR go/78978 * hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.
2018-01-03Fix compile time warning introduced by previous delta.Nick Clifton2-2/+7
* objcopy.c (merge_gnu_build_notes): Add cast to maximum address constants.
2018-01-03Add support for v3 binary annotation notes.Nick Clifton19-278/+741
I am checking in the attached patch which updates the binutils support for version 3 binary annotation notes. (Version 3 adds an end address to the ranges covered by the notes, so that it is possible to detect gaps in the coverage). This patch also stops the note merging feature of objcopy from executing if the notes have relocations against them. This makes the code simpler, and prevents the problems with architectures which have unusual relocation management issues. * objcopy.c (objcopy_internal_note): New structure. (gap_exists): New function. (is_open_note): New function. (is_func_note): New function. (is_64bit): New function. (merge_gnu_build_notes): Handle v3 notes. Do not merge if there are relocations against the notes. * readelf.c (get_note_type): Use short names for build attribute notes. (print_symbol_for_build_attribute): Rename to get_symbol_for_build_attribute. Returns the found symbol rather than printing it. (print_gnu_build_attribute_description): Maintain address ranges for function notes as well as global notes. Handle v3 notes. (print_gnu_build_attribute_name): Use more space for printing the name in wide mode. * testsuite/binutils-all/note-2-32.s: Use .dc.l instead of .word. Eliminate symbol references in order to remove the need for relocations. * testsuite/binutils-all/note-2-64.s: Likewise. * testsuite/binutils-all/note-3-32.s: Add a size to the note_1 symbol. * testsuite/binutils-all/note-3-64.s: Likewise. * testsuite/binutils-all/mips/mips-note-2r-n32.d: Update expected output. * testsuite/binutils-all/mips/mips-note-2r-n64.d: Likewise. * testsuite/binutils-all/mips/mips-note-2r.d: Likewise. * testsuite/binutils-all/note-2-32.d: Likewise. * testsuite/binutils-all/note-2-64.d: Likewise. * testsuite/binutils-all/note-3-32.d: Likewise. * testsuite/binutils-all/note-3-64.d: Likewise. * testsuite/binutils-all/note-4-64.s: New test. Checks v3 notes. * testsuite/binutils-all/note-4-32.s: New test. * testsuite/binutils-all/note-4-64.d: New test result file. * testsuite/binutils-all/note-4-32.d: New test result file.
2018-01-03Update year range in copyright notice of binutils filesAlan Modra141-141/+145
2018-01-03ChangeLog rotationAlan Modra2-1874/+1888
2017-12-19Stop readelf from complaining about relocation sections with an sh_info ↵Nick Clifton2-5/+15
field of 0 in dynamic executables. PR 22587 * readelf.c (process_section_headers): Do not complain about an sh_info field of 0 in relocation sections of ET_EXEC or ET_DYN type executables.
2017-12-19Test binutils_assemble return valueAlan Modra12-290/+323
This is a followup to "binutils nm testsuite tidy". Since the perror in binutils_assemble has been removed, we need to take more care in failure paths. The patch also fixed a number of .exp files that have multiple tests, where an assembly failure returns from the .exp file. In most cases it is nicer to attempt all tests. * testsuite/binutils-all/ar.exp (unique_symbol): Don't run AR if assembly fails. * testsuite/binutils-all/arc/objdump.exp (check_assembly): If objfile is empty, fail test. * testsuite/binutils-all/arm/objdump.exp: Don't return if assembly fails for a test, continue on to other tests. * testsuite/binutils-all/bfin/objdump.exp: Likewise. * testsuite/binutils-all/hppa/objdump.exp: Likewise. * testsuite/binutils-all/m68k/objdump.exp: Likewise. * testsuite/binutils-all/vax/objdump.exp: Likewise. * testsuite/binutils-all/size.exp: Likewise. * testsuite/binutils-all/nm.exp: Likewise. Move PR12753 test. * testsuite/binutils-all/objcopy.exp: Don't perror on assembly fail. * testsuite/binutils-all/objdump.exp: Report assembly fails.
2017-12-18Decode expression lists used with DW_AT_byte_size and other DWARF attributes.Nick Clifton2-0/+23
PR 22532 * dwarf.c (read_and_display_attr_value): Add attributes that might use the DW_FORM_exprloc form, and if so, display the decoded location expression list.
2017-12-14binutils nm testsuite tidyAlan Modra3-26/+23
We can run the gnu_unique_object symbol test on all ELF targets. Those that don't support the symbol type and fail to assemble can just be resolved as "unsupported". This means binutils_assemble can't report an error on assembly failure, but it probably should never have done that anyway. * testsuite/lib/utils-lib.exp (default_binutils_assemble_flags): Don't perror on assembler diagnostic output. * testsuite/binutils-all/nm.exp: Run unique symbol test on all ELF targets. Resolve as "unsupported" on assembly failure.