1. 17 May, 2016 1 commit
    • Maciej W. Rozycki's avatar
      LD/ELF: Unify STB_GNU_UNIQUE handling · a43942db
      Maciej W. Rozycki authored
      Take STB_GNU_UNIQUE handling scattered across targets and gather it in
      the generic ELF linker.  Update test suite infrastructure accordingly.
      	* elf-s390-common.c (elf_s390_add_symbol_hook): Remove
      	STB_GNU_UNIQUE handling.
      	* elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
      	* elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
      	* elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
      	* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
      	* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
      	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
      	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
      	* elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
      	* elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
      	* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
      	* elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
      	(elf_backend_add_symbol_hook): Remove macro.
      	* elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
      	for STB_GNU_UNIQUE symbols.
      	* testsuite/lib/binutils-common.exp (supports_gnu_unique): New
      	* testsuite/binutils-all/objcopy.exp: Use `supports_gnu_unique'
      	with the `strip-10' test.
      	* testsuite/ld-unique/unique.exp: Use `is_elf_format' and
      	`supports_gnu_unique' to qualify testing.
  2. 16 May, 2016 1 commit
    • Maciej W. Rozycki's avatar
      V850/BFD: Call `_bfd_elf_copy_private_bfd_data' again · 71de3413
      Maciej W. Rozycki authored
      Correct a regression introduced with commit 685080f2 ("Adds support
      for generating notes in V850 binaries.") which replaced rather than
      extending the call to `_bfd_elf_copy_private_bfd_data' with
      `v850_elf_copy_private_bfd_data'.  Consequently ELFOSABI_GNU marking is
      not propagated to output by `objcopy' from objects containing
      STB_GNU_UNIQUE symbols.
      	* elf32-v850.c (v850_elf_copy_notes): New function, factored out
      	(v850_elf_copy_private_bfd_data): ... here.  Call the new
      	function and `_bfd_elf_copy_private_bfd_data'.
      	* testsuite/binutils-all/objcopy.exp: Don't skip the `strip-10'
      	test for the V850.
  3. 26 Feb, 2016 1 commit
    • H.J. Lu's avatar
      Properly implement STT_COMMON · b8871f35
      H.J. Lu authored
      The BFD configure option, --enable-elf-stt-common, can't be to used to
      verify STT_COMMON implementation with the normal binutils build.  Instead,
      this patch removes it from BFD.  It adds --elf-stt-common=[no|yes] to ELF
      assembler/objcopy and adds -z common/-z nocommon to ld.
      A configure option, --enable-elf-stt-common, is added to gas to specify
      whether ELF assembler should generate common symbols with the STT_COMMON
      type by default.
      Since BSF_KEEP_G is never used, it is renamed to BSF_ELF_COMMON for ELF
      common symbols.
      	PR ld/19645
      	* bfd.c (bfd): Change flags to 20 bits.
      	(BFD_USE_ELF_STT_COMMON): Likewise.
      	(BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
      	* configure.ac: Remove --enable-elf-stt-common.
      	* elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
      	common symbol depending on BFD_CONVERT_ELF_COMMON and
      	* elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
      	* elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
      	(elf_link_convert_common_type): New function.
      	(elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
      	common symbol depending on BFD_CONVERT_ELF_COMMON and
      	BFD_USE_ELF_STT_COMMON.  Set sym.st_info after sym.st_shndx.
      	* elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
      	and BFD_USE_ELF_STT_COMMON to object_flags.
      	(TARGET_LITTLE_SYM): Likewise.
      	* syms.c (BSF_KEEP_G): Renamed to ...
      	(BSF_ELF_COMMON): This.
      	* bfd-in2.h: Regenerated.
      	* config.in: Likewise.
      	* configure: Likewise.
      	PR ld/19645
      	* NEWS: Mention --elf-stt-common= for objcopy.
      	* doc/binutils.texi: Document --elf-stt-common= for objcopy.
      	* objcopy.c (do_elf_stt_common): New.
      	(command_line_switch): Add OPTION_ELF_STT_COMMON.
      	(copy_options): Add --elf-stt-common=.
      	(copy_usage): Add --elf-stt-common=.
      	(copy_object): Also check do_elf_stt_common for ELF targets.
      	(copy_file): Handle do_elf_stt_common.
      	(copy_main): Handle OPTION_ELF_STT_COMMON.
      	* readelf.c (apply_relocations): Support STT_COMMON.
      	* testsuite/binutils-all/common-1.s: New file.
      	* testsuite/binutils-all/common-1a.d: Likewise.
      	* testsuite/binutils-all/common-1b.d: Likewise.
      	* testsuite/binutils-all/common-1c.d: Likewise.
      	* testsuite/binutils-all/common-1d.d: Likewise.
      	* testsuite/binutils-all/common-1e.d: Likewise.
      	* testsuite/binutils-all/common-1f.d: Likewise.
      	* testsuite/binutils-all/common-2.s: Likewise.
      	* testsuite/binutils-all/common-2a.d: Likewise.
      	* testsuite/binutils-all/common-2b.d: Likewise.
      	* testsuite/binutils-all/common-2c.d: Likewise.
      	* testsuite/binutils-all/common-2d.d: Likewise.
      	* testsuite/binutils-all/common-2e.d: Likewise.
      	* testsuite/binutils-all/common-2f.d: Likewise.
      	* testsuite/binutils-all/objcopy.exp
      	(objcopy_test_elf_common_symbols): New proc.
      	Run objcopy_test_elf_common_symbols for ELF targets
      	PR ld/19645
      	* NEWS: Mention --enable-elf-stt-common and --elf-stt-common=
      	for ELF assemblers.
      	* as.c (flag_use_elf_stt_common): New.
      	(show_usage): Add --elf-stt-common=.
      	(option_values): Add OPTION_ELF_STT_COMMON.
      	(std_longopts): Add --elf-stt-common=.
      	(parse_args): Handle --elf-stt-common=.
      	* as.h (flag_use_elf_stt_common): New.
      	* config.in: Regenerated.
      	* configure: Likewise.
      	* configure.ac: Add --enable-elf-stt-common and define
      	* gas/write.c (write_object_file): Set BFD_CONVERT_ELF_COMMON
      	and BFD_USE_ELF_STT_COMMON if flag_use_elf_stt_common is set.
      	* doc/as.texinfo: Document --elf-stt-common=.
      	* testsuite/gas/elf/common3.s: New file.
      	* testsuite/gas/elf/common3a.d: Likewise.
      	* testsuite/gas/elf/common3b.d: Likewise.
      	* testsuite/gas/elf/common4.s: Likewise.
      	* testsuite/gas/elf/common4a.d: Likewise.
      	* testsuite/gas/elf/common4b.d: Likewise.
      	* testsuite/gas/i386/dw2-compress-3b.d: Likewise.
      	* testsuite/gas/i386/dw2-compressed-3b.d: Likewise.
      	* testsuite/gas/elf/elf.exp: Run common3a, common3b, common4a
      	and common4b.
      	* testsuite/gas/i386/dw2-compress-3.d: Renamed to ...
      	* testsuite/gas/i386/dw2-compress-3a.d: This.  Pass
      	--elf-stt-common=no to as.
      	* testsuite/gas/i386/dw2-compressed-3.d: Renamed to ...
      	* testsuite/gas/i386/dw2-compressed-3a.d: This.  Pass
      	--elf-stt-common=no to as.
      	* testsuite/gas/i386/i386.exp: Run dw2-compress-3a,
      	dw2-compress-3b, dw2-compressed-3a and dw2-compressed-3b instead
      	of dw2-compress-3 and dw2-compressed-3.
      	PR ld/19645
      	* bfdlink.h (bfd_link_elf_stt_common): New enum.
      	(bfd_link_info): Add elf_stt_common.
      	PR ld/19645
      	* NEWS: Mention -z common/-z nocommon for ELF targets.
      	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
      	-z common and -z nocommon.
      	* ld.texinfo: Document -z common/-z nocommon.
      	* lexsup.c (elf_shlib_list_options): Add -z common/-z nocommon.
      	* testsuite/ld-elf/tls_common.exp: Test --elf-stt-common=no and
      	--elf-stt-common=yes with assembler.
      	* testsuite/ld-elfcomm/common-1.s: New file.
      	* testsuite/ld-elfcomm/common-1a.d: Likewise.
      	* testsuite/ld-elfcomm/common-1b.d: Likewise.
      	* testsuite/ld-elfcomm/common-1c.d: Likewise.
      	* testsuite/ld-elfcomm/common-1d.d: Likewise.
      	* testsuite/ld-elfcomm/common-1e.d: Likewise.
      	* testsuite/ld-elfcomm/common-1f.d: Likewise.
      	* testsuite/ld-elfcomm/common-2.s: Likewise.
      	* testsuite/ld-elfcomm/common-2a.d: Likewise.
      	* testsuite/ld-elfcomm/common-2b.d: Likewise.
      	* testsuite/ld-elfcomm/common-2c.d: Likewise.
      	* testsuite/ld-elfcomm/common-2d.d: Likewise.
      	* testsuite/ld-elfcomm/common-2e.d: Likewise.
      	* testsuite/ld-elfcomm/common-2f.d: Likewise.
      	* testsuite/ld-elfcomm/common-3a.rd: Likewise.
      	* testsuite/ld-elfcomm/common-3b.rd: Likewise.
      	* testsuite/ld-i386/pr19645.d: Likewise.
      	* testsuite/ld-i386/pr19645.s: Likewise.
      	* testsuite/ld-x86-64/largecomm-1.s: Likewise.
      	* testsuite/ld-x86-64/largecomm-1a.d: Likewise.
      	* testsuite/ld-x86-64/largecomm-1b.d: Likewise.
      	* testsuite/ld-x86-64/largecomm-1c.d: Likewise.
      	* testsuite/ld-x86-64/largecomm-1d.d: Likewise.
      	* testsuite/ld-x86-64/largecomm-1e.d: Likewise.
      	* testsuite/ld-x86-64/largecomm-1f.d: Likewise.
      	* testsuite/ld-x86-64/pr19645.d: Likewise.
      	* testsuite/ld-x86-64/pr19645.s: Likewise.
      	* testsuite/ld-elfcomm/elfcomm.exp: Test --elf-stt-common=yes
      	with assembler.
      	(assembler_generates_commons): Removed.
      	Run -z common/-z nocommon tests.  Run *.d tests.
      	* testsuite/ld-i386/i386.exp: Run pr19645.
      	* testsuite/ld-x86-64/x86-64.exp: Likewise.
      	* testsuite/ld-x86-64/dwarfreloc.exp: Test --elf-stt-common with
      	assembler.  Test STT_COMMON with readelf.
  4. 02 Feb, 2016 1 commit
    • H.J. Lu's avatar
      Clear HAS_RELOC if there are no relocations · 14f2c699
      H.J. Lu authored
      The HAS_RELOC bit should be cleared when relocations are removed from
      relocatable files.
      	PR binutils/19547
      	* elf.c (assign_section_numbers): Clear HAS_RELOC if there are
      	no relocations in relocatable files.
      	PR binutils/19547
      	* testsuite/binutils-all/objcopy.exp
      	(objcopy_test_without_global_symbol): New proc.
      	Run objcopy_test_without_global_symbol.
      	* testsuite/binutils-all/pr19547.c: New file.
  5. 01 Jan, 2016 1 commit
  6. 21 Oct, 2015 1 commit
    • Ronald Hoogenbllon's avatar
      Add ability for objcopy to insert new symbols into a binary. · 2b35fb28
      Ronald Hoogenbllon authored
      	PR binutils/19104
      binutils * objcopy.c (command_line_switch): Add OPTION_ADD_SYMBOL.
      	(copy_options): Add add-symbol.
      	(copy_usage): Likewise.
      	(parse_symflags): New function.
      	(need_sym_before): New function.
      	(create_new_symbol): New function.
      	(filter_symbols): Add code to insert new symbols.
      	(copy_main): Process OPTION_ADD_SYMBOL.
      	* doc/binutils.texi: Document new feature.
      	* NEWS: Add note about the new feature.
      tests	* binutils-all/add-symbol.d: New test.
      	* binutils-all/objcopy.exp: Run the new test.
  7. 15 Oct, 2015 1 commit
    • Alan Modra's avatar
      binutils objcopy test tidy · 21c40443
      Alan Modra authored
      The main aim of this patch is to perform more objcopy tests when we
      can build executables but not run them.  ie. non-native with cross
      compiler available.
      	* binutils-all/objcopy.exp: Delete trailing whitespace.  Use
      	"string equal" rather than "string match" when making simple
      	string comparisons.  Revert 2008-07-08 host_triplet checks.
      	Perform non-run tests when we can build executable.
      	(strip_executable, strip_executable_with_saving_a_symbol): Move
      	run test later.  Take extra param on whether to perform run test.
      	Update callers.
      	(keep_debug_symbols_and_test_copy): Delete unused vars.
  8. 29 Sep, 2015 1 commit
    • H.J. Lu's avatar
      Don't use the output section size to copy input section · cbd44e24
      H.J. Lu authored
      We can't use the output section size to copy input section since
      --interleave will shrink the output section.  Instead, we change
      bfd_convert_section_contents to return the updated input section
      size.  When we do that, we don't need to adjust the output section
      size to skip gap fills.
      	PR binutils/19020
      	* bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
      	* bfd-in2.h: Regenerated.
      	PR binutils/19020
      	* objcopy.c (copy_object): Don't adjust the output section size
      	when copying from input sections.
      	(copy_section): Use input section size for the copy.  Get the
      	updated section size from bfd_convert_section_contents.
      	PR binutils/19020
      	* binutils-all/objcopy.exp: Run pr19020a and pr19020b.
      	* lib/utils-lib.exp (run_dump_test): Support binary input.
      	* binutils-all/pr19020.in: New file.
      	* binutils-all/pr19020a.d: Likewise.
      	* binutils-all/pr19020b.d: Likewise.
  9. 07 Aug, 2015 2 commits
    • H.J. Lu's avatar
      Check sh_type/sh_flags/sh_addralign/sh_entsize when copying sh_link/sh_info · d4ac1f87
      H.J. Lu authored
      When copying the sh_link and sh_info fields in stripped section headers,
      we also check if the sh_type, sh_flags, /sh_addralign and sh_entsize
      fields of the output section match the output.  Since --only-keep-debug
      turns all non-debug sections into SHT_NOBITS sections, the output
      SHT_NOBITS type matches any input type.
      	PR binutils/18785
      	* elf.c (_bfd_elf_copy_private_bfd_data): When copying the
      	sh_link and sh_info fields in stripped section headers, we also
      	check if the sh_type, sh_flags, /sh_addralign and sh_entsize
      	fields of the output section match the output.  Since
      	--only-keep-debug turns all non-debug sections into SHT_NOBITS
      	sections, the output SHT_NOBITS type matches any input type.
      	PR binutils/18785
      	* binutils-all/objcopy.exp: Run strip-12.
      	* binutils-all/strip-12.d: New file.
      	* binutils-all/strip-12.s: Likewise.
    • Andrew Burgess's avatar
      objcopy: Improve wildcard matching for symbols with '!' prefix. · 0b45135e
      Andrew Burgess authored
      When using options such as --localize-symbol, --globalize-symbol, etc,
      along with the --wildcard option, prefixing a symbol name with '!'
      should provide non-matching behaviour, as example the following example
      is given in the manual:
          --wildcard --weaken-symbol !foo --weaken-symbol fo*
      which should weaken all symbols matching the pattern 'fo*', but not the
      symbol 'foo'.
      However, this currently does not work, the current logic will waken all
      symbols matching the pattern 'fo*' AND all symbols that are not 'foo'.
      The symbol 'foo' is covered by the first condition, and so is weakened,
      while, other symbols, for example 'bar' will match the second condition,
      and so be weakened.
      This patch adjusts the logic so that a pattern prefixed with '!'
      specifically DOES NOT apply the relevant change to any matching symbols,
      instead of applying the change to all non-matching symbols.  So this:
          --weaken-symbol !foo
      will ensure that the symbol 'foo' is not weakened, but says nothing
      about symbols that are not 'foo'.  As a result, a pattern prefixed with
      '!' now only makes sense when used alongside a more wide ranging
      wildcard pattern.
      This change should make the wildcard matching feature more useful, with
      no overall loss of functionality.  The example given in the manual,
      weaken all symbols matching 'fo*' except 'foo' can now be achieved, but
      so too can more complex examples, such as weaken all symbols matching
      'fo*' except 'foo', 'foa', and 'fob', like this:
          --wildcard --weaken-symbol !foo \
                     --weaken-symbol !foa \
                     --weaken-symbol !fob \
                     --weaken-symbol fo*
      Under the previous scheme, something as symbols as, weaken all symbols
      except 'foo' could have been achieved with this:
          --weaken-symbol !foo
      however, this will no longer work.  To achieve the same result under the
      new scheme this is now required:
          --weaken-symbol !foo --weaken-symbol *
      	* objcopy.c (is_specified_symbol_predicate): Don't stop at first
      	match.  Non-match rules set found to FALSE.
      	* binutils-all/objcopy.exp: Run new symbol tests.
      	(objcopy_test_symbol_manipulation): New function.
      	* binutils-all/symbols-1.d: New file.
      	* binutils-all/symbols-2.d: New file.
      	* binutils-all/symbols-3.d: New file.
      	* binutils-all/symbols-4.d: New file.
      	* binutils-all/symbols.s: New file.
  10. 05 Aug, 2015 1 commit
    • Nick Clifton's avatar
      Change the behaviour of the --only-keep-debug option to objcopy and strip so... · 63b9bbb7
      Nick Clifton authored
      Change the behaviour of the --only-keep-debug option to objcopy and strip so that the sh_link and sh_info fields in stripped section headers are preserved.
      bfd	* elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
      	sh_info fields of sections whose type has been changed to
      bin	* doc/binutils.texi: Document that the --only-keep-debug option
      	to strip and objcopy preserves the section headers of stripped
      tests	* binutils-all/objcopy.exp (keep_debug_symbols_and_check_links):
      	New proc.  Checks that debug-info-only binaries retain the
      	sh_link field in stripped sections.
  11. 24 Feb, 2015 1 commit
    • Nick Clifton's avatar
      Adds support for generating notes in V850 binaries. · 685080f2
      Nick Clifton authored
      bfd	* elf32-v850.c (v850_set_note): New function.  Creates a Renesas
      	style note entry.
      	(v850_elf_make_note_section): New function.  Creates a note
      	(v850_elf_create_sections): New function.  Create a note section
      	if one is not already present.
      	(v850_elf_set_note): New function.  Adds a note to a bfd.
      	(v850_elf_copy_private_bfd_data): New function.  Copies V850
      	(v850_elf_merge_notes): New function.  Merges V850 notes.
      	(print_v850_note): New function.  Displays a V850 note.
      	(v850_elf_print_notes): New function. Displays all notes attached
      	to a bfd.
      	(v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
      	(v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
      	(v850_elf_fake_sections): Set the type of the V850 note section.
      	* bfd-in.h (v850_elf_create_sections): Add prototype.
      	(v850_elf_set_note): Add prototype.
      	* bfd-in2.h: Regenerate.
      binutils* readelf.c (get_machine_flags): Remove deprecated V850 machine
  12. 01 Jan, 2015 1 commit
  13. 26 Dec, 2014 1 commit
    • Alan Modra's avatar
      Delete unnecessary code copying SHF_SH5_ISA32 flag · 0abb10c8
      Alan Modra authored
      Since 2006, commit d270463e, _bfd_elf_copy_private_section_data has
      copied over SHF_MASKOS and SHF_MASKPROC flags.  That makes the buggy
      code in sh_elf64_copy_private_data_internal redundant.
      	PR 17755
      	* elf64-sh64.c (sh_elf64_copy_private_data_internal): Delete code
      	copying SHF_SH5_ISA32.
      	* binutils-all/strip-11.d: New test.
      	* binutils-all/objcopy.exp: Run it.
  14. 06 Dec, 2014 1 commit
    • Eric Botcazou's avatar
      Add Visium support to binutils · 619ed720
      Eric Botcazou authored
      	* readelf.c: Include elf/visium.h.
      	(guess_is_rela): Deal with EM_VISIUM.
      	(dump_relocations): Likewise.
      	(get_machine_name): Likewise.
      	(get_machine_flags): Likewise.
      	(get_osabi_name): Likewise.
      	(is_32bit_abs_reloc): Likewise.
      	(is_32bit_pcrel_reloc): Likewise.
      	(is_16bit_abs_reloc): Likewise.
      	* binutils-all/objcopy.exp: Skip strip-10 for Visium.
  15. 12 Sep, 2014 1 commit
    • Andrew Bennett's avatar
      Add mips*-img-elf* target triple. · a9d58c06
      Andrew Bennett authored
      	* configure.ac: Add mips*-img-elf* target triple.
      	* configure: Regenerate.
      	* config.bfd: Add mips*-img-elf* target triple.
      	* configure.tgt: Add mips*-img-elf* target triple.
      	* gas/mips/mips.exp: Add mips*-img-elf* target triple.
      	* binutils-all/objcopy.exp: Add mips*-img-elf* target triple.
      	* binutils-all/readelf.exp: Likewise.
      	* configure.tgt: Add mips*-img-elf* target triple.
      	* ld-mips-elf/mips-elf.exp: Add support for mips*-img-elf* target
  16. 10 Jul, 2014 1 commit
    • Will Newton's avatar
      binutils/testsuite: Disable strip-10 test on ARM non-EABI · 15635cff
      Will Newton authored
      Non-EABI ARM targets set OSABI to ARM regardless of whether or not GNU
      features have been used which causes this test to fail.
      2014-07-10  Will Newton  <will.newton@linaro.org>
      	* binutils-all/objcopy.exp: Disable the strip-10 test on
      	non-EABI ARM configurations.
  17. 02 May, 2014 1 commit
    • Alan Modra's avatar
      bfd target vector rationalisation · 6d00b590
      Alan Modra authored
      This renames the bfd targets to <cpu>_<format>_<other>_<endian>_vec.
      So for example, bfd_elf32_ntradlittlemips_vec becomes
      mips_elf32_ntrad_le_vec and hp300bsd_vec becomes m68k_aout_hp300bsd_vec.
      	* aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
      	* aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
      	* cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
      	* coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
      	* coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
      	* coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
      	* coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
      	* coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
      	* coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
      	* coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
      	* demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
      	* elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
      	* elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
      	* elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
      	* elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
      	* elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
      	* elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
      	* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
      	* elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
      	* elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
      	* elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
      	* elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
      	* elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
      	* elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
      	* elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
      	* elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
      	* elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
      	* elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
      	* elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
      	* elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
      	* epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
      	* hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
      	* i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
      	* i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
      	* irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
      	* m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
      	* makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
      	* nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
      	* ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
      	* pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
      	* pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
      	* pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
      	* pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
      	* sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
      	* sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
      	* vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
      	* vms-alpha.c, * vms-lib.c: Rename bfd targets to
      	<cpu>_<format>_<other>_<endian>_vec.  Adjust associated MY macros
      	on aout targets.
      	* configure: Regenerate.
      	* emul_aix.c: Update bfd target vector naming.
      	* testsuite/binutils-all/objcopy.exp: Likewise.
      	* emultempl/metagelf.em: Update bfd target vector naming.
      	* emultempl/nios2elf.em: Likewise.
      	* emultempl/spuelf.em: Likewise.
      	* emultempl/tic6xdsbt.em: Likewise.
  18. 22 Apr, 2014 1 commit
  19. 05 Mar, 2014 1 commit
  20. 27 Nov, 2013 1 commit
    • Richard Sandiford's avatar
      binutils/testsuite/ · d4a43794
      Richard Sandiford authored
      2013-11-27  Matthew Fortune <matthew.fortune@imgtec.com>
      	* binutils-all/objcopy.exp: Consider mips-mti-elf the same as
      	* binutils-all/readelf.exp: Likewise
      2013-11-27  Matthew Fortune <matthew.fortune@imgtec.com>
      	* gas/mips/mips.exp: Consider mips-mti-elf the same as mips-sde-elf
      2013-11-27  Matthew Fortune <matthew.fortune@imgtec.com>
      	* ld-mips-elf/mips-elf.exp: Consider mips-mti-elf the same as
  21. 13 Mar, 2012 1 commit
  22. 25 Nov, 2011 1 commit
  23. 16 Sep, 2011 1 commit
    • H.J. Lu's avatar
      Remove the group section if all members are removed. · 4c8e8a7e
      H.J. Lu authored
      2011-09-15  H.J. Lu  <hongjiu.lu@intel.com>
      	PR binutils/13180
      	* objcopy.c (is_strip_section_1): New.
      	(is_strip_section): Use it.  Remove the group section if all
      	members are removed.
      2011-09-15  H.J. Lu  <hongjiu.lu@intel.com>
      	PR binutils/13180
      	* binutils-all/group-6.d: New.
      	* binutils-all/group-6.s: Likewise.
      	* binutils-all/objcopy.exp: Run group-6 for ELF targrts.
  24. 30 Jun, 2011 1 commit
  25. 13 May, 2011 1 commit
  26. 06 Apr, 2011 1 commit
    • Joseph Myers's avatar
      bfd: · 8c5fc800
      Joseph Myers authored
      	* config.bfd (thumb-*-oabi): Don't handle in list of obsolete
      	(strongarm*, thumb*, xscale*): Remove architectures.
      	(strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
      	thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
      	xscale-*-coff): Remove targets.
      	* configure.in (thumb-*-pe*): Remove.
      	* configure: Regenerate.
      	* binutils-all/objcopy.exp (*arm*-*-coff): Change to arm*-*-coff.
      	(xscale-*-coff, thumb*-*-coff, thumb*-*-pe): Don't handle.
      	* configure.tgt (strongarm*be, strongarm*b, strongarm*,
      	xscale*be|xscale*b, xscale*): Remove architectures.
      	(thumb-*-coff, thumb-*-rtems*, thumb-*-elf, thumb-epoc-pe,
      	thumb-*-pe, xscale-*-coff, xscale-*-elf): Remove targets.
      	* gas/all/gas.exp (*arm*-*-coff): Change to arm*-*-coff.
      	(thumb*-*-coff, thumb*-*-pe*): Don;t handle.
      	* gas/arm/arm.exp (*arm*-*-*): Change to arm*-*-*.
      	(*xscale*-*-*): Don't handle.
      	* gas/cfi/cfi.exp (xscale*-*): Don't handle.
      	* gas/elf/elf.exp (*arm*-*-*): Change to arm*-*-*.
      	(xscale*-*-*): Don't handle.
      	* configure.tgt (thumb-*-linux-* | thumb-*-uclinux*,
      	strongarm-*-coff, strongarm-*-elf, strongarm-*-kaos*,
      	thumb-*-coff, thumb-*-elf, thumb-epoc-pe, thumb-*-pe,
      	xscale-*-coff, xscale-*-elf): Remove targets.
      	* ld-selective/selective.exp (xscale-*-*): Don't handle.
      	* ld-srec/srec.exp (strongarm*-*-*, xscale*-*-*, thumb-*-*): Don't
      	(*arm*-*-*): Change to arm*-*-*.
      	(strongarm*-*-coff, xscale*-*-coff, thumb-*-coff*, thumb-*-pe*,
      	thumb-*-elf*, strongarm*-*-*, thumb-*-*): Remove xfails.
      	* ld-undefined/undefined.exp (thumb*-*-pe*, thumb*-*-pe*): Remove
      	commented-out xfails.
      	(thumb-elf): Remove reference in comment.
      	* lib/ld-lib.exp (strongarm*-*-*, xscale*-*-*, thumb-*-*): Don't
  27. 01 Jan, 2011 1 commit
  28. 08 Nov, 2010 1 commit
    • Thomas Schwinge's avatar
      Improve binutils testsuite coverage for GNU/Hurd. · 5940a93c
      Thomas Schwinge authored
      	* lib/utils-lib.exp (is_elf_format): Consider for *-*-gnu*, too.
      	* binutils-all/elfedit-2.d (target): Likewise.
      	* binutils-all/elfedit-3.d (target): Likewise.
      	* binutils-all/i386/i386.exp: Likewise.
      	* binutils-all/objcopy.exp: Likewise.
      	* binutils-all/strip-3.d (target): Likewise.
      	* lib/gas-defs.exp (is_elf_format): Consider for *-*-gnu*, too.
      	* gas/elf/elf.exp: Likewise.
      	* gas/symver/symver.exp: Likewise.
      	* configure.host: Add stanza for *-*-gnu*.
      	* lib/ld-lib.exp (is_elf_format): Consider for *-*-gnu*, too.
      	* ld-discard/discard.exp: Likewise.
      	* ld-elf/binutils.exp: Likewise.
      	* ld-elf/commonpage1.d (target): Likewise.
      	* ld-elf/compress1c.d (target): Likewise.
      	* ld-elf/discard1.d (target): Likewise.
      	* ld-elf/discard2.d (target): Likewise.
      	* ld-elf/discard3.d (target): Likewise.
      	* ld-elf/dynsym1.d (target): Likewise.
      	* ld-elf/eh6.d (target): Likewise.
      	* ld-elf/elf.exp: Likewise.
      	(array_tests): Move -static tests to...
      	(array_tests_static): ... here, and handle it accordingly.
      	* ld-elf/hash.d (target): Likewise.
      	* ld-elf/header.d (target): Likewise.
      	* ld-elf/loadaddr1.d (target): Likewise.
      	* ld-elf/loadaddr2.d (target): Likewise.
      	* ld-elf/loadaddr3a.d (target): Likewise.
      	* ld-elf/loadaddr3b.d (target): Likewise.
      	* ld-elf/local1.d (target): Likewise.
      	* ld-elf/maxpage1.d (target): Likewise.
      	* ld-elf/maxpage2.d (target): Likewise.
      	* ld-elf/maxpage3a.d (target): Likewise.
      	* ld-elf/multibss1.d (target): Likewise.
      	* ld-elf/noload-2.d (target): Likewise.
      	* ld-elf/seg.d (target): Likewise.
      	* ld-elf/textaddr1.d (target): Likewise.
      	* ld-elf/textaddr2.d (target): Likewise.
      	* ld-elf/textaddr3.d (target): Likewise.
      	* ld-elf/textaddr4.d (target): Likewise.
      	* ld-elf/textaddr5.d (target): Likewise.
      	* ld-elf/textaddr6.d (target): Likewise.
      	* ld-elf/textaddr7.d (target): Likewise.
      	* ld-elf/tls_common.exp: Likewise.
      	* ld-elf/unknown2.d (target): Likewise.
      	* ld-elfvers/vers.exp: Likewise.
      	* ld-elfvsb/elfvsb.exp: Likewise.
      	* ld-elfweak/elfweak.exp: Likewise.
      	(setup_xfail_gnu_hurd): New function.  Use it where appropriate.
      	* ld-gc/abi-note.d (target): Likewise.
      	* ld-gc/gc.exp: Likewise.
      	* ld-gc/pr11218.d (target): Likewise.
      	* ld-gc/start.d (target): Likewise.
      	* ld-i386/i386.exp: Likewise.
      	* ld-ifunc/binutils.exp: Likewise.
      	* ld-ifunc/ifunc.exp: Likewise.
      	* ld-linkonce/linkonce.exp: Likewise.
      	* ld-linkonce/zeroehl32.d (target): Likewise.
      	* ld-pie/pie.exp: Likewise.
      	* ld-scripts/phdrs2.exp: Likewise.
      	* ld-scripts/rgn-at5.d (target): Likewise.
      	* ld-shared/shared.exp: Likewise.
      	* ld-undefined/entry-3.d (target): Likewise.
      	* ld-undefined/entry-4.d (target): Likewise.
      	* ld-undefined/weak-undef.exp: Likewise.
  29. 23 Sep, 2010 1 commit
  30. 10 Sep, 2010 1 commit
    • Nick Clifton's avatar
      * objcopy.c: Add --interleave-width option to allow interleaving · b7dd81f7
      Nick Clifton authored
              of more than one byte at a time.
              (copy_width): New variable.
              (copy_options): Add --interleave-width.
              (copy_section): When interleaving copy in units of copy_width
              (copy_main): Parse the new option.
              * doc/binutils: Document the new option.
              * NEWS: Mention the new feature.
              * binutils-all/objcopy.exp: Add test of new --interleave-width
  31. 18 May, 2010 1 commit
    • H.J. Lu's avatar
      Implement generic SHF_EXCLUDE. · 18ae9cc1
      H.J. Lu authored
      2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
      	PR gas/11600
      	* elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
      	(elf_fake_sections): Likewise.
      	* elf32-i370.c (i370_elf_section_from_shdr): Don't handle
      	SHF_EXCLUDE here.
      	* elf32-ppc.c (ppc_elf_fake_sections): Likewise.
      2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
      	PR gas/11600
      	* readelf.c (get_elf_section_flags): Treat SHF_EXCLUDE as a
      	generic flag.
      2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
      	PR gas/11600
      	* binutils-all/objcopy.exp: Run exclude-1a and exclude-1b for
      	ELF targets.
      	* binutils-all/exclude-1.s: New.
      	* binutils-all/exclude-1a.d: Likewise.
      	* binutils-all/exclude-1b.d: Likewise.
      2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
      	PR gas/11600
      	* obj-elf.c (obj_elf_change_section): Handle SHF_EXCLUDE.
      	(obj_elf_parse_section_letters): Likewise.
      	(obj_elf_section_word): Likewise.
      	* config/tc-ppc.c (ppc_section_letter): Removed.
      	(ppc_section_word): Likewise.
      	* config/tc-ppc.h (ppc_section_letter): Likewise.
      	(ppc_section_word): Likewise.
      	(md_elf_section_letter): Likewise.
      	(md_elf_section_word): Likewise.
      	* doc/as.texinfo: Document `e' and `#exclude'.
      2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
      	PR gas/11600
      	* gas/elf/elf.exp: Run section8.
      	* gas/elf/section8.d: New.
      	* gas/elf/section8.s: Likewise.
      2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
      	PR gas/11600
      	* common.h (SHF_EXCLUDE): New.
      	* i370.h (SHF_EXCLUDE): Removed.
      	* or32.h (SHF_EXCLUDE): Likewise.
      	* ppc.h (SHF_EXCLUDE): Likewise.
      	* sparc.h (SHF_EXCLUDE): Likewise.
      2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
      	PR gas/11600
      	* ld-elf/exclude3.s: New.
      	* ld-elf/exclude3a.d: Likewise.
      	* ld-elf/exclude3b.d: Likewise.
      	* ld-elf/exclude3c.d: Likewise.
  32. 30 Mar, 2010 1 commit
  33. 18 Feb, 2010 1 commit
  34. 01 Feb, 2010 1 commit
  35. 20 Jan, 2010 1 commit
    • Ian Lance Taylor's avatar
      binutils/: · 500ee42e
      Ian Lance Taylor authored
      	* objcopy.c (copy_main): Rewrite OPTION_ADD_SECTION code to work
      	with non-ordinary files like /dev/null.
      	* lib/utils-lib.exp (run_dump_test): Permit option values to use
      	$srcdir to refer to the source directory.
      	* binutils-all/add-section.d: New test.
      	* binutils-all/add-empty-section.d: New test.
      	* binutils-all/empty-file: New test input file.
      	* binutils-all/objcopy.exp: Run new tests.
  36. 02 Sep, 2009 1 commit
  37. 06 Aug, 2009 1 commit
  38. 16 Jul, 2009 2 commits