Commit graph

3560 commits

Author SHA1 Message Date
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
Alan Modra
f9d4a1558a daily update 2004-04-06 00:00:06 +00:00
Mark Kettenis
24d18d3088 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
(netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
2004-04-05 14:43:36 +00:00
Alan Modra
948dd9ecd9 daily update 2004-04-05 00:00:05 +00:00
Alan Modra
f2e9943fe9 daily update 2004-04-04 00:00:06 +00:00
Alan Modra
93bbdd9e01 daily update 2004-04-03 00:00:07 +00:00
H.J. Lu
a4d7b4b518 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
* elf32-cr16c.c (elf32_cr16c_relocate_section): Use
	RELOC_FOR_GLOBAL_SYMBOL.
	(elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
2004-04-02 15:26:04 +00:00