summaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
Commit message (Collapse)AuthorAgeFilesLines
* * objcopy.c (copy_main): Initialize context variable.Kai Tietz2013-02-151-1/+1
|
* PR binutils/15033Nick Clifton2013-02-151-105/+179
| | | | | | | | | | | | | | | | * objcopy.c (enum change_action): Delete. (struct section_list): Delete remove, copy, change_vma, change_lma and set_flags fields. Add context field. (find_section_list): Add a context parameter. Add support for wildcard characters in section names. (is_strip_section): Check for sections being both copied and removed. (copy_object): Pass context to find_section_list. (setup_section): Likewise. (copy_section): Likewise. (copy_main): Likewise. * doc/binutils: Document the new behaviour. * NEWS: Mention the new feature
* PR binutils/15125Nick Clifton2013-02-141-48/+60
| | | | | | * objcopy.c (copy_object): Provide a helpful warning message when adding a gnu_debuglink section to an object which already contains one.
* * objcopy.c (parse_flags): Add merge and strings section flags.Alan Modra2013-01-281-1/+3
|
* * objcopy.c : Enable long section names for OPTION_ADD_GNU_DEBUGLINK.Nick Clifton2013-01-251-0/+1
|
* binutils/Roland McGrath2013-01-071-10/+55
| | | | | | | | | | | | | | * objcopy.c (deterministic): Make int rather than bfd_boolean, initialize to -1. (strip_options, copy_options): Add -U/--disable-deterministic-archives. (default_deterministic): New function. (strip_main, copy_main): Handle -U. Call default_deterministic. (copy_usage, strip_usage): Describe -U. Cite whether -D or -U is the default based on DEFAULT_AR_DETERMINISTIC. * doc/binutils.texi (objcopy, strip): Describe -U and effect of configure options on -D. * ar.c (default_deterministic): Comment fix.
* Don't read beyond section endH.J. Lu2012-11-071-1/+5
| | | | * objcopy.c (copy_section): Don't read beyond section end.
* * objcopy.c (is_strip_section_1): Don't stripKai Tietz2012-10-181-2/+8
| | | | .reloc section by default.
* binutils/Cary Coutant2012-05-081-4/+47
| | | | | | | | | | | | | | | | | | * doc/binutils.texi (objcopy): Add --strip-dwo, --extract-dwo options. (strip): Add --strip-dwo option. * objcopy.c (enum strip_action): Add STRIP_DWO, STRIP_NONDWO. (enum command_line_switch): Add OPTION_EXTRACT_DWO, OPTION_STRIP_DWO. (strip_options): Add --strip-dwo option. (copy_options): Add --extract-dwo, --strip-dwo options. (copy_usage): Likewise. (strip_usage): Add --strip-dwo option. (is_dwo_section): New function. (is_strip_section_1): Check for DWO sections. (copy_object): Check for --strip-dwo, --extract-dwo options. (copy_relocations_in_section): Discard relocations for DWO sections. Discard entire relocation section when no relocations. (strip_main): Add --strip-dwo option. (copy_main): Add --strip-dwo, --extract-dwo options.
* * doc/binutils.texi: Add -D/--enable-deterministic-archives optionCary Coutant2012-04-251-1/+21
| | | | | | | | | | | | | to strip and objcopy. * objcopy.c (deterministic): New global variable. (strip_options): Add --enable-deterministic-archives. (copy_options): Likewise. (copy_usage): Likewise. (strip_usage): Likewise. (copy_archive): When stripping all, don't add archive map; set deterministic output when requested. (strip_main): Add -D/--enable-deterministic-archives option. (copy_main): Likewise.
* Don't generate empty reloc sectionsH.J. Lu2012-04-131-17/+56
| | | | | | | | | | | | | | | | | | | | | binutils/ PR binutils/13947 * objcopy.c (copy_object): Call copy_relocations_in_section before copy_section. (skip_section): New. (copy_relocations_in_section): Likewise. (copy_section): Use skip_section. Don't copy relocations here. binutils/testsuite/ PR binutils/13947 * binutils-all/i386/compressed-1b.d: Remove empty REL section. * binutils-all/i386/compressed-1c.d: Likewise. * binutils-all/x86-64/compressed-1b.d: Remove empty RELA section. * binutils-all/x86-64/compressed-1c.d: Likewise.
* * sysdep.h: Include sys/stat.h here.Alan Modra2012-02-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | * ar.c: Don't include headers already included by sysdep.h. * bucomm.c: Likewise. * budbg.h: Likewise. * dlltool.h: Likewise. * elfedit.c: Likewise. * nlmconv.c: Likewise. * objcopy.c: Likewise. * objdump.c: Likewise. * objdump.h: Likewise. * readelf.c: Likewise. * rename.c: Likewise. * resrc.c: Likewise. * strings.c: Likewise. * windres.c: Likewise. * od-macho.c: Ensure #include sysdep.h is first. * od-xcoff.c: Likewise. * dllwrap.c: Remove alloca pragma handled by sysdep.h, and remove duplicate headers. * dlltool.c: Likewise and ensure #include sysdep.h is first.
* Remove the group section if all members are removed.H.J. Lu2011-09-161-2/+27
| | | | | | | | | | | | | | | | | | | | | binutils/ 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. binutils/testsuite/ 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.
* * objcopy.c (copy_archive): Check bfd_openw result in unknown objectAlan Modra2011-05-061-31/+30
| | | | case. Rewrite without goto.
* Make the unknown archive element readable.H.J. Lu2011-04-041-1/+3
| | | | | | | | 2011-04-03 H.J. Lu <hongjiu.lu@intel.com> PR binutils/12632 * objcopy.c (copy_unknown_object): Make the archive element readable.
* 2011-03-14 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-03-141-0/+2
| | | | * objcopy.c (set_pe_subsystem): Free subsystem.
* ChangeLog binutils/Kai Tietz2011-02-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2011-02-28 Kai Tietz <kai.tietz@onevision.com> * debug.c (debug_start_source): Use filename_(n)cmp. * ieee.c (ieee_finish_compilation_unit): Likewise. (ieee_lineno): Likewise. * nlmconv.c (main): Likewise. * objcopy.c (strip_main): Likewise. (copy_main): Likewise. * objdump.c (show_line): Likewise. (dump_reloc_set): Likewise. * srconv.c (main): Likewise. * wrstabs.c (stab_lineno): Likewise. ChangeLog gas/ 2011-02-28 Kai Tietz <kai.tietz@onevision.com> * depend.c (register_dependency): Use filename_(n)cmp. * dwarf2dbg.c (get_filenum): Likewise. * ecoff.c (add_file): Likewise. (ecoff_generate_asm_lineno): Likewise. * input-scrub.c (new_logical_line_flags): Likewise. * listing.c (file_info): Likewise. (listing_newline): Likewise. * remap.c (remap_debug_filename): Likewise. * stabs.c (generate_asm_file): Likewise. (stabs_generate_asm_lineno): Likewise.
* bfd/Alan Modra2010-11-081-17/+0
| | | | | | | | | | | | | | | | | | | * hash.c (bfd_hash_hash): Extract from.. (bfd_hash_lookup): ..here. (bfd_hash_rename): New function. * section.c (bfd_rename_section): New function. * bfd-in.h (bfd_hash_rename): Declare. * bfd-in2.h: Regenerate. * elf.c (_bfd_elf_make_section_from_shdr): Rename input sections when compressing or decompressing. Don't assert name match. * elf64-hppa.c (get_reloc_section): Don't assert name match. * elfxx-ia64.c (get_reloc_section): Likewise. binutils/ * objcopy.c (copy_main): No need to rename sections when compressing or decompressing. binutils/testsuite/ * binutils-all/objdump.W: Adjust expected result for debug section rename.
* Add compressed debug section support to binutils and ld.H.J. Lu2010-10-291-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> Cary Coutant <ccoutant@google.com> * archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS and BFD_DECOMPRESS. * bfd.c (BFD_COMPRESS): New. (BFD_DECOMPRESS): Likewise. (BFD_FLAGS_SAVED): Likewise. (bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED. * compress.c (bfd_uncompress_section_contents): Removed. (get_uncompressed_size): New. (decompress_contents): Likewise. (bfd_compress_section_contents): Likewise. (bfd_get_full_section_contents): Likewise. (bfd_is_section_compressed): Likewise. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. * dwarf2.c (dwarf_debug_sections): New. (dwarf_debug_section_enum): Likewise. (read_section): Remove section_name and compressed_section_name. Add dwarf_debug_section_enum. Try compressed debug section. (read_indirect_string): Updated. (read_abbrevs): Likewise. (decode_line_info): Likewise. (read_debug_ranges): Likewise. (find_line): Updated. * ecoff.c (bfd_debug_section): Add compress_status and compressed_size. * elf.c (_bfd_elf_make_section_from_shdr): Call bfd_is_section_compressed to check if a DWARF debug section is compressed. Call bfd_init_section_compress_status or bfd_init_section_decompress_status if needed. * elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents with bfd_get_full_section_contents. * merge.c (_bfd_add_merge_section): Likewise. * reloc.c (bfd_generic_get_relocated_section_contents): Likewise. * simple.c (bfd_simple_get_relocated_section_contents): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and BFD_DECOMPRESS. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (dwarf_debug_section): New. (dwarf_debug_sections): Likewise. * libbfd.c (_bfd_generic_get_section_contents): Issue an error when getting contents on compressed/decompressed section. * section.c (COMPRESS_SECTION_NONE): New. (COMPRESS_SECTION_DONE): Likewise. (DECOMPRESS_SECTION_SIZED): Likewise. (BFD_FAKE_SECTION): Add compress_status and compressed_size. (bfd_malloc_and_get_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. binutils/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * addr2line.c (process_file): Set BFD_DECOMPRESS. * objcopy.c (do_debug_sections): New. (OPTION_COMPRESS_DEBUG_SECTIONS): New. (OPTION_DECOMPRESS_DEBUG_SECTIONS): Likewise. (copy_options): Add OPTION_COMPRESS_DEBUG_SECTIONS and OPTION_DECOMPRESS_DEBUG_SECTIONS. (copy_usage): Add --compress-debug-sections and --decompress-debug-sections. (copy_file): Set BFD_COMPRESS or BFD_DECOMPRESS. (copy_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. (copy_main): Handle OPTION_COMPRESS_DEBUG_SECTIONS and OPTION_DECOMPRESS_DEBUG_SECTIONS. Check do_debug_sections to rename DWARF debug sections. * objdump.c (load_specific_debug_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. Remove bfd_uncompress_section_contents. (dump_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. (display_file): Set BFD_DECOMPRESS if needed. * readelf.c (uncompress_section_contents): Set buffer to NULL to indiate decompression failure. (load_specific_debug_section): Always call uncompress_section_contents. * doc/binutils.texi: Document --compress-debug-sections and --decompress-debug-sections. binutils/testsuite/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * binutils-all/compress.exp: New. * binutils-all/dw2-1.S: Likewise. * binutils-all/dw2-2.S: Likewise. * binutils-all/libdw2-compressed.out: Likewise. * binutils-all/libdw2.out: Likewise. gas/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * write.c (compress_debug): Optimize section flags check. gas/testsuite/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * elf/dwarf2-1.s: Replace .zdebug_abbrev section with .debug_abbrev section. * elf/dwarf2-2.3: Likewise. * elf/dwarf2-1.d: Pass --compress-debug-sections to assembler. Updated. * elf/dwarf2-2.d: Likewise. * gas/i386/i386.exp: Remove xfail on dw2-compress-2 and x86-64-dw2-compress-2. ld/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * ldfile.c (ldfile_try_open_bfd): Set BFD_DECOMPRESS after bfd_openr returns. * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Likewise. * scripttempl/elf.sc: Include compressed DWARF debug sections. ld/testsuite/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/compress.exp: New. * ld-elf/compress1.s: Likewise. * ld-elf/compress1a.d: Likewise. * ld-elf/compress1b.d: Likewise. * ld-elf/compress1c.d: Likewise.
* * objcopy.c: Add --interleave-width option to allow interleavingNick Clifton2010-09-101-10/+33
| | | | | | | | | | | | | | 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 bytes. (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 option.
* * objcopy.c (copy_usage): Tweak previous typofix.Dave Korn2010-07-171-1/+1
|
* Fix a typo in "objcopy --help".H.J. Lu2010-07-171-1/+1
| | | | | | 2010-07-17 H.J. Lu <hongjiu.lu@intel.com> * objcopy.c (copy_usage): Fix a typo.
* PR binutils/3166Alan Modra2010-06-291-11/+5
| | | | | * objcopy.c (is_strip_section): Revert 2006-09-05. (setup_section): Make SHT_GROUP section nobits.
* * objcopy.c (copy_object): Set SEC_LINKER_CREATED when addingNathan Sidwell2010-02-011-1/+6
| | | | | | | | sections. testsuite/ * binutils-all/note-1.d: New. * binutils-all/objcopy.exp: Add it.
* binutils/:Ian Lance Taylor2010-01-201-23/+27
| | | | | | | | | | | | * objcopy.c (copy_main): Rewrite OPTION_ADD_SECTION code to work with non-ordinary files like /dev/null. binutils/testsuite/: * 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.
* Update copyrightH.J. Lu2010-01-051-1/+1
| | | | | | | 2010-01-04 H.J. Lu <hongjiu.lu@intel.com> * objcopy.c: Update copyright. * readelf.c: Likewise.
* Remove "Warning: " from error messageH.J. Lu2010-01-051-1/+1
| | | | | | | | 2010-01-04 H.J. Lu <hongjiu.lu@intel.com> PR binutils/11130 * objcopy.c (copy_object): Remove "Warning: " from error message.
* * objcopy.c (add_redefine_syms_file): Avoid symbol bufferNick Clifton2009-12-311-3/+3
| | | | overrun.
* Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton2009-12-111-17/+17
| | | | Fix up all warnings generated by the addition of this switch.
* * obcopy.c (copy_object): New parameter `input_arch', architectureNick Clifton2009-09-111-39/+27
| | | | | | | | | | | | | | | | | | of input file, if not specified in input file itself; all callers updated; `binary_architecture' hack removed. (copy_archive, copy_file): New parameter `input_arch', for `copy_object' usage. (copy_main): Accept `-B' (`--binary-architecture') option also for any arch-less input ifile format, not only `binary'; remove bfd_external_binary_architecture hack; instead, add `input_arch' to calls to `copy_file'. * windres.c, windmc.c : Obsolete and useless external references to `bfd_external_binary_architecture' or `bfd_external_machine' removed. * binary.c (binary_object_p): Remove bfd_external_binary_architecture hack. objcopy `-B' (`--binary-architecture') option is now handled in a generic way.
* Updated soruces in binutils/* to compile cleanly with -Wc++-compat.Nick Clifton2009-09-101-46/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * binutils/addr2line.c (slurp_symtab): Fix casts. Introduce variable minisyms to avoid aliasing varning. * binutils/ar.c: Add casts. (normalize): Use name del instead of delete. (display_target_list,display_info_table): Change loop counter variable a to int. * binutils/bucomm.c: Add casts. * binutils/debug.c: Update function to use new names. (struct debug_baseclass): Rename member from virtual to is_virtual. (struct debug_type_s,struct debug_field_s,struct debug_baseclass_s,struct debug_method_s,struct debug_method_variant_s,struct debug_type_s): Rename struct from avoid name collision. * /binutils/debug.h: Use new struct names. * binutils/dwarf.c: Add casts. (free_debug_memory): Change loop counter variable a to int. * binutils/ieee.c: Add casts. (enum ieee_var_kind): Move to top level. (ieee_class_baseclass): Rename parameter virtual to is_virtual. (ieee_class_method_var): Rename variable virtual to is_virtual. * binutils/nm.c: Add casts. * binutils/objcopy.c: Add casts. (copy_archive): Rename variable delete to del. * binutils/objdump.c: Add casts. (dump_dwarf_section): Change loop counter variable i to int. * binutils/prdbg.c: Add casts. (pr_class_baseclass,tg_class_baseclass): Rename parameters virtual to is_virtual. * binutils/readelf.c: Add casts. (struct ia64_unw_table_entry,struct hppa_unw_table_entry): Move to top level. * binutils/size.c: Add casts. * binutils/stabs.c (parse_stab_type, parse_stab_range_type) (parse_stab_cpp_abbrev): Rename parameter from typename to type_name. (parse_stab_baseclasses): Rename variable virtual to is_virtual. * binutils/strings.c: Add casts. * binutils/wrstabs.c (stab_class_baseclass): Rename parameter virtual to is_virtual.
* 2009-08-03 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-08-031-4/+7
| | | | | | PR binutils/10364 * objcopy.c (strip_main): Check return from smart_rename. (copy_main): Likewise.
* 2009-06-27 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-06-271-1/+5
| | | | | | | PR binutils/10321 * bucomm.c (get_file_size): Return -1 on error. * objcopy.c (copy_file): Report empty file.
* * objcopy.c (set_long_section_mode): Check input_bfd is coffAlan Modra2009-05-121-1/+2
| | | | before accessing coff specific fields of bfd.
* bfd/H.J. Lu2009-04-271-0/+5
| | | | | | | | | | | | | | 2009-04-27 H.J. Lu <hongjiu.lu@intel.com> * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't copy pe_opthdr. binutils/ 2009-04-27 H.J. Lu <hongjiu.lu@intel.com> * objcopy.c (copy_object): Copy pe_opthdr before changing PE parameters.
* bfd/H.J. Lu2009-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER. binutils/ 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> * objcopy.c (set_pe_subsystem): Replace efi-rom with sal-rtd. * doc/binutils.texi: Likewise. include/coff/ 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> * pe.h (IMAGE_SUBSYSTEM_EFI_ROM): Renamed to ... (IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER): This.
* bfd/H.J. Lu2009-04-171-1/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> PR binutils/10074 * coffcode.h (bfd_pei_p): New. * config.bfd: Remove bfd_efi_bsdrv_ia32_vec, bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec, bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec, bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively. * configure.in: Remove bfd_efi_bsdrv_ia32_vec, bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec, bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_ia64_vec with bfd_pei_ia64_vec. * targets.c: Likewise. * configure: Regenerated. * libcoff.h: Likewise. * Makefile.in: Likewise. * efi-app-ia32.c: Removed. * efi-app-x86_64.c: Likewise. * efi-bsdrv-ia32.c: Likewise. * efi-bsdrv-ia64.c: Likewise. * efi-bsdrv-x86_64.c: Likewise. * efi-rtdrv-ia32.c: Likewise. * efi-rtdrv-ia64.c: Likewise. * efi-rtdrv-x86_64.c: Likewise. * efi-rtdrv-ia32.c: Likewise. * efi-app-ia64.c: Moved to ... * pei-ia64.c: This. (TARGET_SYM): Set to bfd_pei_ia64_vec. (TARGET_NAME): Set to pei-ia64. * libpei.h (bfd_target_pei_p): Removed. (bfd_target_pei_arch): Likewise. (bfd_target_efi_app_p): Likewise. (bfd_target_efi_app_arch): Likewise. (bfd_target_efi_bsdrv_p): Likewise. (bfd_target_efi_bsdrv_arch): Likewise. (bfd_target_efi_rtdrv_p): Likewise. (bfd_target_efi_rtdrv_arch): Likewise. (bfd_pe_executable_p): Likewise. * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo, efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo. (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c and efi-rtdrv-ia32.c. (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo, efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and efi-rtdrv-x86_64.lo. Add pei-ia64.lo. (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c, efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and efi-rtdrv-x86_64.c. Add pei-ia64.c. (efi-app-ia64.lo): Removed. (efi-bsdrv-ia32.lo): Likewise. (efi-rtdrv-ia32.lo): Likewise. (efi-app-ia64.lo): Likewise. (efi-bsdrv-ia64.lo): Likewise. (efi-rtdrv-ia64.lo): Likewise. (efi-app-x86_64.lo): Likewise. (efi-bsdrv-x86_64.lo): Likewise. (efi-rtdrv-x86_64.lo): Likewise. (pei-ia64.lo): New. * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p with bfd_pei_p. (arch_type): Removed. (pe_arch): Likewise. (pe_bfd_object_p): Just return coff_object_p. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace bfd_pe_executable_p with bfd_pei_p. binutils/ 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> PR binutils/10074 * objcopy.c: Include coff/i386.h and coff/pe.h. (pe_file_alignment): New. (pe_heap_commit): Likewise. (pe_heap_reserve): Likewise. (pe_image_base): Likewise. (pe_section_alignment): Likewise. (pe_stack_commit): Likewise. (pe_stack_reserve): Likewise. (pe_subsystem): Likewise. (pe_major_subsystem_version): Likewise. (pe_minor_subsystem_version): Likewise. (set_pe_subsystem): Likewise. (convert_efi_target): Likewise. (command_line_switch): Add OPTION_FILE_ALIGNMENT, OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT, OPTION_STACK and OPTION_SUBSYSTEM. (copy_options): Likewise. (copy_usage): Add --file-alignment, --heap, --image-base, --section-alignment, --stack and --subsystem. (copy_object): Set up PE parameters. (copy_main): Process Add OPTION_FILE_ALIGNMENT, OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT, OPTION_STACK and OPTION_SUBSYSTEM. Convert EFI target to PEI target. * NEWS: Mention --file-alignment, --heap, --image-base, --section-alignment, --stack and --subsystem command line options for objcopy. * doc/binutils.texi: Document --file-alignment, --heap, --image-base, --section-alignment, --stack and --subsystem command line options for objcopy.
* bfd/ChangeLogDave Korn2009-04-141-0/+45
| | | | | | | | | | | | | | | | | | * coffgen.c (make_a_section_from_file): Set the backend long section names enable if long section names found on input. * coffcode.h: Extend long section names documentation to match. binutils/ChangeLog * objcopy.c (enum long_section_name_handling): New enum type. (enum command_line_switch): Add OPTION_LONG_SECTION_NAMES. (copy_options[]): Add entry for --long-section-names option. (copy_usage): Document it. (set_long_section_mode): New subroutine. (copy_file): Call it. (copy_main): Accept OPTION_LONG_SECTION_NAMES and parse arg. * doc/binutils.texi: Update objcopy documentation with details of new option.
* bfd/H.J. Lu2009-03-131-0/+3
| | | | | | | | | | | | | | | | 2009-03-13 H.J. Lu <hongjiu.lu@intel.com> PR binutils/9945 * elf.c (assign_section_numbers): Generate symbol table if there is any relocation in output. (_bfd_elf_compute_section_file_positions): Likewise. binutils/ 2009-03-13 H.J. Lu <hongjiu.lu@intel.com> PR binutils/9945 * objcopy.c (copy_object): Clear HAS_RELOC when stripping all.
* binutils/H.J. Lu2009-03-101-1/+2
| | | | | | | | | | | | | | | | | 2009-03-09 H.J. Lu <hongjiu.lu@intel.com> PR binutils/9933 * objcopy.c (filter_symbols): Properly handle common symbols in relocatable file. binutils/testsuite/ 2009-03-09 H.J. Lu <hongjiu.lu@intel.com> PR binutils/9933 * binutils-all/copy-4.d: New. * binutils-all/objcopy.exp: Run copy-4.
* PR 9798Alan Modra2009-01-291-24/+39
| | | | | | | | | | | | | * bucomm.c (bfd_nonfatal_message): Use bfd_get_archive_filename. (bfd_get_archive_filename): Constify param. * bucomm.h (bfd_get_archive_filename): Update prototype. * objcopy.c (RETURN_NONFATAL): Delete. (copy_unknown_object): Don't call bfd_get_archive_filename for bfd_nonfatal_message filename, instead just pass bfd. (copy_object): Likewise. (copy_archive, copy_file): Likewise. Expand RETURN_NONFATAL. On bfd_close errors, do not pass the bfd to bfd_nonfatal_message. (setup_bfd_headers): Fix error message.
* * objcopy.c (setup_section): Set elf_group_id.Alan Modra2008-09-281-7/+12
|
* binutils/Alan Modra2008-08-061-7/+8
| | | | | | | | | * objcopy.c (copy_object): Don't setup_bfd_headers when extract_symbol. (setup_section): Don't zero vma and lma when extract_symbol. (copy_section): Discard relocations when extract_symbol. * doc/binutils.texi: Update --extract-symbol description. ld/testsuite/ * ld-elf/extract-symbol-1sec.d: Update.
* PR binutils/6483Nick Clifton2008-06-121-1/+1
| | | | | | | | | | | | | * objdump.c (dump_bfd): If the -g option found no STABS or IEEE debug information to display, try dumping DWARF information instead. * rddbg.c (read_debugging_info): Add a parameter to suppress the display of a warning message when no debug information is found. * budbg.h (read_debugging_info): Update prototype. * objcopy.c (copy_object): Continue to allow read_debugging_info to produce warning messages. * doc/binutils.texi (--debugging): Document new behaviour of the -g/--debugging option.
* PR binutils/6034Nick Clifton2008-04-161-79/+115
| | | | | | | | | | | | | | | | | | | | | | | | | * objcopy.c (stuct symlist): Rename to is_specified_symbol_predicate_data. (strip_specific_list): Rename to strip_specific_htab. (strip_unneeded_list): Rename to strip_unneeded_htab. (keep_specific_list): Rename to keep_specific_htab. (localize_specific_list): Rename to localize_specific_htab. (globalize_specific_list): Rename to globalize_specific_htab. (keepglobal_specific_list): Rename to keepglobal_specific_htab. (weaken_specific_list): Rename to weaken_specific_htab. (eq_string): New function. (create_symbol_htab): New function. (create_symbol_htabs): New function. (add_specific_symbol): Change to use hash tables. (is_specified_symbol_predicate): New function. (is_specified_symbol): Use hash table lookup. (is_strip_section): Update to use new functions and hash tables. (filter_symbols): Likewise. (copy_object): Likewise. (copy_section): Likewise. (strip_main): Likewise. (copy_main): Likewise. (main): Likewise.
* Add support for thin archives.Nick Clifton2008-03-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bfd/archive.c (_bfd_find_nested_archive): New function. (get_extended_arelt_filename): Add origin parameter. (_bfd_generic_read_ar_hdr_mag): Deal with extended name combined with a file offset. (append_relative_path): New function. (_bfd_get_elt_at_filepos): Deal with external members and nested archives. (bfd_generic_openr_next_archived_file): Thin archives. (bfd_generic_archive_p): Recognize new magic string. (adjust_relative_path): New function. (_bfd_construct_extended_name_table): Construct extended names for thin archive members. (_bfd_write_archive_contents): Emit new magic string, skip copying files for thin archives. * bfd/bfd-in.h (bfd_is_thin_archive): New macro. * bfd/bfd.c (struct bfd): New fields for thin archives. * bfd/libbfd-in.h (struct areltdata): New field for thin archives. * bfd/opncls.c (bfd_close): Delete BFDs for nested archives. * binutils/ar.c (make_thin_archive): New global flag. (map_over_members): Deal with full pathnames in thin archives. (usage, main): Add 'T' option for building thin archives. (replace_members): Pass thin archive flag to ar_emul_append. * binutils/arsup.c (ar_open): Initialize new flag. * binutils/binemul.c (ar_emul_append): Add new parameter for flattening nested archives. (do_ar_emul_default_append): New function. (ar_emul_default_append): Factored out recursive code. * binutils/binemul.h (ar_emul_default_append): Add new parameter. (struct bin_emulation_xfer_struct): New parameter for ar_append. * binutils/dlltool.c (gen_lib_file): Initialize thin archive flag. * binutils/emul_aix.c (ar_emul_aix_internal): Add new flatten parameter, currently unimplemented. All callers changed. * binutils/objcopy.c (copy_archive): Preserve thin archive flag. * binutils/doc/binutils.texi: Update ar documentation. * binutils/testsuite/binutils-all/ar.exp: Add thin archive tests. * include/aout/ar.h (ARMAGT): New magic string for thin archives.
* * bucomm.c (bfd_nonfatal_message): New.Nathan Sidwell2007-08-301-78/+112
| | | | | | | | | | * bucomm.h (bfd_nonfatal_message): Declare. * objcopy.c (RETURN_NONFATAL): Take BFD not NAME, use bfd_nonfatal_message. (copy_unknown_object): Adjust bfd_nonfatal and RETURN_NONFATAL calls, or replace with bfd_nonfatal_message calls as appropriate. (copy_object, copy_archive, copy_file, setup_section, copy_section, write_debugging_info): Likewise.
* PR 4888Alan Modra2007-08-041-10/+19
| | | | | | | * objcopy.c (setup_section): Do modify section flags for ELF STRIP_NONDEBUG (reverting part of 2007-05-30 change). Prevent header rewrite by twiddling input section flags instead. Simplify code setting SHT_NOBITS.
* Change sources over to using GPLv3Nick Clifton2007-07-051-1/+1
|
* PR 4716Alan Modra2007-07-021-2/+1
| | | | * objcopy.c (filter_symbols): Correct relocatable file test.