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.
      
      	bfd/
      	* 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.
      
      	binutils/
      	* testsuite/lib/binutils-common.exp (supports_gnu_unique): New
      	procedure.
      	* testsuite/binutils-all/objcopy.exp: Use `supports_gnu_unique'
      	with the `strip-10' test.
      
      	ld/
      	* testsuite/ld-unique/unique.exp: Use `is_elf_format' and
      	`supports_gnu_unique' to qualify testing.
      a43942db
  2. 29 Apr, 2016 1 commit
    • Nick Clifton's avatar
      Enhance support for copying and stripping Solaris and ARM binaries. · 5522f910
      Nick Clifton authored
      	PR 19938
      bfd	* elf-bfd.h (struct elf_backend_data): Rename
      	elf_backend_set_special_section_info_and_link to
      	elf_backend_copy_special_section_fields.
      	* elfxx-target.h: Likewise.
      	* elf.c (section_match): Ignore the SHF_INFO_LINK flag when
      	comparing section flags.
      	(copy_special_section_fields): New function.
      	(_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
      	Perform two scans over special sections.  The first one looks for
      	a direct mapping between the output section and an input section.
      	The second scan looks for a possible match based upon section
      	characteristics.
      	* elf32-arm.c (elf32_arm_copy_special_section_fields): New
      	function.  Handle setting the sh_link field of SHT_ARM_EXIDX
      	sections.
      	* elf32-i386.c (elf32_i386_set_special_info_link): Rename to
      	elf32_i386_copy_solaris_special_section_fields.
      	* elf32-sparc.c (elf32_sparc_set_special_section_info_link):
      	Rename to elf32_sparc_copy_solaris_special_section_fields.
      	* elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
      	elf64_x86_64_copy_solaris_special_section_fields.
      
      binutils* readelf.c (get_solaris_segment_type): New function.
      	(get_segment_type): Call it.
      5522f910
  3. 14 Apr, 2016 1 commit
    • Nick Clifton's avatar
      Fix copying Solaris binaries with objcopy. · 84865015
      Nick Clifton authored
      	PR target/19938
      bfd	* elf-bbfd.h (struct elf_backend_data): New field:
      	elf_strtab_flags.
      	New field: elf_backend_set_special_section_info_and_link
      	* elfxx-target.h (elf_backend_strtab_flags): Define if not already
      	defined.
      	(elf_backend_set_special_section_info_and_link): Define if not
      	already defined.
      	(elfNN_bed): Use elf_backend_set_special_section_info_and_link and
      	elf_backend_strtab_flags macros to initialise fields in structure.
      	* elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
      	being set even if SHF_MERGE is not set.
      	(elf_fake_sections): Likewise.
      	(section_match): New function.  Matches two ELF sections based
      	upon fixed characteristics.
      	(find_link): New function.  Locates a section in a BFD that
      	matches a section in a different BFD.
      	(_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
      	fields of reserved sections.
      	(bfd_elf_compute_section_file_positions): Set the flags for the
      	.shstrtab section based upon the elf_strtab_flags field in the
      	elf_backend_data structure.
      	(swap_out_syms): Likewise for the .strtab section.
      	* elflink.c (bfd_elf_final_link): Set the flags for the
      	.strtab section based upon the elf_strtab_flags field in the
      	elf_backend_data structure.
      	* elf32-i386.c (elf32_i386_set_special_info_link): New function.
      	(elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
      	targets.
      	(elf_backend_set_special_section_info_and_link): Define for
      	Solaris targets.
      	* elf32-sparc.c: Likewise.
      	* elf64-x86-64.c: Likewise.
      
      binutils* testsuite/binutils-all/i386/compressed-1b.d: Allow for the
      	string sections possibly having the SHF_STRINGS flag bit set.
      	* testsuite/binutils-all/i386/compressed-1c.d: Likewise.
      	* testsuite/binutils-all/readelf.s: Likewise.
      	* testsuite/binutils-all/readelf.s-64: Likewise.
      	* testsuite/binutils-all/x86-64/compressed-1b.d: Likewise.
      	* testsuite/binutils-all/x86-64/compressed-1c.d: Likewise.
      
      gas	* testsuite/gas/i386/ilp32/x86-64-unwind.d: Allow for the string
      	sections possibly having the SHF_STRINGS flag bit set.
      	* testsuite/gas/i386/x86-64-unwind.d: Likewise.
      84865015
  4. 01 Jan, 2016 1 commit
  5. 12 Aug, 2015 1 commit
    • H.J. Lu's avatar
      Set EI_OSABI to ELFOSABI_GNU for local IFUNC symbols · 13a2df29
      H.J. Lu authored
      Since the backend elf_add_symbol_hook isn't called on local symbols,
      the EI_OSABI field isn't to ELFOSABI_GNU where are local IFUNC symbols.
      This patch changes the x86 backends to set has_gnu_symbols if there are
      relocations against IFUNC symbols.  Other backends with IFUNC support
      may need a similar change.
      
      This patch also changes the type of has_gnu_symbols from bfd_boolean to
      enum elf_gnu_symbols.
      
      bfd/
      
      	PR ld/18815
      	* elf-bfd.h (elf_gnu_symbols): New enum.
      	(elf_obj_tdata): Use elf_gnu_symbols on has_gnu_symbols.
      	* elf-s390-common.c (elf_s390_add_symbol_hook): Set
      	has_gnu_symbols to elf_gnu_symbol_any.
      	* 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.
      	* lfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
      	* elf32-i386.c (elf_i386_check_relocs): Update has_gnu_symbols
      	if there are relocations against IFUNC symbols.
      	(elf_i386_add_symbol_hook): Don't check STT_GNU_IFUNC here.
      	* elf64-x86-64. (elf_x86_64_check_relocs): Update has_gnu_symbols
      	if there are relocations against IFUNC symbols.
      	(elf_x86_64_add_symbol_hook): Don't check STT_GNU_IFUNC here.
      
      ld/testsuite/
      
      	PR ld/18815
      	* ld-i386/i386.exp: Run pr18815.
      	* ld-x86-64/x86-64.exp: Likewise.
      	* ld-i386/pr18815.d: New file.
      	* ld-i386/pr18815.s: Likewise.
      	* ld-x86-64/pr18815.d: Likewise.
      	* ld-x86-64/pr18815.s: Likewise.
      13a2df29
  6. 01 Jan, 2015 1 commit
  7. 16 Oct, 2014 1 commit
    • Alan Modra's avatar
      Fix 17492, ld segfault with --oformat=binary · f1885d1e
      Alan Modra authored
      	PR 17492
      	* elf32-arm.c (elf32_arm_add_symbol_hook): Only set has_gnu_symbols
      	on ELF output bfd.
      	* elf32-i386.c (elf_i386_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.
      	* elf-s390-common.c (elf_s390_add_symbol_hook): Likewise.  Handle
      	STB_GNU_UNIQUE too.
      f1885d1e
  8. 13 Jun, 2014 1 commit
    • Alan Modra's avatar
      Don't call bfd_link_hash_table_free · caa4096e
      Alan Modra authored
      Freeing the linker hash table is a royal pain.  It can't be freed
      before the _bfd_write_contents call in bfd_close, because some target
      bfd_write_contents functions access the hash table.  It can't be freed
      after bfd_close either, since bfd_alloc memory holding side data
      structures disappears (PR17047).  Clearly the only place it can be freed
      is actually in bfd_close.  This patch doesn't do that, but kills off
      the existing means of freeing the hash table via a bfd target xvec call.
      
      bfd/
      	PR 17047
      	* targets.c (BFD_JUMP_TABLE): Delete NAME##_bfd_link_hash_table_free.
      	(struct bfd_target <_bfd_link_hash_table_free>): Delete.
      	* bfd.c (bfd_link_hash_table_free): Don't define.
      	* aout-adobe.c, * aout-target.h, * aout-tic30.c, * binary.c, * bout.c,
      	* coff64-rs6000.c, * coffcode.h, * elf-m10300.c, * elf32-arm.c,
      	* elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc11.c,
      	* elf32-m68hc12.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
      	* elf32-sparc.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c,
      	* elf64-sparc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c,
      	* elfxx-target.h, * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c,
      	* libbfd-in.h, * libecoff.h, * mach-o-target.c, * mmo.c,
      	* nlm-target.h, * oasys.c, * pef.c, * plugin.c, * ppcboot.c, * som.c,
      	* srec.c, * tekhex.c, * verilog.c, * versados.c, * vms-alpha.c,
      	* xsym.c: Don't define various link_hash_table_free defines, and
      	remove from bfd_target vars.  Temporarily reference some of the
      	target link_hash_table_free functions to avoid warnings.
      	* bfd-in2.h: Regenerate.
      	* libbfd.h: Regenerate.
      ld/
      	PR 17047
      	* ldlang.c (output_bfd_hash_table_free_fn): Delete.
      	(open_output): Don't set it..
      	* ldmain.c (ld_cleanup): ..or call it.
      caa4096e
  9. 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.
      
      bfd/
      	* 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.
      binutils/
      	* emul_aix.c: Update bfd target vector naming.
      	* testsuite/binutils-all/objcopy.exp: Likewise.
      ld/
      	* emultempl/metagelf.em: Update bfd target vector naming.
      	* emultempl/nios2elf.em: Likewise.
      	* emultempl/spuelf.em: Likewise.
      	* emultempl/tic6xdsbt.em: Likewise.
      6d00b590
  10. 05 Mar, 2014 1 commit
  11. 17 Dec, 2013 1 commit
    • H.J. Lu's avatar
      Default elf_backend_post_process_headers to set OSABI · 78245035
      H.J. Lu authored
      	* elf-bfd.h (_bfd_elf_set_osabi): Renamed to ...
      	(_bfd_elf_post_process_headers): This.
      	* elf.c (_bfd_elf_compute_section_file_positions): Always
      	call elf_backend_post_process_headers.
      	(_bfd_elf_set_osabi): Renamed to ...
      	(_bfd_elf_post_process_headers): This.
      	* elf32-hppa.c (elf_backend_post_process_headers): Removed.
      	* elf32-i370.c (elf_backend_post_process_headers): Likewise.
      	* elf32-msp430.c (elf_backend_post_process_headers): Likewise.
      	* elf32-ppc.c (elf_backend_post_process_headers): Likewise.
      	* elf32-sparc.c (elf_backend_post_process_headers): Likewise.
      	* elf64-hppa.c (elf_backend_post_process_headers): Likewise.
      	* elf64-ppc.c (elf_backend_post_process_headers): Likewise.
      	* elf64-sparc.c (elf_backend_post_process_headers): Likewise.
      	* elf64-x86-64.c (elf_backend_post_process_headers): Likewise.
      	*  (elf_backend_post_process_headers): Likewise.
      	*  (elf_backend_post_process_headers): Likewise.
      	* elf32-i386.c (elf_backend_post_process_headers): Don't
      	define as _bfd_elf_set_osabi.
      	(elf_i386_fbsd_post_process_headers): Updated.
      	* elf32-mips.c (elf_fbsd_post_process_headers): Removed.
      	(elf_backend_post_process_headers): Likewise.
      	* elf32-tic6x.c (elf32_tic6x_set_osabi): Removed.
      	(elf_backend_post_process_headers): Likewise.
      	* elf64-mips.c (elf_fbsd_post_process_headers): Removed.
      	(elf_backend_post_process_headers): Likewise.
      	* elfn32-mips.c (elf_fbsd_post_process_headers): Removed.
      	(elf_backend_post_process_headers): Likewise.
      	* elfnn-aarch64.c (elfNN_aarch64_post_process_headers): Updated.
      	* elfxx-target.h (elf_backend_post_process_headers): Default
      	to _bfd_elf_post_process_headers.
      78245035
  12. 27 Mar, 2013 1 commit
    • Alan Modra's avatar
      * elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc. · 7e612e98
      Alan Modra authored
      	(struct elf_backend_data <elf_backed_reloc_type_class>): Add
      	bfd_link_info* and asection* params.
      	(_bfd_elf_reloc_type_class): Likewise.
      	* elf.c (_bfd_elf_reloc_type_class): Likewise.
      	* elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
      	(elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
      	* elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
      	for any reliplt reloc.  Don't return reloc_class_plt for
      	R_PPC_REL24 and R_PPC_ADDR24.
      	* elf64-ppc.c (allocate_got): Formatting.
      	(ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
      	reliplt reloc.
      	* elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
      	* elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
      	* elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
      	* elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
      	* elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
      	* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
      	* elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
      	Add extra params to the various reloc_type_class functions.
      7e612e98
  13. 21 Feb, 2013 1 commit
    • Alan Modra's avatar
      * elf-bfd.h (struct core_elf_obj_tdata): New. · 228e534f
      Alan Modra authored
      	(struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
      	core_program, and core_command.  Add "core".
      	* elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
      	Update all refs to tdata core fields.
      	* elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
      	* elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
      	* elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
      	* elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
      	* elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
      	* elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
      	* elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
      	to tdata core fields.
      228e534f
  14. 21 Sep, 2011 1 commit
    • David S. Miller's avatar
      Annotate sparc objects with cpu hardware capabilities used. · 9e8c70f9
      David S. Miller authored
      bfd/
      
      	* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
      	* elfxx-sparc.h: Declare it.
      	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
      	* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
      
      binutils/
      
      	* readelf.c (display_sparc_hwcaps): New.
      	(display_sparc_gnu_attribute): New.
      	(process_sparc_specific): New.
      	(process_arch_specific): When EM_SPARC, EM_SPARC32PLUS,
      	or EM_SPARCV9 invoke process_sparc_specific.
      
      gas/
      
      	* config/tc-sparc.c (hwcap_seen): New bitmask, defined when
      	not TE_SOLARIS.
      	(sparc_ip): When not TE_SOLARIS, accumulate hwcap bits from
      	sparc_opcode->flags of instruction into hwcap_seen.
      	(sparc_md_end): Create Tag_GNU_Sparc_HWCAPS attribute if
      	hwcap_seen is non-zero and not TE_SOLARIS.
      
      gas/testsuite/
      
      	* gas/sparc/hpcvis3.s: Update for fixed fchksum16 mnemonic.
      	* gas/sparc/hpcvis3.d: Likewise.
      
      include/elf/
      
      	* sparc.h (Tag_GNU_Sparc_HWCAPS): New object attribute.
      	(ELF_SPARC_HWCAP_*): New HWCAPS bitmask values.
      
      include/opcode/
      
      	* sparc.h (struct sparc_opcode): Expand 'flags' to unsigned int.
      	(F_MUL32, F_DIV32, F_FSMULD, F_V8PLUS, F_POPC, F_VIS, F_VIS2,
      	F_ASI_BLK_INIT, F_FMAF, F_VIS3, F_HPC, F_RANDOM, F_TRANS,
      	F_FJFMAU, F_IMA, F_ASI_CACHE_SPARING): New flag bits.
      
      opcodes/
      
      	* sparc-opc.c (sparc_opcodes): Annotate table with HWCAP flag
      	bits.  Fix "fchksm16" mnemonic.
      9e8c70f9
  15. 11 Apr, 2011 1 commit
    • Nick Clifton's avatar
      PR 10549 · f64b2e8d
      Nick Clifton authored
      	* elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
      	(has_gnu_symbols): Renamed from has_ifunc_symbols.
      	* elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
      	* elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
      	also if STB_GNU_UNIQUE symbol binding was seen.
      	* elf32-i386.c (elf_i386_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.
      
      	* ld-unique: New directory.
      	* ld-unique/unique.exp: New file: Run the UNIQUE tests.
      	* ld-unique/unique.s: New test file.
      	* ld-unique/unique_empty.s: Likewise.
      	* ld-unique/unique_shared.s: Likewise.
      f64b2e8d
  16. 22 Oct, 2010 1 commit
    • Rainer Orth's avatar
      ld: · 1360ba76
      Rainer Orth authored
      	* emulparams/elf32_sparc_sol2.sh (OUTPUT_FORMAT): Set to
      	elf32-sparc-sol2.
      	* emulparams/elf64_sparc_sol2.sh (OUTPUT_FORMAT): Set to
      	elf64-sparc-sol2.
      
      	gas:
      	* config/tc-sparc.h [TE_SOLARIS] (ELF_TARGET_FORMAT): Define as
      	elf32-sparc-sol2.
      	(ELF64_TARGET_FORMAT): Define as elf64-sparc-sol2.
      
      	bfd:
      	* elfxx-sparc.c (tpoff): Define bed, static_tls_size.
      	Consider static_tls_alignment.
      
      	* elf32-sparc.c (TARGET_BIG_SYM): Redefine to
      	bfd_elf32_sparc_sol2_vec.
      	(TARGET_BIG_NAME): Redefine to elf32-sparc-sol2.
      	(elf32_bed): Redefine to elf32_sparc_sol2_bed.
      	(elf_backend_static_tls_alignment): Redefine to 8.
      	Include elf32-target.h.
      	(elf_backend_static_tls_alignment): Undef again for VxWorks.
      
      	* elf64-sparc.c (TARGET_BIG_SYM): Redefine to
      	bfd_elf64_sparc_sol2_vec.
      	(TARGET_BIG_NAME): Redefine to elf64-sparc-sol2.
      	(ELF_OSABI): Undef.
      	(elf64_bed): Redefine to elf64_sparc_sol2_bed.
      	(elf_backend_static_tls_alignment): Redefine to 16.
      	Include elf64-target.h.
      
      	* config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*.
      	Set targ_defvec to bfd_elf32_sparc_sol2_vec.
      	[BFD64] (sparc-*-solaris2*): Set targ_defvec to
      	bfd_elf32_sparc_sol2_vec.
      	Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in
      	targ_selvecs.
      
      	* configure.in: Handle bfd_elf32_sparc_sol2_vec,
      	bfd_elf64_sparc_sol2_vec.
      	* configure: Regenerate.
      
      	* targets.c (bfd_elf32_sparc_sol2_vec): Declare.
      	(bfd_elf64_sparc_sol2_vec): Declare.
      	(_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec,
      	bfd_elf64_sparc_sol2_vec.
      1360ba76
  17. 25 Aug, 2010 1 commit
    • H.J. Lu's avatar
      Add target_id to elf_backend_data. · ae95ffa6
      H.J. Lu authored
      2010-08-25  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR ld/11944
      	* elf-bfd.h (elf_backend_data): Add target_id.
      	(bfd_elf_make_generic_object): Renamed to ...
      	(bfd_elf_make_object): This.
      
      	* elf.c (bfd_elf_make_generic_object): Removed.
      	(bfd_elf_make_object): New.
      	(bfd_elf_mkcorefile): Really treat it as an object file.
      
      	* elf-m10300.c (ELF_TARGET_ID): New.
      	* elf32-arm.c (ELF_TARGET_ID): Likewise.
      	* elf32-bfin.c (ELF_TARGET_ID): Likewise.
      	* elf32-cris.c (ELF_TARGET_ID): Likewise.
      	* elf32-frv.c (ELF_TARGET_ID): Likewise.
      	* elf32-i386.c (ELF_TARGET_ID): Likewise.
      	* elf32-lm32.c (ELF_TARGET_ID): Likewise.
      	* elf32-m32r.c (ELF_TARGET_ID): Likewise.
      	* elf32-m68hc11.c (ELF_TARGET_ID): Likewise.
      	* elf32-m68hc12.c (ELF_TARGET_ID): Likewise.
      	* elf32-m68k.c (ELF_TARGET_ID): Likewise.
      	* elf32-microblaze.c (ELF_TARGET_ID): Likewise.
      	* elf32-ppc.c (ELF_TARGET_ID): Likewise.
      	* elf32-s390.c (ELF_TARGET_ID): Likewise.
      	* elf32-sh.c (ELF_TARGET_ID): Likewise.
      	* elf32-sparc.c (ELF_TARGET_ID): Likewise.
      	* elf32-spu.c (ELF_TARGET_ID): Likewise.
      	* elf32-tic6x.c (ELF_TARGET_ID): Likewise.
      	* elf32-xtensa.c (ELF_TARGET_ID): Likewise.
      	* elf64-alpha.c (ELF_TARGET_ID): Likewise.
      	* elf64-hppa.c (ELF_TARGET_ID): Likewise.
      	* elf64-ppc.c (ELF_TARGET_ID): Likewise.
      	* elf64-s390.c (ELF_TARGET_ID): Likewise.
      	* elf64-x86-64.c (ELF_TARGET_ID): Likewise.
      	* elfxx-ia64.c (ELF_TARGET_ID): Likewise.
      
      	* elf32-hppa.c (elf32_hppa_mkobject): Removed.
      	(bfd_elf32_mkobject): Likewise.
      	(ELF_TARGET_ID): New.
      
      	* elf32-mips.c (ELF_TARGET_ID): New.
      	(bfd_elf32_mkobject): Removed.
      
      	* elf64-mips.c (ELF_TARGET_ID): New.
      	(bfd_elf64_mkobject): Removed.
      
      	* elfn32-mips.c (ELF_TARGET_ID): New.
      	(bfd_elf32_mkobject): Removed.
      
      	* elfxx-mips.c (_bfd_mips_elf_mkobject): Removed.
      	* elfxx-mips.h (_bfd_mips_elf_mkobject): Likewise.
      
      	* elfxx-target.h (bfd_elfNN_mkobject): Default to
      	bfd_elf_make_object.
      	(ELF_TARGET_ID): New.  Default to GENERIC_ELF_DATA.
      	(elfNN_bed): Initialize target_id.
      ae95ffa6
  18. 19 Feb, 2010 1 commit
    • H.J. Lu's avatar
      Don't set ELFOSABI_LINUX in dynamic ifunc-using executable. · c16153ae
      H.J. Lu authored
      bfd/
      
      2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* elf32-i386.c (elf_i386_add_symbol_hook): Don't set
      	has_ifunc_symbols if the symbol comes from a shared library.
      	* 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 (elf64_x86_64_add_symbol_hook): Likewise.
      
      ld/testsuite/
      
      2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* ld-ifunc/ifunc.exp: Expect System V OSABI in dynamic
      	ifunc-using executable.
      c16153ae
  19. 08 Feb, 2010 1 commit
    • David S. Miller's avatar
      include/ · d0c9aeb3
      David S. Miller authored
      	* elf/sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define.
      
      bfd/
      
      	* reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
      	(BFD_RELOC_SPARC_IRELATIVE): Likewise.
      	* bfd-in2.h: Regenerate.
      	* libbfd.h: Regenerate.
      
      	* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
      	and loc_hash_memory.
      	(_bfd_sparc_elf_link_hash_table_free): Declare.
      	* elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
      	(elf_backend_add_symbol_hook, elf_backend_post_process_headers,
      	bfd_elf32_bfd_link_hash_table_free): Define.
      	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
      	has_ifunc_symbols if STT_GNU_IFUNC.
      	(bfd_elf64_bfd_link_hash_table_free): Define.
      	(elf_backend_post_process_headers): Define always.
      	* elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
      	(sparc_reloc_map): Add entries for new IFUNC relocs.
      	(_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
      	(_bfd_sparc_elf_info_to_howto_ptr): Likewise.
      	(elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
      	elf_sparc_get_local_sym_hash): New.
      	(_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
      	from here...
      	(_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
      	local hash table.
      	(_bfd_sparc_elf_link_hash_table_free): New.
      	(create_ifunc_sections): New.
      	(_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
      	and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
      	cons up a fake local hash table entry for it.  Unconditionally add
      	a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
      	dyn relocs for ifunc.
      	(_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
      	(allocate_dynrelocs):  Unconditionally emit a PLT entry when STT_GNU_IFUNC
      	and h->def_regular.  Count GOT dyn relocs for ifunc.
      	(allocate_local_dynrelocs): New function.
      	(_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash table.
      	Emit dynamic relocs to irelplt when not shared.  Treat iplt like splt.
      	(_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
      	(_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
      	in iplt/irelplt.
      
      ld/testsuite/
      
      	* ld-ifunc/ifunc.exp: Run for sparc.
      d0c9aeb3
  20. 02 Sep, 2009 1 commit
  21. 03 Jul, 2007 1 commit
  22. 26 Apr, 2007 1 commit
    • Alan Modra's avatar
      · 3db64b00
      Alan Modra authored
      bfd/
      	Many files: Include sysdep.h before bfd.h.
      	* Makefile.am: Run "make dep-am".
      	* Makefile.in: Regenerate.
      binutils/
      	* bucumm.h: Split off host dependencies to..
      	* sysdep.h: ..here.
      	Many files: Include sysdep.h.  Remove duplicate headers and reorder.
      	* Makefile.am: Run "make dep-am".
      	* Makefile.in: Regenerate.
      ld/
      	Many files: Include sysdep.h first.  Remove duplicate headers.
      	* Makefile.am: Run "make dep-am".
      	* Makefile.in: Regenerate.
      opcodes/
      	* Makefile.am: Run "make dep-am".
      	* Makefile.in: Regenerate.
      	* ns32k-dis.c: Include sysdep.h first.
      3db64b00
  23. 26 Mar, 2007 1 commit
    • Alan Modra's avatar
      * aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define. · 157090f7
      Alan Modra authored
      	* aout-arm.c (MY_bfd_reloc_name_lookup): Define.
      	(MY (bfd_reloc_name_lookup)): New function.
      	* aout-ns32k.c (MY (bfd_reloc_name_lookup)): New function.
      	* aout-target.h (NAME (aout, reloc_name_lookup)): Declare.
      	(MY_bfd_reloc_name_lookup): Define.
      	* aout-tic30.c (tic30_aout_reloc_name_lookup): New function.
      	(MY_bfd_reloc_name_lookup): Define.
      	* aoutx.h (NAME (aout, reloc_type_lookup)): Don't declare.
      	(NAME (aout, reloc_name_lookup)): New function.
      	* bout.c (b_out_bfd_reloc_name_lookup): New function.
      	* coff-alpha.c (alpha_bfd_reloc_name_lookup): New function.
      	(_bfd_ecoff_bfd_reloc_name_lookup): Define.
      	* coff-arm.c (coff_arm_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-i386.c (coff_bfd_reloc_name_lookup): Define.
      	(coff_i386_reloc_name_lookup): New function.
      	* coff-i860.c (coff_i860_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-i960.c (coff_i960_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-m68k.c (m68k_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-maxq.c (maxq_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-mcore.c (mcore_coff_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-mips.c (mips_bfd_reloc_name_lookup): New function.
      	(_bfd_ecoff_bfd_reloc_name_lookup): Define.
      	* coff-ppc.c (ppc_coff_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-rs6000.c (coff_bfd_reloc_name_lookup): Define.
      	(_bfd_xcoff_reloc_name_lookup): New function.
      	(rs6000coff_vec, pmac_xcoff_vec): Init new field.
      	* coff-sh.c (coff_bfd_reloc_name_lookup): Define.
      	(sh_coff_reloc_name_lookup): New function.
      	* coff-sparc.c (coff_sparc_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-tic30.c (coff_bfd_reloc_name_lookup): Define.
      	(tic30_coff_reloc_name_lookup): New function.
      	* coff-tic4x.c (coff_bfd_reloc_name_lookup): Define.
      	(tic4x_coff_reloc_name_lookup): New function.
      	* coff-tic54x.c (coff_bfd_reloc_name_lookup): Define.
      	(tic54x_coff_reloc_name_lookup): New function.
      	* coff-x86_64.c (coff_bfd_reloc_name_lookup): Define.
      	(coff_amd64_reloc_name_lookup): New function.
      	* coff-z80.c (coff_z80_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff-z8k.c (coff_z8k_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* coff64-rs6000.c (coff_bfd_reloc_name_lookup): Define.
      	(xcoff64_reloc_name_lookup): New function.
      	(rs6000coff64_vec, aix5coff64_vec): Init new field.
      	* coffcode.h (coff_bfd_reloc_name_lookup): Define.
      	* elf-hppa.h (elf_hppa_reloc_name_lookup): New function.
      	* elf-m10200.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf-m10300.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-arc.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-arm.c (elf32_arm_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-avr.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-bfin.c (bfin_bfd_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-cr16c.c (elf_cr16c_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-cris.c (cris_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-crx.c (elf_crx_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-d10v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-d30v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-dlx.c (elf32_dlx_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-fr30.c (fr30_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-frv.c (frv_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-gen.c (bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-h8300.c (elf32_h8_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-hppa.c (bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-i370.c (i370_elf_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-i386.c (elf_i386_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-i860.c (elf32_i860_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-i960.c (elf32_i960_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-ip2k.c (ip2k_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-iq2000.c (iq2000_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-m32c.c (m32c_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-m32r.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-m68hc11.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-m68hc12.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-m68k.c (reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-m88k.c (bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-mcore.c (mcore_elf_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-mep.c (mep_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	(mips_vxworks_bfd_reloc_name_lookup): Likewise.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-msp430.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-mt.c (mt_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-openrisc.c (openrisc_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-or32.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elf32-pj.c (pj_elf_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-ppc.c (ppc_elf_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-s390.c (elf_s390_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-score.c (elf32_score_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-sh.c (sh_elf_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-sparc.c (bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-spu.c (spu_elf_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-v850.c (v850_elf_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-vax.c (reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-xc16x.c (xc16x_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-xstormy16.c (xstormy16_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf32-xtensa.c (elf_xtensa_reloc_name_lookup): New function.
      	(bfd_elf32_bfd_reloc_name_lookup): Define.
      	* elf64-alpha.c (elf64_alpha_bfd_reloc_name_lookup): New function.
      	(bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elf64-gen.c (bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elf64-hppa.c (bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elf64-mips.c (bfd_elf64_bfd_reloc_name_lookup): New function.
      	* elf64-mmix.c (bfd_elf64_bfd_reloc_name_lookup): New function.
      	* elf64-ppc.c (ppc64_elf_reloc_name_lookup): New function.
      	(bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elf64-s390.c (elf_s390_reloc_name_lookup): New function.
      	(bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elf64-sh64.c (sh_elf64_reloc_name_lookup): New function.
      	(bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elf64-sparc.c (bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elf64-x86-64.c (elf64_x86_64_reloc_name_lookup): New function.
      	(bfd_elf64_bfd_reloc_name_lookup): Define.
      	* elfn32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
      	* elfxx-ia64.c (elfNN_ia64_reloc_name_lookup): New function.
      	(bfd_elfNN_bfd_reloc_name_lookup): Define.
      	* elfxx-sparc.c (_bfd_sparc_elf_reloc_name_lookup): New function.
      	* elfxx-sparc.h (_bfd_sparc_elf_reloc_name_lookup): Declare.
      	* i386msdos.c (msdos_bfd_reloc_name_lookup): Define.
      	* i386os9k.c (aout_32_bfd_reloc_name_lookup): Define.
      	* ieee.c (ieee_bfd_reloc_name_lookup): Define.
      	* libaout.h (NAME (aout, reloc_name_lookup)): Declare.
      	* libbfd-in.h (_bfd_norelocs_bfd_reloc_name_lookup): Declare.
      	* mipsbsd.c (MY_bfd_reloc_name_lookup): Define.
      	(MY(reloc_type_lookup)): Rename from MY(reloc_howto_type_lookup).
      	(MY(reloc_name_lookup)): New function.
      	* nlm-target.h (nlm_bfd_reloc_name_lookup): Define.
      	* oasys.c (oasys_bfd_reloc_name_lookup): Define.
      	* pdp11.c (NAME (aout, reloc_name_lookup)): New function.
      	* pe-mips.c (coff_mips_reloc_name_lookup): New function.
      	(coff_bfd_reloc_name_lookup): Define.
      	* reloc.c (bfd_reloc_name_lookup): New function.
      	* riscix.c (riscix_reloc_name_lookup): New function.
      	(MY_bfd_reloc_name_lookup): Define.
      	* som.c (som_bfd_reloc_name_lookup): New function.
      	* targets.c (struct bfd_target): Add reloc_name_lookup.
      	(BFD_JUMP_TABLE_RELOCS): Add NAME##_bfd_reloc_name_lookup.
      	* versados.c (versados_bfd_reloc_name_lookup): Define.
      	* vms.c (vms_bfd_reloc_name_lookup): New function.
      	* bfd-in2.h: Regenerate.
      	* libbfd.h: Regenerate.
      157090f7
  24. 17 Oct, 2006 1 commit
    • Alan Modra's avatar
      bfd/ · 74541ad4
      Alan Modra authored
      	* elf-bfd.h (struct elf_link_hash_table): Reorder.  Add
      	text_index_section and data_index_section.
      	(struct elf_backend_data): Add elf_backend_init_index_section.
      	(_bfd_elf_init_1_index_section): Declare.
      	(_bfd_elf_init_2_index_sections): Declare.
      	* elfxx-target.h (elf_backend_init_index_section): Define.
      	(elfNN_bed): Init new field.
      	* elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls
      	section and text_index_section plus data_index_section.
      	(_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections.
      	(_bfd_elf_init_1_index_section): New function.
      	(_bfd_elf_init_2_index_sections): New function.
      	(bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section.
      	(elf_link_input_bfd): When emitting relocs, use text_index_section
      	and data_index_section for removed sections.
      	* elf-m10300.c (elf_backend_omit_section_dynsym): Define.
      	* elf32-i386.c: Likewise.
      	* elf32-m32r.c: Likewise.
      	* elf32-sh.c: Likewise.
      	* elf32-xstormy16.c: Likewise.
      	* elf32-xtensa.c: Likewise.
      	* elf64-alpha.c: Likewise.
      	* elf64-hppa.c: Likewise.
      	* elf64-mmix.c: Likewise.
      	* elf64-sh64.c: Likewise.
      	* elfxx-ia64.c: Likewise.
      	* elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section
      	and data_index_section sym for relocs against sections with no dynamic
      	section sym.
      	(elf_backend_init_index_section): Define.
      	* elf32-cris.c: Similarly.
      	* elf32-hppa.c: Similarly.
      	* elf32-i370.c: Similarly.
      	* elf32-m68k.c: Similarly.
      	* elf32-mips.c: Similarly.
      	* elf32-ppc.c: Similarly.
      	* elf32-s390.c: Similarly.
      	* elf32-sparc.c: Similarly.
      	* elf32-vax.c: Similarly.
      	* elf64-mips.c: Similarly.
      	* elf64-ppc.c: Similarly.
      	* elf64-s390.c: Similarly.
      	* elf64-sparc.c: Similarly.
      	* elf64-x86-64.c: Similarly.
      	* elfn32-mips.c: Similarly.
      	* elfxx-mips.c: Similarly.
      	* elfxx-sparc.c: Similarly.
      	* linker.c (fix_syms): Base symbols in removed sections on
      	previous section in preference to using absolute section.
      
      ld/
      	* ldlang.c (strip_excluded_output_sections): Do strip sections
      	that define syms, but don't ignore them.
      	* ld.texinfo (Output Section Discarding): Revise.
      	* emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call
      	finish_default.
      
      ld/testsuite/
      	Update for section sym changes.
      74541ad4
  25. 30 May, 2006 1 commit
    • H.J. Lu's avatar
      bfd/ · 24718e3b
      H.J. Lu authored
      2006-05-30  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* bfd.c (bfd_emul_get_maxpagesize): New.
      	(bfd_elf_set_pagesize): Likewise.
      	(bfd_emul_set_maxpagesize): Likewise.
      	(bfd_emul_get_commonpagesize): Likewise.
      	(bfd_emul_set_commonpagesize): Likewise.
      	* bfd-in2.h: Regenerated.
      
      	* elf-bfd.h (elf_backend_data): Add commonpagesize.
      	(xvec_get_elf_backend_data): New.
      	(get_elf_backend_data): Use xvec_get_elf_backend_data.
      
      	* elf32-arm.c (elf32_arm_vxworks_bed): Remove const.
      	* elfxx-target.h (elfNN_bed): Likewise.
      
      	* elf32-arm.c (ELF_COMMONPAGESIZE): Defined.
      	* elf32-mips.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf32-ppc.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf32-sh.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf32-sh64.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf32-sparc.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf64-alpha.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf64-sparc.c (ELF_COMMONPAGESIZE): Likewise.
      	* elf64-x86-64.c (ELF_COMMONPAGESIZE): Likewise.
      	* elfn32-mips.c (ELF_COMMONPAGESIZE): Likewise.
      	* elfxx-ia64.c (ELF_COMMONPAGESIZE): Likewise.
      
      	* elfxx-target.h (ELF_COMMONPAGESIZE): Define if not defined.
      	(elfNN_bed): Initialize commonpagesize with ELF_COMMONPAGESIZE.
      
      	* targets.c (bfd_find_target): Support NULL abfd.
      
      ld/
      
      2006-05-30  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* emulparams/arcelf.sh (MAXPAGESIZE): Changed to
      	"CONSTANT (MAXPAGESIZE)".
      	* emulparams/armelf_nbsd.sh: Likewise.
      	* emulparams/armelf_vxworks.sh: Likewise.
      	* emulparams/armnto.sh: Likewise.
      	* emulparams/armsymbian.sh: Likewise.
      	* emulparams/crislinux.sh: Likewise.
      	* emulparams/elf32_i860.sh: Likewise.
      	* emulparams/elf32_i960.sh: Likewise.
      	* emulparams/elf32am33lin.sh: Likewise.
      	* emulparams/elf32bfinfd.sh: Likewise.
      	* emulparams/elf32bmipn32-defs.sh: Likewise.
      	* emulparams/elf32frvfd.sh: Likewise.
      	* emulparams/elf32i370.sh: Likewise.
      	* emulparams/elf32lppcnto.sh: Likewise.
      	* emulparams/elf32mcore.sh: Likewise.
      	* emulparams/elf32openrisc.sh: Likewise.
      	* emulparams/elf32ppcnto.sh: Likewise.
      	* emulparams/elf32ppcwindiss.sh: Likewise.
      	* emulparams/elf32vax.sh: Likewise.
      	* emulparams/elf32xc16x.sh: Likewise.
      	* emulparams/elf32xc16xl.sh: Likewise.
      	* emulparams/elf32xc16xs.sh: Likewise.
      	* emulparams/elf64_aix.sh: Likewise.
      	* emulparams/elf64hppa.sh: Likewise.
      	* emulparams/elf64mmix.sh: Likewise.
      	* emulparams/elf_i386_be.sh: Likewise.
      	* emulparams/elf_i386_chaos.sh: Likewise.
      	* emulparams/elf_i386_ldso.sh: Likewise.
      	* emulparams/hppa64linux.sh: Likewise.
      	* emulparams/hppalinux.sh: Likewise.
      	* emulparams/hppaobsd.sh: Likewise.
      	* emulparams/i386lynx.sh: Likewise.
      	* emulparams/i386moss.sh: Likewise.
      	* emulparams/i386nto.sh: Likewise.
      	* emulparams/i386nw.sh: Likewise.
      	* emulparams/m32relf_linux.sh: Likewise.
      	* emulparams/m68kpsos.sh: Likewise.
      	* emulparams/or32elf.sh: Likewise.
      	* emulparams/pjelf.sh: Likewise.
      	* emulparams/pjlelf.sh: Likewise.
      	* emulparams/ppclynx.sh: Likewise.
      	* emulparams/ppcnw.sh: Likewise.
      	* emulparams/shelf32_nbsd.sh : Likewise.
      	* emulparams/shelf_nbsd.sh: Likewise.
      	* emulparams/shelf_nto.sh: Likewise.
      	* emulparams/shlelf_nto.sh: Likewise.
      	* emulparams/xtensa-config.sh: Likewise.
      
      	* emulparams/armelf_linux.sh (MAXPAGESIZE): Changed to
      	"CONSTANT (MAXPAGESIZE)".
      	(COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)".
      	* emulparams/elf32_sparc.sh: Likewise.
      	* emulparams/elf32bmip.sh: Likewise.
      	* emulparams/elf32ppccommon.sh: Likewise.
      	* emulparams/elf64_ia64.sh: Likewise.
      	* emulparams/elf64_s390.sh: Likewise.
      	* emulparams/elf64_sparc.sh: Likewise.
      	* emulparams/elf64alpha.sh: Likewise.
      	* emulparams/elf64ppc.sh: Likewise.
      	* emulparams/elf_i386.sh: Likewise.
      	* emulparams/elf_i386_vxworks.sh: Likewise.
      	* emulparams/elf_s390.sh: Likewise.
      	* emulparams/elf_x86_64.sh: Likewise.
      	* emulparams/shlelf32_linux.sh: Likewise.
      	* emulparams/shlelf_linux.sh: Likewise.
      
      	* emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Changed to
      	"CONSTANT (COMMONPAGESIZE)".
      	* emulparams/elf32btsmipn32.sh: Likewise.
      
      	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
      	"-z max-page-size=" and "-z common-page-size=".
      	(gld${EMULATION_NAME}_list_options): Likewise.
      
      	* ld.h (ld_config_type): Add maxpagesize and commonpagesize.
      
      	* ld.texinfo: Document "-z max-page-size=" and
      	"-z common-page-size=".
      
      	* ldexp.c (exp_print_token): Handle CONSTANT.
      	(fold_name): Likewise.
      	* ldgram.y: Likewise.
      	* ldlex.l: Likewise.
      
      	* ldmain.c (main): Initiliaze config.maxpagesize and
      	config.commonpagesize. Call bfd_emul_set_maxpagesize if
      	config.maxpagesize isn't 0. Call bfd_emul_set_commonpagesize if
      	config.commonpagesize config.maxpagesize isn't 0.
      ld/testsuite/
      
      2006-05-30  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* ld-elf/binutils.exp: New file.
      	* ld-elf/commonpage1.d: Likewise.
      	* ld-elf/maxpage1.d: Likewise.
      	* ld-elf/maxpage1.s: Likewise.
      24718e3b
  26. 05 Apr, 2006 1 commit
    • Richard Sandiford's avatar
      bfd/ · 910600e9
      Richard Sandiford authored
      	* config.bfd (sparc-*-vxworks*): New stanza.
      	* configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
      	(bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
      	* configure: Regenerate.
      	* elf32-sparc.c: Include elf-vxworks.h.
      	(elf32_sparc_vxworks_link_hash_table_create: New.
      	(elf32_sparc_vxworks_final_write_processing): New.
      	(TARGET_BIG_SYM): Override for VxWorks.
      	(TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
      	(bfd_elf32_bfd_link_hash_table_create): Likewise.
      	(elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
      	(elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
      	(elf_backend_link_output_symbol_hook): Likewise.
      	(elf_backend_emit_relocs): Likewise.
      	(elf_backend_final_write_processing, elf32_bed): Likewise.
      	* elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
      	(sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
      	(sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
      	(_bfd_sparc_elf_link_hash_table_create): Don't initialize
      	build_plt_entry here.
      	(create_got_section): Initialize sgotplt for VxWorks.
      	(_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
      	plt_header_size and plt_entry_size, with new VxWorks-specific settings.
      	Call elf_vxworks_create_dynamic_sections for VxWorks.
      	(allocate_dynrelocs): Use plt_header_size and plt_entry_size.
      	Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
      	(_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
      	for VxWorks.  Check for the .got.plt section.
      	(sparc_vxworks_build_plt_entry): New function.
      	(_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
      	Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
      	absolute on VxWorks.
      	(sparc32_finish_dyn): Add special handling for DT_RELASZ
      	and DT_PLTGOT on VxWorks.
      	(sparc_vxworks_finish_exec_plt): New.
      	(sparc_vxworks_finish_shared_plt): New.
      	(_bfd_sparc_elf_finish_dynamic_sections): Call them.
      	Use plt_header_size and plt_entry_size.
      	* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
      	srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
      	* Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
      	(elf32-sparc.lo): Likewise.
      	* Makefile.in: Regenerate.
      	* targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
      	(_bfd_target_vector): Add a pointer to it.
      
      gas/
      	* config/tc-sparc.c (sparc_target_format): Handle TE_VXWORKS.
      	(GOTT_BASE, GOTT_INDEX): New.
      	(tc_gen_reloc): Don't alter relocations against GOTT_BASE and
      	GOTT_INDEX when generating VxWorks PIC.
      	* configure.tgt (sparc*-*-vxworks*): Remove this special case;
      	use the generic *-*-vxworks* stanza instead.
      
      gas/testsuite/
      	* gas/sparc/vxworks-pic.s, gas/sparc/vxworks-pic.d: New test.
      	* gas/sparc/sparc.exp: Run it.  Remove sparc*-*-vxworks* XFAILs.
      
      ld/
      	* configure.tgt (sparc*-*-vxworks*): New stanza.
      	* emulparams/elf32_sparc_vxworks.sh: New file.
      	* Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
      	(eelf32_sparc_vxworks.c): New rule.
      	* Makefile.in: Regenerate.
      
      ld/testsuite/
      	* ld-sparc/vxworks1.dd, ld-sparc/vxworks1.ld, ld-sparc/vxworks1-lib.dd,
      	* ld-sparc/vxworks1-lib.nd, ld-sparc/vxworks1-lib.rd,
      	* ld-sparc/vxworks1-lib.s, ld-sparc/vxworks1.rd, ld-sparc/vxworks1.s,
      	* ld-sparc/vxworks1-static.d, ld-sparc/vxworks2.s,
      	* ld-sparc/vxworks2.sd, ld-sparc/vxworks2-static.sd: New tests.
      	* ld-sparc/sparc.exp: Run them.
      910600e9
  27. 04 May, 2005 2 commits
  28. 19 Apr, 2005 1 commit
    • David S. Miller's avatar
      * elfxx-sparc.c: New file. · 22b75d0a
      David S. Miller authored
      	* elfxx-sparc.h: New file.
      	* Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
      	(BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
      	(elfxx-sparc.lo): New rule.
      	(elf32-sparc.lo): Add elfxx-sparc.h dependency.
      	(elf64-sparc.lo): Likewise.
      	* configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
      	(bfd_elf64_sparc_vec): Likewise.
      	* configure: Regenerate.
      	* elf32-sparc.c: Remove common code now in elfxx-sparc.c
      	* elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
      	which is more consistent with elf32-sparc.c
      22b75d0a
  29. 11 Apr, 2005 1 commit
    • Jakub Jelinek's avatar
      2005-04-11 David S. Miller <davem@davemloft.net> · bd695bcc
      Jakub Jelinek authored
      	* elf32-sparc.c (elf32_sparc_relocate_section,
      	R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
      	R_SPARC_TLS_LE_{HIX22,LOX10}.
      	(elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
      	xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
      	(elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
      	or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
      
      	* ld-sparc/tlssunbin32.dd: Update for TLS relocation fixes.
      	* ld-sparc/tlssunbin32.rd: Likewise.
      	* ld-sparc/tlssunbin32.sd: Likewise.
      	* ld-sparc/tlssunpic32.dd: Likewise.
      bd695bcc
  30. 11 Jan, 2005 1 commit
    • Alan Modra's avatar
      * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning · 3eb128b2
      Alan Modra authored
      	symbols.
      	* elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
      	* elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
      	* elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
      	* elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
      	* elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
      	* elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
      	* elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
      	* elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
      	* elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
      	* elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
      	* elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
      	* elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
      	* elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
      	* elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
      3eb128b2
  31. 09 Jan, 2005 2 commits
  32. 21 Oct, 2004 1 commit
    • H.J. Lu's avatar
      bfd/ · dfeffb9f
      H.J. Lu authored
      2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR 463
      	* aoutx.h (aout_link_input_section_std): Pass proper hash entry
      	to linker reloc_overflow callback.
      	(aout_link_input_section_ext): Likewise.
      	(aout_link_reloc_link_order): Likewise.
      	* coff-a29k.c (coff_a29k_relocate_section): Likewise.
      	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
      	Likewise.
      	(alpha_relocate_section): Likewise.
      	* coff-arm.c (coff_arm_relocate_section): Likewise.
      	* coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
      	* coff-h8500.c (extra_case): Likewise.
      	* coff-i960.c (coff_i960_relocate_section): Likewise.
      	* coff-mcore.c (coff_mcore_relocate_section): Likewise.
      	* coff-mips.c (mips_relocate_section): Likewise.
      	* coff-or32.c (coff_or32_relocate_section): Likewise.
      	* coff-ppc.c (coff_ppc_relocate_section): Likewise.
      	* coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
      	* coff-sh.c (sh_relocate_section): Likewise.
      	* coff-tic80.c (coff_tic80_relocate_section): Likewise.
      	* coff-w65.c (w65_reloc16_extra_cases): Likewise.
      	* coff-z8k.c (extra_case): Likewise.
      	* coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
      	* cofflink.c (_bfd_coff_reloc_link_order): Likewise.
      	(_bfd_coff_generic_relocate_section): Likewise.
      	* ecoff.c (ecoff_reloc_link_order): Likewise.
      	* elf-hppa.h (elf_hppa_relocate_section): Likewise.
      	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
      	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
      	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
      	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
      	* elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
      	* elf32-cris.c (cris_elf_relocate_section): Likewise.
      	* elf32-crx.c (elf32_crx_relocate_section): Likewise.
      	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
      	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
      	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
      	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
      	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
      	* elf32-i370.c (i370_elf_relocate_section): Likewise.
      	* elf32-i386.c (elf_i386_relocate_section): Likewise.
      	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
      	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
      	* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
      	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
      	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
      	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
      	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
      	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
      	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
      	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
      	* elf32-s390.c (elf_s390_relocate_section): Likewise.
      	* elf32-sh.c (sh_elf_relocate_section): Likewise.
      	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
      	* elf32-v850.c (v850_elf_relocate_section): Likewise.
      	* elf32-vax.c (elf_vax_relocate_section): Likewise.
      	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
      	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
      	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
      	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
      	* elf64-s390.c (elf_s390_relocate_section): Likewise.
      	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
      	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
      	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
      	* elflink.c (elf_reloc_link_order): Likewise.
      	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
      	* elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
      	(_bfd_elf_mips_get_relocated_section_contents): Likewise.
      	* linker.c (_bfd_generic_reloc_link_order): Likewise.
      	* pdp11.c (pdp11_aout_link_input_section): Likewise.
      	(aout_link_reloc_link_order): Likewise.
      	* reloc.c (bfd_generic_get_relocated_section_contents):
      	Likewise.
      	* xcofflink.c (xcoff_reloc_link_order): Likewise.
      	* simple.c (simple_dummy_reloc_overflow): Updated.
      
      include/
      
      2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR 463
      	* bfdlink.h (bfd_link_callbacks): Add a pointer to struct
      	bfd_link_hash_entry to reloc_overflow.
      
      ld/
      
      2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR 463
      	* ldmain.c (reloc_overflow): Accept a pointer to struct
      	bfd_link_hash_entry. Report symbol location for relocation
      	overflow.
      dfeffb9f
  33. 23 Sep, 2004 1 commit
    • Alan Modra's avatar
      PR gas/396 · fca870e4
      Alan Modra authored
      	* elf32-sparc.c (elf32_sparc_final_write_processing): Handle
      	bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite.  Remove
      	redundant assignment of EM_SPARC.
      fca870e4
  34. 17 Sep, 2004 1 commit
    • Alan Modra's avatar
      include/ · f6e332e6
      Alan Modra authored
      	* bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
      	of union.
      bfd/
      	* ecoff.c: Update u.undef.next refs.
      	* elf64-ppc.c: Likewise.
      	* elflink.c: Likewise.
      	* linker.c: Likewise.
      	* xcofflink.c: Likewise.
      ld/
      	* ldexp.c (fold_name): Update u.undef.next refs.
      	* emultempl/pe.em: Likewise.
      	* emultempl/sunos.em: Likewise.
      
      bfd/
      	* elf-bfd.h (struct elf_link_hash_entry): Rearrange.  Add FIXME to
      	dynamic_def.  Combine weakdef and elf_hash_value.  Move vtable
      	fields to indirect struct.
      	* elf-m10300.c: Update u.weakdef refs.
      	* elf32-arm.h: Likewise.
      	* elf32-cris.c: Likewise.
      	* elf32-frv.c: Likewise.
      	* elf32-hppa.c: Likewise.
      	* elf32-i370.c: Likewise.
      	* elf32-i386.c: Likewise.
      	* elf32-m32r.c: Likewise.
      	* elf32-m68k.c: Likewise.
      	* elf32-ppc.c: Likewise.
      	* elf32-s390.c: Likewise.
      	* elf32-sh.c: Likewise.
      	* elf32-sparc.c: Likewise.
      	* elf32-vax.c: Likewise.
      	* elf32-xtensa.c: Likewise.
      	* elf64-alpha.c: Likewise.
      	* elf64-hppa.c: Likewise.
      	* elf64-ppc.c: Likewise.
      	* elf64-s390.c: Likewise.
      	* elf64-sh64.c: Likewise.
      	* elf64-sparc.c: Likewise.
      	* elf64-x86-64.c: Likewise.
      	* elfxx-ia64.c: Likewise.
      	* elfxx-mips.c: Likewise.
      	* elflink.c: Likewise.  Also u.elf_hash_value.
      	(elf_gc_propagate_vtable_entries_used): Update for h->vtable
      	indirection.
      	(elf_gc_smash_unused_vtentry_relocs): Likewise.
      	(bfd_elf_gc_record_vtinherit): Alloc vtable.
      	(bfd_elf_gc_record_vtentry): Likewise.
      	* elf.c (_bfd_elf_link_hash_newfunc): Use memset.
      f6e332e6
  35. 16 Sep, 2004 1 commit
    • Alan Modra's avatar
      * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags · f5385ebf
      Alan Modra authored
      	with bitfields.  Make "type" and "other" bitfields too.
      	(ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
      	ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
      	ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
      	ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
      	ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
      	ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
      	ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
      	(ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
      	* elf-hppa.h: Update all uses of elf_link_hash_flags.
      	* elf-m10300.c: Likewise.
      	* elf.c: Likewise.
      	* elf32-arm.h: Likewise.
      	* elf32-cris.c: Likewise.
      	* elf32-frv.c: Likewise.
      	* elf32-hppa.c: Likewise.
      	* elf32-i370.c: Likewise.
      	* elf32-i386.c: Likewise.
      	* elf32-m32r.c: Likewise.
      	* elf32-m68k.c: Likewise.
      	* elf32-ppc.c: Likewise.
      	* elf32-s390.c: Likewise.
      	* elf32-sh-symbian.c: Likewise.
      	* elf32-sh.c: Likewise.
      	* elf32-sh64.c: Likewise.
      	* elf32-sparc.c: Likewise.
      	* elf32-vax.c: Likewise.
      	* elf32-xtensa.c: Likewise.
      	* elf64-alpha.c: Likewise.
      	* elf64-hppa.c: Likewise.
      	* elf64-ppc.c: Likewise.
      	* elf64-s390.c: Likewise.
      	* elf64-sh64.c: Likewise.
      	* elf64-sparc.c: Likewise.
      	* elf64-x86-64.c: Likewise.
      	* elflink.c: Likewise.
      	* elfxx-ia64.c: Likewise.
      	* elfxx-mips.c: Likewise.
      	* configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
      	* configure: Regenerate.
      	* aclocal.m4: Regenerate.
      f5385ebf
  36. 13 Aug, 2004 1 commit
    • Alan Modra's avatar
      bfd/ · d003868e
      Alan Modra authored
      	* bfd.c (_bfd_default_error_handler): Handle %A and %B.
      	(bfd_archive_filename, bfd_get_section_ident): Delete.
      	* ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
      	bfd_archive_filename.
      	* elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
      	to warn about symbols in discarded sections.  Use _bfd_error_handler.
      	* aout-adobe.c (aout_adobe_callback): See below.
      	* aout-cris.c (swap_ext_reloc_in): ..
      	* coff-arm.c (find_thumb_glue, find_arm_glue,
      	coff_arm_relocate_section, bfd_arm_process_before_allocation,
      	coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
      	coff_arm_copy_private_bfd_data): ..
      	* coff-i860.c (i860_reloc_processing): ..
      	* coff-mcore.c (mcore_coff_unsupported_reloc,
      	coff_mcore_relocate_section): ..
      	* coff-ppc.c (coff_ppc_relocate_section): ..
      	* coff-rs6000.c (xcoff_create_csect_from_smclas
      	* coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
      	sh_swap_insns, sh_relocate_section): ..
      	* coff-tic54x.c (tic54x_reloc_processing): ..
      	* coff-tic80.c (coff_tic80_relocate_section): ..
      	* coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
      	* coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
      	coff_slurp_symbol_table, coff_classify_symbol,
      	coff_slurp_reloc_table): ..
      	* coffgen.c (_bfd_coff_read_string_table): ..
      	* cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
      	_bfd_coff_generic_relocate_section): ..
      	* cpu-arm.c (bfd_arm_merge_machines): ..
      	* cpu-sh.c (sh_merge_bfd_arch): ..
      	* elf-hppa.h (elf_hppa_relocate_section): ..
      	* elf.c (bfd_elf_string_from_elf_section, setup_group,
      	_bfd_elf_setup_group_pointers, bfd_section_from_shdr,
      	assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
      	copy_private_bfd_data, _bfd_elf_validate_reloc): ..
      	* elf32-arm.h (find_thumb_glue, find_arm_glue,
      	bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
      	elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
      	elf32_arm_relocate_section, elf32_arm_set_private_flags,
      	elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
      	* elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
      	cris_elf_merge_private_bfd_data
      	* elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
      	* elf32-gen.c (elf32_generic_link_add_symbols): ..
      	* elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
      	elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
      	elf32_hppa_relocate_section): ..
      	* elf32-i370.c (i370_elf_merge_private_bfd_data,
      	i370_elf_check_relocs, i370_elf_relocate_section): ..
      	* elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
      	elf_i386_relocate_section): ..
      	* elf32-m32r.c (m32r_elf_relocate_section,
      	m32r_elf_merge_private_bfd_data): ..
      	* elf32-m68hc1x.c (m68hc12_add_stub,
      	_bfd_m68hc11_elf_merge_private_bfd_data): ..
      	* elf32-m68k.c (elf_m68k_relocate_section): ..
      	* elf32-mcore.c (mcore_elf_unsupported_reloc,
      	mcore_elf_relocate_section): ..
      	* elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
      	ppc_elf_check_relocs, ppc_elf_relocate_section,
      	ppc_elf_begin_write_processing): ..
      	* elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
      	elf_s390_relocate_section): ..
      	* elf32-sh-symbian.c (sh_symbian_import_as,
      	sh_symbian_process_embedded_commands,
      	sh_symbian_relocate_section): ..
      	* elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
      	sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
      	sh_elf_merge_private_data): ..
      	* elf32-sparc.c (elf32_sparc_check_relocs,
      	elf32_sparc_relocate_section,
      	elf32_sparc_merge_private_bfd_data): ..
      	* elf32-v850.c (v850_elf_check_relocs,
      	v850_elf_merge_private_bfd_data): ..
      	* elf32-xtensa.c (elf_xtensa_check_relocs,
      	elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
      	* elf64-alpha.c (elf64_alpha_relax_with_lituse,
      	elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
      	elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
      	* elf64-gen.c (elf64_generic_link_add_symbols): ..
      	* elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
      	ppc64_elf_check_relocs, ppc64_elf_edit_opd,
      	ppc64_elf_relocate_section): ..
      	* elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
      	elf_s390_relocate_section): ..
      	* elf64-sh64.c (sh_elf64_relocate_section): ..
      	* elf64-sparc.c (sparc64_elf_check_relocs,
      	sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
      	sparc64_elf_merge_private_bfd_data): ..
      	* elf64-x86-64.c (elf64_x86_64_check_relocs,
      	elf64_x86_64_relocate_section): ..
      	* elflink.c (_bfd_elf_add_default_symbol,
      	_bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
      	_bfd_elf_link_output_relocs, elf_link_add_object_symbols,
      	bfd_elf_size_dynamic_sections, elf_link_output_extsym,
      	elf_get_linked_section_vma, elf_fixup_link_order,
      	bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
      	bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
      	* elfxx-ia64.c (elfNN_ia64_relax_section,
      	elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
      	* elfxx-mips.c (mips_elf_perform_relocation,
      	_bfd_mips_elf_check_relocs,
      	_bfd_mips_elf_merge_private_bfd_data): ..
      	* ieee.c (ieee_slurp_external_symbols): ..
      	* ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
      	* libbfd.c (_bfd_generic_verify_endian_match): ..
      	* linker.c (_bfd_generic_link_add_one_symbol,
      	_bfd_generic_section_already_linked): ..
      	* pdp11.c (translate_to_native_sym_flags): ..
      	* pe-mips.c (coff_pe_mips_relocate_section): ..
      	* peicode.h (pe_ILF_build_a_bfd): ..
      	* srec.c (srec_bad_byte): ..
      	* stabs.c (_bfd_link_section_stabs): ..
      	* xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
      	Replace all uses of bfd_archive_filename and bfd_get_section_ident
      	with corresponding %B and %A in _bfd_error_handler format string.
      	Replace occurrences of "fprintf (stderr," with _bfd_error_handler
      	calls to use %A and %B.  Fix "against symbol .. from section" and
      	similar error messages.  Combine multiple _bfd_error_handler calls
      	where they were separated due to bfd_archive_filename deficiencies.
      	* bfd-in2.h: Regenerate.
      include/
      	* bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
      	(LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
      ld/
      	* ldmain.c (link_callbacks): Remove "error_handler".
      	* ldmisc.c: Include elf-bfd.h.
      	(vfinfo): Sort comment.  Handle %A.  Use %A instead of
      	bfd_get_section_indent.
      	(error_handler): Delete.
      	* ldmisc.h (error_handler): Delete declaration.
      d003868e
  37. 30 Jul, 2004 1 commit
  38. 29 Jun, 2004 1 commit
    • Alan Modra's avatar
      * bfd-in.h (bfd_get_section_limit): Define. · 07515404
      Alan Modra authored
      	* reloc.c (bfd_perform_relocation, bfd_install_relocation)
      	(_bfd_final_link_relocate): Use bfd_get_section_limit.
      	* aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
      	* coff-arm.c (coff_arm_relocate_section): Likewise.
      	* coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
      	* cpu-ns32k.c (do_ns32k_reloc): Likewise.
      	(bfd_ns32k_final_link_relocate): Likewise.
      	* elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
      	* elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
      	* elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
      	(i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
      	* elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
      	(m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
      	* elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
      	* elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
      	* elf32-or32.c (or32_elf_consth_reloc): Likewise.
      	* elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
      	* elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
      	* elf32-sh.c (sh_elf_reloc_loop): Likewise.
      	* elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
      	(sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
      	* elf32-v850.c (v850_elf_reloc): Likewise.
      	* elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
      	* elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
      	* elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
      	* elf64-mips.c (mips_elf64_gprel32_reloc)
      	(mips16_gprel_reloc): Likewise.
      	* elf64-mmix.c (mmix_elf_reloc): Likewise.
      	* elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
      	* elf64-sparc.c (init_insn_reloc): Likewise.
      	* elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
      	* elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
      	(_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
      	(_bfd_mips_elf_generic_reloc): Likewise.
      	* bfd-in2.h: Regenerate.
      07515404