Commit Graph

3566 Commits

Author SHA1 Message Date
Alan Modra 1829f4b2af * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
structure field removed in 2004-04-24 patch.
	* elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.

	* elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
	Constify hdr arg.
	* elf32-arm.h (elf32_arm_section_flags): Likewise.
	* elf64-alpha.c (elf64_alpha_section_flags): Likewise.
	* elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
	* elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
	field before calling elf_backend_section_flags.
2004-04-27 03:13:15 +00:00
Alan Modra 0b608360be daily update 2004-04-27 00:00:05 +00:00
Chris Demetriou 4030e8f624 [ bfd/ChangeLog ]
2004-04-24  Chris Demetriou  <cgd@broadcom.com>

	* elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
	(elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
	(bfd_elf32_bfd_reloc_type_lookup): Remove cases for
	BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
	and BFD_RELOC_32_PCREL.
	(mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
	R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
	* elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
	(_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
	(mips_elf_next_relocation): Move comment about matching HI/LO
	relocations to...
	(_bfd_mips_elf_relocate_section): Here.  Remove handling for
	R_MIPS_GNU_REL_HI16.

[ include/elf/ChangeLog ]
2004-04-24  Chris Demetriou  <cgd@broadcom.com>

	* mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
	(R_MIPS_GNU_REL_HI16): Remove.
	(R_MIPS_GNU_REL16_S2): Update comment.

[ ld/testsuite/ChangeLog ]
2004-04-24  Chris Demetriou  <cgd@broadcom.com>

	* ld-elf/merge.d: XFAIL on all MIPS targets.
2004-04-24 22:07:14 +00:00
Chris Demetriou 3e27568fe9 [ bfd/ChangeLog ]
2004-04-23  Chris Demetriou  <cgd@broadcom.com>

        * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
        (mips_switch_reloc, mips_read_relocs, mips_relax_section)
        (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
        (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
        and update comments to reflect current usage.
        (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
        and MIPS_R_SWITCH, as well as several empty entries.  Update comment
        for MIPS_R_PCREL16.
        (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
        (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
        for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
        (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
        type number to be MIPS_R_PCREL16.
        (mips_relocate_section): Remove support for link-time relaxation
        of branches used by embedded-PIC.  Remove support for MIPS_R_SWITCH,
        MIPS_R_RELLO, and MIPS_R_RELHI relocations.
        (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
        * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
        relaxation of branches used by embedded-PIC.
        * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
        * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
        related members, update comment.
        * pe-mips.c: Remove disabled (commented-out and #if 0'd)
        code related to embedded-PIC.
        * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
        initialization of now-removed 'adjust' member of
        'struct ecoff_debug_info'.

[ include/coff/ChangeLog ]
2004-04-23  Chris Demetriou  <cgd@broadcom.com>

        * mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
        (MIPS_R_PCREL16): Update comment.
        * ecoff.h (struct ecoff_value_adjust): Remove structure.
        (struct ecoff_debug_info): Remove 'adjust' member.
2004-04-24 06:12:25 +00:00
Chris Demetriou b32de0bc66 oops, fix date on my last entry (2004-04-23) 2004-04-24 00:20:56 +00:00
Chris Demetriou 8472310da8 2004-04-22 Chris Demetriou <cgd@broadcom.com>
* elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
2004-04-24 00:15:32 +00:00
Alan Modra 07eb41a245 daily update 2004-04-24 00:00:07 +00:00
Phil Blundell 955af22232 2004-04-21 Philip Blundell <pb@nexus.co.uk>
* elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
	relocs for locally defined symbols during -shared final link.
	(elf32_arm_final_link_relocate): Likewise.
2004-04-23 19:12:55 +00:00
Jakub Jelinek 47a9f7b34f * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
ELF_LINK_POINTER_EQUALITY_NEEDED.
	(elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
	if r_type is not R_X86_64_PC32.
	(elf64_x86_64_finish_dynamic_symbol): If
	ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
	SHN_UNDEF symbols.
2004-04-23 08:51:10 +00:00
Kaz Kojima 1f1799d5ad bfd/
* elf32-sh.c (sh_elf_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.

opcodes/
	* sh-dis.c (print_insn_sh): Print the value in constant pool
	as a symbol if it looks like a symbol.

gas/testsuite/
	* gas/sh/pcrel2.d: Update.
	* gas/sh/tlsd.d: Update.
	* gas/sh/tlsnopic.d: Update.
	* gas/sh/tlspic.d: Update.

ld/testsuite/
	* ld-sh/tlsbin-1.d: Update
	* ld-sh/tlspic-1.d: Update.
2004-04-23 02:47:39 +00:00
Andrew Cagney 0fdea5ce57 2004-04-22 Andrew Cagney <cagney@redhat.com>
* opncls.c (bfd_alloc): Fix type of "wanted" in doco.
2004-04-23 00:22:57 +00:00
Alan Modra 7fdb88f374 daily update 2004-04-23 00:00:08 +00:00
Dave Anglin 5198ba8bd1 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
make_bfd_asection.
	* som.c (som_set_section_contents): Constantify second argument.
	(hppa_som_gen_reloc_type): Abort for unsupported selectors.
	(som_object_setup): Rework to avoid warning.
	(setup_sections, som_write_fixups, bfd_section_from_som_symbol):
	Likewise.
2004-04-22 23:17:07 +00:00
Andrew Cagney fe2e161ad6 2004-04-22 Andrew Cagney <cagney@redhat.com>
* cache.c (bfd_cache_close): Check for a previously closed file.
2004-04-22 16:17:31 +00:00
Jakub Jelinek 4c45e5c9ce bfd/
* bfd.c (bfd_get_synthetic_symtab): Define.
	* targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
	NAME##_get_synthetic_symtab.
	(struct bfd_target): Add _bfd_get_synthetic_symtab.
	* libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
	* elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
	relplt_name fields.
	(_bfd_elf_get_synthetic_symtab): New prototype.
	* elfcode.h (elf_get_synthetic_symtab): Define.
	* elf.c (_bfd_elf_get_synthetic_symtab): New function.
	* elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
	(elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
	(elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
	* elf32-i386.c (elf_i386_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.
	* elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.
	* elf32-s390.c (elf_s390_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.
	* elf64-s390.c (elf_s390_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.
	* elf32-sparc (elf32_sparc_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.
	* elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.
	* elf32-ppc.c (ppc_elf_plt_sym_val): New function.
	(elf_backend_plt_sym_val): Define.
	* aout-target.h (MY_get_synthetic_symtab): Define.
	* aout-tic30.c (MY_get_synthetic_symtab): Define.
	* coff-rs6000.c (rs6000coff_vec): Add
	_bfd_nodynamic_get_synthetic_symtab.
	(pmac_xcoff_vec): Likewise.
	* coff64-rs6000.c (rs6000coff64_vec): Add
	_bfd_nodynamic_get_synthetic_symtab.
	(aix5coff64_vec): Likewise.
	* sunos.c (MY_get_synthetic_symtab): Define.
	* vms.c (vms_get_synthetic_symtab): Define.
binutils/
	* objdump.c (synthsyms, synthcount): New variables.
	(disassemble_data): Use dynsyms for stripped binaries or libraries.
	Add synthetized symbols.
	(dump_bfd): For disassemble, initialize dynsyms always and
	also synthsyms.  Free synthsyms and clear {sym,dynsym,synth}count
	before returning.
2004-04-22 14:45:32 +00:00
Nick Clifton d2f7ecac2c Have bfd_archive_filename() return NULL on NULL input 2004-04-22 10:43:34 +00:00
Nick Clifton fd99574ba5 Add support for ColdFire MAC instructions and tidy up support for other m68k
variants.
2004-04-22 10:33:16 +00:00
Alan Modra 8dbe14f8fd daily update 2004-04-22 00:00:06 +00:00
Chris Demetriou 23867d6732 [ bfd/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
	* bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
	(bfd_mips_elf32_create_embedded_relocs): Remove prototypes
	* bfd-in2.h: Regenerate.

[ ld/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* ld.texinfo: Remove MIPS --embedded-relocs documentation.
	* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
	* emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emultempl/mipsecoff.em: Restructure to be included as an
	extra emulation file.
	(check_sections, gld${EMULATION_NAME}_after_open)
	(gld${EMULATION_NAME}_after_allocation)
	(gld${EMULATION_NAME}_get_script)
	(ld_${EMULATION_NAME}_emulation): Remove
	(gld${EMULATION_NAME}_before_parse): Rename to...
	(mipsecoff_before_parse): This.
	(LDEMUL_BEFORE_PARSE): Define.
	* emultempl/mipself.em: Remove file.
	* scripttempl/mips.sc (.rel.sdata): Do not include in output.
	(__runtime_reloc_start, __runtime_reloc_stop): Stop providing
	these symbols.
	* Makefile.am: Remove dependencies on emultempl/mipself.em.
	* Makefile.in: Regenerate.

[ ld/testsuite/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* ld-empic/run.c: Removed as part of MIPS --embedded-relocs removal.
	* ld-empic/empic.exp: Likewise.
	* ld-empic/relax.t: Likewise.
	* ld-empic/relax1.c: Likewise.
	* ld-empic/relax2.c: Likewise.
	* ld-empic/relax3.c: Likewise.
	* ld-empic/relax4.c: Likewise.
	* ld-empic/runtest1.c: Likewise.
	* ld-empic/runtest2.c: Likewise.
	* ld-empic/runtesti.s: Likewise.
	* ld-mips-elf/empic1-ln.d: Likewise.
	* ld-mips-elf/empic1-lp.d: Likewise.
	* ld-mips-elf/empic1-mn.d: Likewise.
	* ld-mips-elf/empic1-mp.d: Likewise.
	* ld-mips-elf/empic1-ref.s: Likewise.
	* ld-mips-elf/empic1-sn.d: Likewise.
	* ld-mips-elf/empic1-sp.d: Likewise.
	* ld-mips-elf/empic1-space.s: Likewise.
	* ld-mips-elf/empic1-tgt.s: Likewise.
	* ld-mips-elf/empic2-fwd-0.d: Likewise.
	* ld-mips-elf/empic2-fwd-1.d: Likewise.
	* ld-mips-elf/empic2-fwd-tgt.s: Likewise.
	* ld-mips-elf/empic2-ref.s: Likewise.
	* ld-mips-elf/empic2-rev-0.d: Likewise.
	* ld-mips-elf/empic2-rev-1.d: Likewise.
	* ld-mips-elf/empic2-rev-tgt.s: Likewise.
	* ld-mips-elf/empic2-space.s: Likewise.
	* ld-mips-elf/emrelocs-eb.d: Likewise.
	* ld-mips-elf/emrelocs-el.d: Likewise.
	* ld-mips-elf/emrelocs.ld: Likewise.
	* ld-mips-elf/emrelocs1.s: Likewise.
	* ld-mips-elf/emrelocs2.s: Likewise.
	* ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
2004-04-21 20:52:31 +00:00
Bob Wilson 2c8c90bcd5 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
require relocations against a weak symbol to reference the same
	symbol hash entry if not a final, static link.
	(get_cached_value, add_value_map): Add final_static_link argument.
	(remove_literals): Pass final_static_link argument as needed.
2004-04-21 18:12:47 +00:00
Andrew Cagney 40838a725a 2004-04-21 Andrew Cagney <cagney@redhat.com>
* opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
	(struct opncls, opncls_btell, opncls_bseek, opncls_bread)
	(opncls_bwrite, opncls_bclose, opncls_bflush)
	(opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
	bfd iovec that uses function callbacks.
	(bfd_close): Use the iovec's bclose.
	* cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
	(cache_bclose, cache_bflush, cache_bstat)
	(cache_iovec): New functions and global variable, implement a
	cache "iovec", where applicable set bfd_error.
	(bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
	* bfdio.c (struct bfd_iovec): Define.
	(real_read): Delete function.
	(bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
	(bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
	assume that bread and bwrite set bfd_error.
	* bfd.c (struct bfd): Add "iovec", update comments.
	* bfd-in2.h, libbfd.h: Re-generate.
2004-04-21 17:05:12 +00:00
Andrew Cagney 7f919c8471 2004-04-21 Andrew Cagney <cagney@redhat.com>
* libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
2004-04-21 16:58:57 +00:00
Eric Botcazou 715df9b8e0 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
(bfd_elf_gc_sections): Fail if a shared object is being created.
	Do not fail if dynamic sections have been created.  Instead call
	elf_gc_mark_dynamic_ref_symbol to mark sections that contain
	dynamically referenced symbols.  Do not mark the whole graph
	rooted at .eh_frame, only the section proper.
2004-04-21 07:14:15 +00:00
Alan Modra 5772d31ac0 daily update 2004-04-21 00:00:05 +00:00
Nick Clifton 6482c264f4 Add support for a .secrel32 x86 reloc to allow DWARF" debug information to used
with COFF based x86 ports.
2004-04-20 12:17:16 +00:00
Alan Modra 46cb9af406 daily update 2004-04-20 00:00:07 +00:00
Jakub Jelinek 4dc570c2f5 bfd/
* elf32-sparc.c (elf32_sparc_relocate_section): Handle
	relocs against hidden/protected undefweak symbols properly.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
gas/testsuite/
	* gas/cfi/cfi-sparc64-1.d: Update.
ld/testsuite/
	* ld-elfvsb/elfvsb.exp: XFAIL some tests on sparc64.
	* ld-shared/shared.exp: Likewise.
2004-04-19 14:25:49 +00:00
Alan Modra bef5cbecf3 daily update 2004-04-19 00:00:07 +00:00
Mark Kettenis 0b60d5d323 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
* netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
core files.
2004-04-18 20:55:55 +00:00
Alan Modra 77a4912d46 daily update 2004-04-18 00:00:04 +00:00
Alan Modra d48bdb9974 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
filepos for the SizeOfHeaders field.
	(_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
	overflow.
	(_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
2004-04-17 11:18:47 +00:00
Alan Modra 20bfdf9108 daily update 2004-04-17 00:00:07 +00:00
Alan Modra 57a1784ed8 * simple.c (bfd_simple_get_relocated_section_contents): Don't
change reloc_done.  Set and restore _cooked_size.
	(RETURN): Delete.
2004-04-16 03:29:13 +00:00
Mark Kettenis d1ad3f6f20 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
core files.
2004-04-15 16:04:38 +00:00
Nick Clifton 3d1bca9dfb Catch NULL bfd pointers passed to bfd_archive_filename 2004-04-15 08:48:56 +00:00
Alan Modra 019b892f34 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change. 2004-04-15 06:03:59 +00:00
Alan Modra 15b43f483c * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
when it is a definition.
2004-04-15 02:55:20 +00:00
Alan Modra cf1b2cf519 daily update 2004-04-15 00:00:06 +00:00
Alan Modra 6de00a7823 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
when statically linking PIC code.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2004-04-14 09:50:07 +00:00
Alan Modra 7e9e9564b8 daily update 2004-04-14 00:00:05 +00:00
Alan Modra cc37688a25 daily update 2004-04-13 00:00:08 +00:00
Alan Modra 92e847d5f8 daily update 2004-04-12 00:00:05 +00:00
Thiemo Seufer 279500dea9 /bfd/ChangeLog
* config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
	* configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
	targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
	* configure: Regenerate.

	/gas/ChangeLog
	* Makefile.am: Remove mips from aout targets.
	* Makefile.in: Regenerate.
	* configure.in: Remove mips-dec-bsd* target.
	* configure: Regenerate.

	/ld/ChangeLog
	* configure.host: Remove mips*-dec-bsd* target.
	* configure.tgt: Likewise.
2004-04-11 04:07:46 +00:00
Alan Modra f3d8720e0f daily update 2004-04-11 00:00:05 +00:00
Alan Modra fdf6991ed3 daily update 2004-04-10 00:00:06 +00:00
Alan Modra 1bd8ffa6d3 daily update 2004-04-09 00:00:06 +00:00
Richard Sandiford ccf2f65243 * elflink.c: Include libiberty.h.
* Makefile.am (elflink.lo): Depend on libiberty.h.
	* Makefile.in: Regenerate.
2004-04-08 15:17:35 +00:00
Alan Modra 9c7a50a6a6 daily update 2004-04-08 00:00:08 +00:00
Daniel Jacobowitz ca07892d88 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
".MIPS.stubs".
2004-04-06 15:48:50 +00:00
H.J. Lu a5a58ba4de 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
	reserve the memory for dynamic linker
2004-04-06 00:59:22 +00:00