Commit Graph

2599 Commits

Author SHA1 Message Date
Jakub Jelinek b9734f3572 bfd/
* elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
	(elf32_sparc_rev32_howto): New variable.
	(sparc_reloc_map): Add TLS relocs.
	(elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
	Handle REV32.
	(sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
	New functions.
	(struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
	struct elf32_sparc_link_hash_table):
	New structures.
	(elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
	elf32_sparc_hash_table): Define.
	(link_hash_newfunc, elf32_sparc_link_hash_table_create,
	create_got_section, elf32_sparc_create_dynamic_sections,
	elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
	functions.
	(elf32_sparc_check_relocs): Handle TLS relocs.  Add dynamic reloc
	reference counting.
	(elf32_sparc_gc_sweep_hook): Likewise.
	(elf32_sparc_adjust_dynamic_symbol): Likewise.
	(elf32_sparc_size_dynamic_sections): Likewise.
	(elf32_sparc_relocate_section): Likewise.
	(allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
	New functions.
	(elf32_sparc_object_p): Allocate backend private object data.
	(bfd_elf32_bfd_link_hash_table_create,
	elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
	elf_backend_can_refcount): Define.
	(elf_backend_create_dynamic_sections): Define to
	elf32_sparc_create_dynamic_sections.
	* reloc.c: Add SPARC TLS relocs.
	* bfd-in2.h, libbfd.h: Rebuilt.
	* elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
	(sparc_reloc_map): Likewise.
gas/
	* config/tc-sparc.c (sparc_ip): Handle TLS % operators.
	(tc_gen_reloc): Handle TLS relocs.
	(sparc_cons, cons_fix_new_sparc): Handle %r_tls_dtpoff.
	* config/tc-sparc.h (tc_fix_adjustable): Don't adjust TLS
	relocs.
	* config/obj-elf.c (obj_elf_section_word): Handle tls.
	(obj_elf_type): Handle tls_object.
include/
	* elf/sparc.h: Add TLS relocs.  Move R_SPARC_REV32 to 252.
ld/testsuite/
	* ld-sparc/sparc.exp: New.
	* ld-sparc/tlsg32.s: New test.
	* ld-sparc/tlsg32.sd: Likewise.
	* ld-sparc/tlsg64.s: Likewise.
	* ld-sparc/tlsg64.sd: Likewise.
	* ld-sparc/tlslib.s: Likewise.
	* ld-sparc/tlsnopic.s: Likewise.
	* ld-sparc/tlspic.s: Likewise.
	* ld-sparc/tlssunbin32.dd: Likewise.
	* ld-sparc/tlssunbin32.rd: Likewise.
	* ld-sparc/tlssunbin32.s: Likewise.
	* ld-sparc/tlssunbin32.sd: Likewise.
	* ld-sparc/tlssunbin32.td: Likewise.
	* ld-sparc/tlssunbin64.dd: Likewise.
	* ld-sparc/tlssunbin64.rd: Likewise.
	* ld-sparc/tlssunbin64.s: Likewise.
	* ld-sparc/tlssunbin64.sd: Likewise.
	* ld-sparc/tlssunbin64.td: Likewise.
	* ld-sparc/tlssunbinpic32.s: Likewise.
	* ld-sparc/tlssunbinpic64.s: Likewise.
	* ld-sparc/tlssunnopic32.dd: Likewise.
	* ld-sparc/tlssunnopic32.rd: Likewise.
	* ld-sparc/tlssunnopic32.s: Likewise.
	* ld-sparc/tlssunnopic32.sd: Likewise.
	* ld-sparc/tlssunnopic64.dd: Likewise.
	* ld-sparc/tlssunnopic64.rd: Likewise.
	* ld-sparc/tlssunnopic64.s: Likewise.
	* ld-sparc/tlssunnopic64.sd: Likewise.
	* ld-sparc/tlssunpic32.dd: Likewise.
	* ld-sparc/tlssunpic32.rd: Likewise.
	* ld-sparc/tlssunpic32.s: Likewise.
	* ld-sparc/tlssunpic32.sd: Likewise.
	* ld-sparc/tlssunpic32.td: Likewise.
	* ld-sparc/tlssunpic64.dd: Likewise.
	* ld-sparc/tlssunpic64.rd: Likewise.
	* ld-sparc/tlssunpic64.s: Likewise.
	* ld-sparc/tlssunpic64.sd: Likewise.
	* ld-sparc/tlssunpic64.td: Likewise.
2003-01-24 23:44:45 +00:00
Alan Modra c34ee0383a daily update 2003-01-24 23:00:06 +00:00
Martin Schwidefsky 69fc87f180 * bfd-in2.h: Regenerate.
* elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
	s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
	(elf_howto_table): Add TLS relocs.
	(elf_s390_reloc_type_lookup): Likewise.
	(elf_s390_link_hash_entry): Add tls_type.
	(elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
	New macros.
	(elf_s390_link_hash_table): Add tls_ldm_got.
	(link_hash_newfunc): Initialize tls_type.
	(elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
	(elf_s390_copy_indirect_symbol): Copy tls_type information.
	(elf_s390_check_relocs): Support TLS relocs.
	(elf_s390_gc_sweep_hook): Likewise.
	(allocate_dynrelocs): Likewise.
	(elf_s390_size_dynamic_sections): Likewise.
	(elf_s390_relocate_section): Likewise.
	(elf_s390_finish_dynamic_symbol): Likewise.
	(bfd_elf32_mkobject): Define for TLS.
	* elf64-s390.c: Same changes as for elf32-s390.c.
	* libbfd.h: Regenerate.
	* reloc.c: Add s390 TLS relocations.
2003-01-24 17:12:42 +00:00
Nick Clifton 9aa4e50515 Fix name of --enable-install-libbfd switch. 2003-01-24 16:50:24 +00:00
Alan Modra 2e9d253267 daily update 2003-01-23 23:00:06 +00:00
Nick Clifton 5177500f26 Add SH2E support 2003-01-23 18:50:57 +00:00
Alan Modra f0abc2a11f include/elf/ChangeLog
* sh.h: Split out various bits to bfd/elf32-sh64.h.

include/opcode/ChangeLog
	* m68hc11.h (cpu6812s): Define.

bfd/ChangeLog
	* elf-bfd.h (struct bfd_elf_section_data): Remove tdata.  Change
	dynindx to an int.  Rearrange for better packing.
	* elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
	* elf32-mips.c (bfd_elf32_new_section_hook): Define.
	* elf32-sh64.h: New.  Split out from include/elf/sh.h.
	(struct _sh64_elf_section_data): New struct.
	(sh64_elf_section_data): Don't dereference sh64_info (was tdata).
	* elf32-sh64-com.c: Include elf32-sh64.h.
	* elf32-sh64.c: Likewise.
	(sh64_elf_new_section_hook): New function.
	(bfd_elf32_new_section_hook): Define.
	(sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
	(sh64_bfd_elf_copy_private_section_data): Likewise.
	(sh64_elf_final_write_processing): Likewise.
	* elf32-sparc.c (struct elf32_sparc_section_data): New.
	(elf32_sparc_new_section_hook): New function.
	(SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
	(sec_do_relax): Define.
	(elf32_sparc_relax_section): Adjust to use sec_do_relax.
	(elf32_sparc_relocate_section): Likewise.
	* elf64-mips.c (bfd_elf64_new_section_hook): Define.
	* elf64-mmix.c (struct _mmix_elf_section_data): New.
	(mmix_elf_section_data): Define.  Use throughout file.
	(mmix_elf_new_section_hook): New function.
	(bfd_elf64_new_section_hook): Define.
	* elf64-ppc.c (struct _ppc64_elf_section_data): New.
	(ppc64_elf_section_data): Define.  Use throughout.
	(ppc64_elf_new_section_hook): New function.
	(bfd_elf64_new_section_hook): Define.
	* elf64-sparc.c (struct sparc64_elf_section_data): New.
	(sparc64_elf_new_section_hook): New function.
	(SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
	(sec_do_relax): Define.
	(sparc64_elf_relax_section): Adjust to use sec_do_relax.
	(sparc64_elf_relocate_section): Likewise.
	(bfd_elf64_new_section_hook): Define.
	* elfn32-mips.c (bfd_elf32_new_section_hook): Define.
	* elfxx-mips.c (struct _mips_elf_section_data): New.
	(mips_elf_section_data): Define.  Use throughout.
	(_bfd_mips_elf_new_section_hook): New function.
	(mips_elf_create_got_section): Don't alloc used_by_bfd.
	* elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
	* elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.

opcodes/ChangeLog
	* sh64-dis.c: Include elf32-sh64.h.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.

gas/ChangeLog
	* config/tc-sh64.c (shmedia_frob_section_type): Adjust for changed
	sh64_elf_section_data.
	* config/tc-sh64.h: Include elf32-sh64.h.
	* config/tc-m68hc11.c: Don't include stdio.h.
	(md_show_usage): Fix missing continuation.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.

ld/ChangeLog
	* emultempl/sh64elf.em: Include elf32-sh64.h.
	(sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
	sh64_elf_section_data.
	(sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
2003-01-23 11:51:35 +00:00
Alan Modra f181ce6223 daily update 2003-01-22 23:00:06 +00:00
Richard Henderson cc03ec8004 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
(struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
        (elf64_alpha_adjust_dynamic_symbol): Set them.
        (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
        (elf64_alpha_relax_tls_get_addr): Handle LDM relocs.  Frob the
        symbol index when relaxing LDM to TPREL.
        (elf64_alpha_relax_section): Likewise.  Allow relaxation of GD
        relocs, even if the target isn't locally defined.
        (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
        (elf64_alpha_relocate_section): Likewise.  Force TP-relative
        relocs vs symndx 0 to the tp base.
2003-01-22 00:47:58 +00:00
Alan Modra 5645d587de daily update 2003-01-21 23:00:06 +00:00
Nick Clifton da896d3fcc Add support for i386-*-aros triple. 2003-01-21 16:08:31 +00:00
Andreas Schwab 7fce784e9a * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
(struct ppc_elf_link_hash_entry): Define.
	(ppc_elf_hash_entry): New function.
	(struct ppc_elf_link_hash_table): Define.
	(ppc_elf_hash_table): New function.
	(ppc_elf_link_hash_newfunc): New function.
	(ppc_elf_link_hash_table_create): New function.
	(ppc_elf_copy_indirect_symbol): New function.
	(allocate_dynrelocs): New function.
	(readonly_dynrelocs): New function.
	(ppc_elf_size_dynamic_sections): Allocate space for dynamic
	relocs and determine DT_TEXTREL.
	(ppc_elf_check_relocs): Don't do that here, just count the
	dynamic relocs.
	(ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
	removed section.
	(bfd_elf32_bfd_link_hash_table_create): Define.
	(elf_backend_copy_indirect_symbol): Define.
2003-01-21 12:55:11 +00:00
Richard Henderson 1bbc9cec6b * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
TPREL also get a reloc if shared.  Remove SREL support.
        (elf64_alpha_emit_dynrel): New.
        (elf64_alpha_relocate_section): Use it.  Resolve dynamic TPREL
        and GOTTPREL relocs to local symbols against the tp base.
        (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.

        * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
        use count before clobbering r_type.
        (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
        ordering would mean dataflow inspection is necessary.
2003-01-21 08:59:25 +00:00
Alan Modra de72e31e30 daily update 2003-01-20 23:00:05 +00:00
Svein Seldal 0da35f8be8 Updates for fixing tic4x arch tagging of its object files.
* bfd/coffcode.h (coff_set_flags): Added get/set arch hooks.
	* include/coff/tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug
	* include/coff/ti.h (TICOFF_TARGET_MACHINE_GET): Added macros
	* ld/Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o
	* ld/Makefile.in: Regenerate
	* ld/configure.tgt: Added extra target emulations
	* ld/emulparams/tic3xcoff.sh: Remove old settings
	* ld/emulparams/tic4xcoff.sh: Ditto
	* ld/emulparams/tic3xcoff-onchip.sh: Added new
	* ld/scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x
	* ld/scripttempl/tic3xcoff.sc: Remove
2003-01-20 22:34:39 +00:00
Nick Clifton 571fe01fe0 Treat elfNN_bed like other macros defined in elfxx-target.h and #undef it
before #define'ing it.
2003-01-20 18:06:21 +00:00
Martin Schwidefsky 5236c819d2 * bfd-in2.h: Regenerate.
* elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
	(elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
	R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
	R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
	R_390_PLTOFF32 and R_390_PLTOFF64.
	(elf_s390_reloc_type_lookup): Likewise.
	(struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
	of GOTPLT references to a function.
	(link_hash_newfunc): Initialize gotplt_refcount.
	(elf_s390_check_relocs): Move allocation of local_got_refcounts array
	and creation of the got section out of the main switch. Add support
	for the gotoff, gotplt and pltoff relocations.
	(elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
	and pltoff.
	(elf_s390_adjust_gotplt): New function.
	(elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
	plt entries.
	(allocate_dynrelocs): Add comment.
	(elf_s390_relocate_section): Change r_type to unsigned. Add support
	for gotoff, gotplt and pltoff relocations.
	* elf64-s390.c: Same changes as for elf32-s390.c.
	* libbfd.h: Regenerate.
	* reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
	BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
	BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
	and BFD_RELOC_390_PLTOFF64.
2003-01-20 11:46:33 +00:00
Alan Modra 714033a189 daily update 2003-01-18 23:00:04 +00:00
Jakub Jelinek a823975ae0 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
R_IA64_TPREL64[LM]SB against non-global symbol properly.

	* ld-ia64/tlspic1.s: Add tests for IE in shared libraries.
	* ld-ia64/tlspic.rd: Adjust.
	* ld-ia64/tlspic.dd: Adjust.
	* ld-ia64/tlspic.sd: Adjust.
2003-01-17 23:27:57 +00:00
Alan Modra 0bcc87e7c5 daily update 2003-01-17 23:00:06 +00:00
Alan Modra 34c003401e daily update 2003-01-16 23:00:04 +00:00
Jakub Jelinek b3dfd7fe24 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
self_dtpmod_done and self_dtpmod_offset.
	(allocate_global_data_got): Only use one got entry for all
	dtpmod relocs against local symbols.
	(allocate_dynrel_entries): Only need .rela.got entry for
	dtpmod against global symbol.
	(elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
	Reserve space in .rela.got for the local dtpmod entry.
	(set_got_entry): Initialize the common local dtpmod .got entry.
	(elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
	and R_IA_64_DTPREL64MSB.

	* config/tc-ia64.c (ia64_cons_fix_new): Handle @dtprel() in data.

	* ld-ia64/ia64.exp: New.
	* ld-ia64/tlsbin.dd: New test.
	* ld-ia64/tlsbinpic.s: New test.
	* ld-ia64/tlsbin.rd: New test.
	* ld-ia64/tlsbin.s: New test.
	* ld-ia64/tlsbin.sd: New test.
	* ld-ia64/tlsbin.td: New test.
	* ld-ia64/tlsg.s: New test.
	* ld-ia64/tlsg.sd: New test.
	* ld-ia64/tlslib.s: New test.
	* ld-ia64/tlspic1.s: New test.
	* ld-ia64/tlspic2.s: New test.
	* ld-ia64/tlspic.dd: New test.
	* ld-ia64/tlspic.rd: New test.
	* ld-ia64/tlspic.sd: New test.
	* ld-ia64/tlspic.td: New test.
2003-01-16 21:31:18 +00:00
Alan Modra 04c9666ac8 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
(R_PPC_*): Rename all occurrences to R_PPC64_*.
	(R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
	(enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
	(ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
	relative relocs, not with absolute ones.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
2003-01-16 04:09:37 +00:00
Alan Modra f0e2286b64 daily update 2003-01-15 23:00:06 +00:00
Andreas Schwab c87f1ff7eb * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
relocation against a non-allocated readonly section.
2003-01-15 15:54:51 +00:00
Alan Modra cf6766ee5e daily update 2003-01-14 23:00:03 +00:00
Alan Modra 8bd1781d41 daily update 2003-01-13 23:00:04 +00:00
Alan Modra 8ad9bcdc8e daily update 2003-01-12 23:00:04 +00:00
Alan Modra fbe06c784a daily update 2003-01-11 23:00:03 +00:00
Alan Modra 9ac361894d daily update 2003-01-10 23:00:04 +00:00
Alan Modra f985e606c0 daily update 2003-01-09 23:00:04 +00:00
Alan Modra 86bbe32fa7 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.  PLTGOT16_HA too.
2003-01-09 22:51:37 +00:00
Klee Dienes 32d95f29bf 2002-01-08 Klee Dienes <kdienes@apple.com>
* Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
        (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
        * Makefile.in: Regenerate.
2003-01-09 08:35:28 +00:00
Alan Modra 7692ea567d daily update 2003-01-08 23:00:05 +00:00
Alexandre Oliva ab7d0aa081 * elfn32-mips.c (prev_reloc_section): New.
(GET_RELOC_ADDEND): Use it.  Parenthesize macro arguments.
(SET_RELOC_ADDEND): Parenthesize macro argument.
2003-01-08 22:00:53 +00:00
Dave Anglin 95d0f04a0b * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
adjust addil instructions if the symbol has no section.
2003-01-08 02:19:23 +00:00
Alan Modra 51fd0cf2af daily update 2003-01-07 23:00:04 +00:00
DJ Delorie 5c9e189cf7 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
partial_inplace.
2003-01-07 21:26:13 +00:00
Andreas Schwab 3e829b4a2f * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
PC relative relocations.
	(elf_m68k_discard_copies): Set it here instead.
2003-01-07 13:12:35 +00:00
Alan Modra 973b7488f7 daily update 2003-01-06 23:00:05 +00:00
Alan Modra 1bacb52f88 daily update 2003-01-05 23:00:04 +00:00
Alan Modra ff2d781336 daily update 2003-01-04 23:00:04 +00:00
Alan Modra 38ea52b394 daily update 2003-01-03 23:00:34 +00:00
Stan Cox a75473eb66 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
(ALL_MACHINES_CFILES): Add cpu-iq2000.c.
	(BFD32_BACKENDS): Add elf32-iq2000.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
	(cpu-iq2000.lo): New target.
	* Makefile.in: Regenerate.
	* config.bfd: Handle iq2000-*-elf.
	* archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
	(bfd_archures_list): Add bfd_iq2000_arch.
	* configure.in: Handle bfd_elf32_iq2000_vec.
	* configure: Regenerate.
	* reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
	and BFD_RELOC_IQ2000_UHI16.
	* targets.c (bfd_elf32_iq2000_vec): Declare.
	(bfd_target_vector): Add bfd_elf32_iq2000_vec.
	* elf.c (prep_headers): Set e_machine to EM_IQ2000.
	* cpu-iq2000.c: New file.
	* elf32-iq2000.c: Likewise.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Likewise.
2003-01-03 21:12:28 +00:00
Nick Clifton aecde77ed7 oops - omitted from previous delta - a reworking of the linker relaxation code. 2003-01-03 08:21:43 +00:00
Alan Modra 9ca7f3919c daily update 2003-01-02 23:00:03 +00:00
Richard Sandiford 64543e1acf bfd/
* elfxx-mips.c: Include libiberty.h.
	(elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
	(mips_set_isa_flags): New function, split out from...
	(_bfd_mips_elf_final_write_processing): ...here.  Only call
	mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
	(mips_mach_extensions): New array.
	(mips_32bit_flags_p): New function.
	(_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
	Use mips_32bit_flags_p to check if one binary is 32-bit and the
	other is 64-bit.  When adopting IBFD's architecture, adopt the
	bfd_mach as well as the flags.

ld/testsuite/
	* ld-mips-elf/jr.s: New file.
	* ld-mips-elf/mips-elf-flags.exp: New test.
2003-01-02 21:31:32 +00:00
Nick Clifton 4852a44ef5 Rework IP2k linker relxation. 2003-01-02 11:26:17 +00:00
Alan Modra 0a99d72523 daily update 2003-01-01 23:00:03 +00:00
Alan Modra 3e632e7428 daily update 2002-12-31 23:00:03 +00:00
Chris Demetriou af7ee8bfa9 [ bfd/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
	* archures.c (bfd_mach_mipsisa32r2): New define.
	* bfd-in2.h: Regenerate.
	* cpu-mips.c (I_mipsisa32r2): New enum value.
	(arch_info_struct): Add entry for I_mipsisa32r2.
	* elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
	(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
	(_bfd_mips_elf_final_write_processing): Add
	bfd_mach_mipsisa32r2 case.
	(_bfd_mips_elf_merge_private_bfd_data): Handle merging of
	binaries marked as using MIPS32 Release 2.

[ binutils/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* doc/binutils.texi (objdump): Note MIPS HWR (Hardware Register)
	changes in MIPS -M options.

[ gas/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* configure.in: Recognize mipsisa32r2, mipsisa32r2el, and
	CPU variants.
	* configure: Regenerate.
	* config/tc-mips.c (ISA_HAS_DROR, ISA_HAS_ROR): New defines.
	(macro_build): Handle "K" operand.
	(macro2): Use ISA_HAS_DROR and ISA_HAS_ROR in the places where
	CPU_HAS_DROR and CPU_HAS_ROR are currently used.
	(mips_ip): New variable "lastpos", and implement "+A", "+B",
	and "+C" operands for MIPS32 Release 2 ins/ext instructions.
	Implement "K" operand for MIPS32 Release 2 rdhwr instruction.
	(validate_mips_insn): Implement "+" as a way to extend the
	allowed operands, and implement "K", "+A", "+B", and "+C"
	operands.
	(OPTION_MIPS32R2): New define.
	(md_longopts): Add entry for OPTION_MIPS32R2.
	(OPTION_ELF_BASE): Adjust to accomodate OPTIONS_MIPS32R2.
	(md_parse_option): Handle OPTION_MIPS32R2.
	(s_mipsset): Reimplement handling of ".set mipsN" options
	and add support for ".set mips32r2".
	(mips_cpu_info_table): Add entry for "mips32r2" (MIPS32 Release 2).
	(md_show_usage): Document "-mips32r2" option.
	* doc/as.texinfo: Document "-mips32r2" option.
	* doc/c-mips.texi: Likewise.

[ gas/testsuite/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/cp0-names-mips32r2.d: New test.
	* gas/mips/hwr-names-mips32r2.d: New test.
	* gas/mips/hwr-names-numeric.d: New test.
	* gas/mips/hwr-names.s: New test source file.
	* gas/mips/mips32r2.d: New test.
	* gas/mips/mips32r2.s: New test source file.
	* gas/mips/mips32r2-ill.l: New test.
	* gas/mips/mips32r2-ill.s: New test source file.
	* gas/mips/mips.exp: Add mips32r2 architecture data array
	entry.  Run new tests mentioned above.

[ include/elf/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* mips.h (E_MIPS_ARCH_32R2): New define.

[ include/opcode/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* mips.h: Document "+" as the start of two-character operand
	type names, and add new "K", "+A", "+B", and "+C" operand types.
	(OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
	(OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
	defines.

[ opcodes/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* mips-dis.c (mips_cp0_names_mips3264r2, mips_hwr_names_numeric)
	(mips_hwr_names_mips3264r2): New arrays.
	(mips_arch_choice): New "hwr_names" member.
	(mips_arch_choices): Adjust for structure change, and add a new
	entry for "mips32r2" ISA.
	(mips_hwr_names): New variable.
	(set_default_mips_dis_options): Set mips_hwr_names.
	(parse_mips_dis_option): New "hwr-names" option which sets
	mips_hwr_names, and adjust "reg-names=ARCH" to set mips_hwr_names.
	(print_insn_arg): Change return type to "int"
	and use that to indicate number of characters consumed.
	Add support for "+" operand extension character, "+A", "+B",
	"+C", and "K" operands.
	(print_insn_mips): Adjust for changes to print_insn_arg.
	(print_mips_disassembler_options): Adjust for "hwr-names"
	addition and "reg-names" change.
	* mips-opc (I33): New define (shorthand for INSN_ISA32R2).
	(mips_builtin_opcodes): Note that "nop" and "ssnop" are special
	forms of "sll".  Add new MIPS32 Release 2 instructions: ehb,
	di, ei, ext, ins, jr.hb, jalr.hb, mfhc1, mfhc2, mthc1, mthc2,
	rdhwr, rdpgpr, seb, seh, synci, wrpgpr, wsbh.
	Note that hardware rotate instructions (ror, rorv) can be
	used on MIPS32 Release 2, and add the official mnemonics
	for them (rotr, rotrv) and the similar "rotl" mnemonic for
	left-rotate.
2002-12-31 07:29:29 +00:00
Alan Modra e0068bfda2 daily update 2002-12-30 23:00:03 +00:00
Nick Clifton 2469cfa284 Add support for msp430. 2002-12-30 19:25:13 +00:00
Alan Modra 99fc8c7dc5 daily update 2002-12-29 23:00:05 +00:00
Alan Modra 8a4efc1ab7 daily update 2002-12-28 23:00:03 +00:00
Jakub Jelinek eecdbe5279 * elf.c (elf_sort_sections): Don't reorder .tbss.
(assign_file_positions_for_segments): Only adjust off/voff
	for increased alignment in PT_LOAD or PT_NOTE segment,
	but adjust p_filesz for .tbss too.  in PT_LOAD consider
	.tbss to have zero memory size.
	(copy_private_bfd_data) [SECTION_SIZE]: Define.
	[IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
	[INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
	into PT_TLS segment.  Never put SHF_TLS sections in
	segments other than PT_TLS or PT_LOAD.

	* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
	sh_entsize.
2002-12-28 21:15:35 +00:00
Alan Modra f48c1c9e9a daily update 2002-12-27 23:00:33 +00:00
Alan Modra 6c6c88e18c daily update 2002-12-26 23:00:04 +00:00
Alan Modra 0a4ee94c8f daily update 2002-12-25 23:00:04 +00:00
Alan Modra 7690a6b38a daily update 2002-12-24 23:00:04 +00:00
DJ Delorie 213e90f483 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal. 2002-12-24 03:43:44 +00:00
Alan Modra 11e6387acb daily update 2002-12-23 23:00:03 +00:00
Alan Modra 7582835273 * elflink.h (elf_link_output_extsym): Heed strip_discarded. 2002-12-23 11:53:59 +00:00
Nick Clifton 312b768e2f Change linker's default behaviour - it will now reject binary files whoes
architecture it does not recognise, unless it has explicitly told to accept
them.
2002-12-23 10:45:03 +00:00
Alan Modra aabb843608 daily update 2002-12-22 23:00:04 +00:00
Alan Modra 3e9bfb45a0 daily update 2002-12-21 23:00:03 +00:00
Nick Clifton 63222ec9df Disable WINCE workaround that subtracted 8 from pc relative relocations. 2002-12-21 02:21:00 +00:00
Alan Modra be7311b0c4 daily update 2002-12-20 23:00:05 +00:00
Kazu Hirata 19852a2abd * coff-h8300.c: Fix comment typos.
* coffcode.h: Likewise.
	* cpu-cris.c: Likewise.
	* elf32-vax.c: Likewise.
	* genlink.h: Likewise.
	* linker.c: Likewise.
	* som.c: Likewise.
	* tekhex.c: Likewise.
	* vms-misc.c: Likewise.
2002-12-20 22:41:13 +00:00
DJ Delorie 5fd6399981 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
* elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
(xstormy16_reloc_map): Add R_XSTORMY16_12.
2002-12-20 21:13:19 +00:00
Kazu Hirata 4ee79850e0 * doc/bfdint.texi: Fix typos. 2002-12-20 00:35:03 +00:00
Alan Modra 66e25bab62 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
* configure.in (build-warnings): Likewise.
	(Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
2002-12-20 00:09:54 +00:00
Alan Modra 130e217850 daily update 2002-12-19 23:00:04 +00:00
Alan Modra 0171ee92b2 * coff-h8300.c: Include libiberty.h.
(h8300_reloc16_extra_cases): Check the hash table creator before
	referencing h8300 specific fields.  Stash the hash table pointer
	in a local var.  Comment typo fixes.
	(h8300_bfd_link_add_symbols): Likewise.
2002-12-19 01:58:53 +00:00
Alan Modra e5982cf5ba daily update 2002-12-18 23:04:35 +00:00
Alan Modra 7dc77aaa7d * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
dst_mask comments.
	* bfd-in2.h: Regenerate.
2002-12-18 13:47:03 +00:00
Alan Modra 47388f4cc3 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
code a little.  Comment on dynamic relocs against section symbols.
2002-12-18 13:16:35 +00:00
Alan Modra 2e51bbe3d2 daily update 2002-12-17 23:00:04 +00:00
Alan Modra 1b3e374430 * configure.host (ia64-*-hpux*): Support 64 bit targets using
the HP compiler's "long long".
2002-12-17 04:17:21 +00:00
DJ Delorie 46f2b5418f * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
and R_XSTORMY16_HI16) howto entries.
(xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
(xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
determine the start of the second reloc table.
2002-12-17 03:54:15 +00:00
Alan Modra 28274f1d5a daily update 2002-12-16 23:00:05 +00:00
Nick Clifton af738ea75a Fix the reading of the debugging information of Tru64/Alpha binaries that
are produced by recent Compaq compilers.
2002-12-16 16:25:06 +00:00
Alan Modra 847b352715 daily update 2002-12-15 23:35:50 +00:00
Alan Modra 1b9b1dcc84 daily update 2002-12-14 23:00:05 +00:00
Alan Modra eaab896093 daily update 2002-12-13 23:00:06 +00:00
Alan Modra cc6a87da5e daily update 2002-12-12 23:00:04 +00:00
Alexandre Oliva 5354b572b3 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
initializers to match struct declaration.
2002-12-12 21:54:32 +00:00
Alan Modra ab3acfbe8d Comment typo fixes. 2002-12-12 10:26:01 +00:00
Alan Modra 6348e046b7 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
to DT_JMPREL.  Use srelplt input section size for DT_PLTRELSZ and
	DT_RELSZ adjustment, not output section.  Avoid writing tags when
	unchanged.  Don't assume linker script is sane, adjust DT_REL too.
	* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
	size of srelplt for DT_PLTRELSZ.  Use srelplt input section size for
	DT_RELASZ adjustment, not output section.  Avoid writing tags when
	unchanged.  Adjust DT_RELA.
	* elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
	formatting.  Avoid writing tags when unchanged.  Adjust DT_RELA.
2002-12-12 10:17:14 +00:00
Alexandre Oliva 2e7a68a82f * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
addend by 4.
2002-12-12 04:42:06 +00:00
Alexandre Oliva b15e668260 * elfxx-mips.c (struct mips_got_entry): New.
(struct mips_got_info): Added got_entries field.
(mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
(mips_elf_local_got_index, mips_elf_got_page,
mips_elf_got16_entry): Re-implement in terms of new...
(mips_elf_create_local_got_entry): Rewrite to use got_entries.
Change return type.
(mips_elf_highest): Warning clean-up.
(mips_elf_create_got_section): Initialize got_entries.
(_bfd_mips_elf_check_relocs): Use got_entries to estimate
local got size.
(_bfd_mips_elf_size_dynamic_sections): Do not account for
GOT_PAGE entries, since we now reuse GOT16 entries.
2002-12-12 02:55:41 +00:00
Alan Modra 6ebc770bc6 daily update 2002-12-11 23:00:05 +00:00
Alan Modra 7b166d9e59 daily update 2002-12-10 23:00:04 +00:00
Nick Clifton e6af3a53b1 Allow an otherwise unrepresentable read-only section that lies after .text
and before .data to be written into the output file and included in a_text.
2002-12-10 16:15:27 +00:00
Alan Modra af8b928e75 daily update 2002-12-09 23:46:37 +00:00
Alan Modra c546ac08d5 daily update 2002-12-08 23:00:05 +00:00
Alan Modra cf3d882d19 * bfd-in.h: Comment typo fix. Formatting.
* bfd-in2.h: Regenerate.
	* coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
	* elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
	* elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
2002-12-08 03:34:38 +00:00
Alan Modra 1b02d8ea3f daily update 2002-12-07 23:00:04 +00:00
Alan Modra 3b7963af46 daily update 2002-12-06 23:00:04 +00:00
Richard Henderson 2f9bd3f641 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
Only send PCREL21B though the plt.  Fix installed reloc type.
        (elfNN_ia64_relocate_section): Give error for dynamic reloc
        against PCREL22 or PCREL64I; clean up error messages for
        branch relocs.
2002-12-06 01:48:24 +00:00
Alan Modra 3d8fe2eb21 daily update 2002-12-05 23:00:05 +00:00
Kevin Buettner d0112f7353 Add n64 core file support for Linux/MIPS. 2002-12-05 05:04:00 +00:00
Jim Wilson c10d9d8fc3 Patch to update IA-64 port to SDM 2.1.
bfd/ChangeLog
	* cpu-ia64-opc.c: Add operand constant "ar.csd".
gas/ChangeLog
	* config/tc-ia64.c (pseudo_func): Add "@pause" constant for "hint"
	instruction.
	(emit_one_bundle): Handle "hint" instruction.
	(operand_match): Match IA64_OPND_AR_CSD.
gas/testsuite/ChangeLog
	* gas/ia64/opc-b.d: Update for instructions added by SDM2.1.
	* gas/ia64/opc-b.s: Ditto.
	* gas/ia64/opc-f.d: Ditto.
	* gas/ia64/opc-f.s: Ditto.
	* gas/ia64/opc-i.d: Ditto.
	* gas/ia64/opc-i.s: Ditto.
	* gas/ia64/opc-m.d: Ditto.
	* gas/ia64/opc-m.s: Ditto.
	* gas/ia64/opc-x.d: Ditto.
	* gas/ia64/opc-x.s: Ditto.
include/opcode/ChangeLog
	* ia64.h: Fix copyright message.
	(IA64_OPND_AR_CSD): New operand kind.
opcodes/ChangeLog
	* ia64-opc-d.c (ia64_opcodes_d): Add "hint" instruction.
	* ia64-opc-b.c: Add "hint.b" instruction.
	* ia64-opc-f.c: Add "hint.f" instruction.
	* ia64-opc-i.c: Add "hint.i" instruction.
	* ia64-opc-m.c: Add "hint.m", "fc.i", "ld16", "st16", and
	"cmp8xchg16" instructions.
	* ia64-opc-x.c: Add "hint.x" instruction.
	* ia64-opc.h (AR_CSD): New macro.
	* ia64-ic.tbl: Update according to SDM2.1.
	* ia64-raw.tbl: Ditto.
	* ia64-waw.tbl: Ditto.
	* ia64-gen.c (in_iclass): Handle "hint" like "nop".
	(lookup_regindex): Recognize AR[FCR], AR[EFLAG], AR[CSD],
	AR[SSD], AR[CFLG], AR[FSR], AR[FIR], and AR[FDR].
	* ia64-asmtab.c: Regenerate.
2002-12-05 02:08:02 +00:00
H.J. Lu d48770d487 2002-12-04 H.J. Lu <hjl@gnu.org>
* elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
	BFD address when constructing local name.
2002-12-04 23:59:27 +00:00
Alan Modra 9b7400f84d daily update 2002-12-04 23:00:33 +00:00
Andreas Schwab b6152c3461 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
member.
	(elf_m68k_link_hash_table_create): Initialize it.
	(elf_m68k_check_relocs): Handle symbols that are forced to be
	local due to visibility changes.
	(elf_m68k_adjust_dynamic_symbol): Likewise.
	(elf_m68k_size_dynamic_sections): Likewise.
	(elf_m68k_discard_copies): Likewise.
	(elf_m68k_relocate_section): Likewise.
2002-12-04 15:07:13 +00:00
Alan Modra 73374ef17b * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo. 2002-12-04 11:08:16 +00:00
Alan Modra c5c1944d0f * srec.c (srec_write_symbols): Restore '$' prefix to address
accidentally removed in 2002-04-04 change.
	(srec_get_symtab): Use 0 instead of `(long) FALSE'.
2002-12-03 23:55:48 +00:00
Alan Modra 80f6040336 daily update 2002-12-03 23:00:04 +00:00
Nick Clifton 6b0817e5ee Fix typo in ChangeLog entry.
Add paranoia checks to .PPC.EMB.apuinfo merging code.
2002-12-03 18:52:45 +00:00
Nick Clifton e1a9cb8e15 Fix the merging of .PPC.EMB.apuinfo sections. Add a test to make sure that
the fix continues to work.
2002-12-03 18:24:33 +00:00
Richard Henderson a823923bf6 include/opcode/
* ia64.h (enum ia64_opnd): Add IA64_OPND_LDXMOV.
bfd/
        * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
opcodes/
        * ia64-opc-m.c: Add ld8.mov.
        * ia64-asmtab.c: Regenerate.
gas/
        * config/tc-ia64.c (operand_match): Add IA64_OPND_LDXMOV case.
gas/testsuite/
        * gas/ia64/ldxmov-1.[ds]: New.
        * gas/ia64/ldxmov-2.[ls]: New.
        * gas/ia64/ia64.exp: Run them.
2002-12-03 18:15:48 +00:00
Alan Modra 5adef1a05f daily update 2002-12-02 23:00:05 +00:00
Alan Modra 16203efcba daily update 2002-12-01 23:00:05 +00:00
Stephane Carrez 3049164782 Fix PR savannah/1417:
* elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
	branch if it goes to the start of the deleted region.
2002-12-01 13:24:03 +00:00
Stephane Carrez bc7c6a9029 * bfd-in2.h (bfd_mach_m6812): Rebuild.
* archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
	bfd_mach_m6812s): Declare.

	* elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
	(_bfd_m68hc12_elf_set_private_flags): Call it.
	(_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
	(_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
	report microcontroller incompatibilities (HC12 vs HCS12).
	(elf_backend_object_p): Update.
2002-12-01 12:18:29 +00:00
Alan Modra 6ecb41c605 daily update 2002-11-30 23:00:05 +00:00
Alan Modra b34976b65a s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE.  Formatting.
2002-11-30 08:39:46 +00:00
Alan Modra 24fddaa0e7 daily update 2002-11-29 23:00:04 +00:00
Alan Modra e5af98ed41 daily update 2002-11-28 23:00:04 +00:00
Alan Modra 947216bf8f include/elf/ChangeLog
* internal.h (elf32_internal_ehdr, Elf32_Internal_Ehdr,
	elf64_internal_ehdr, Elf64_Internal_Ehdr, elf32_internal_phdr,
	Elf32_Internal_Phdr, elf64_internal_phdr, Elf64_Internal_Phdr,
	elf32_internal_shdr, Elf32_Internal_Shdr, elf64_internal_shdr,
	Elf64_Internal_Shdr, elf32_internal_sym, elf64_internal_sym,
	Elf32_Internal_Sym, Elf64_Internal_Sym, Elf32_Internal_Note,
	elf32_internal_note, elf32_internal_rel, Elf32_Internal_Rel,
	elf64_internal_rel, Elf64_Internal_Rel, elf32_internal_rela,
	elf64_internal_rela, Elf32_Internal_Rela, Elf64_Internal_Rela,
	elf32_internal_dyn, elf64_internal_dyn, Elf32_Internal_Dyn,
	Elf64_Internal_Dyn, elf32_internal_verdef, elf64_internal_verdef,
	elf32_internal_verdaux, elf64_internal_verdaux, elf32_internal_verneed,
	elf64_internal_verneed, elf32_internal_vernaux, elf64_internal_vernaux,
	elf32_internal_versym, elf64_internal_versym, Elf32_Internal_Verdef,
	Elf64_Internal_Verdef, Elf32_Internal_Verdaux, Elf64_Internal_Verdaux,
	Elf32_Internal_Verneed, Elf64_Internal_Verneed, Elf32_Internal_Vernaux,
	Elf64_Internal_Vernaux, Elf32_Internal_Versym, Elf64_Internal_Versym,
	Elf32_Internal_Syminfo, Elf64_Internal_Syminfo): Delete.
	(Elf_Internal_Rel): Delete.

bfd/ChangeLog
	* elf-bfd.h: Replace occurrences of Elf32_Internal_* and
	Elf64_Internal_* with Elf_Internal_*.  Replace Elf_Internal_Rel
	with Elf_Internal_Rela.
	* elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
	elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.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-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
	elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
	elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
	elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
	elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
	elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
	elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
	* elf-hppa.h (elf_hppa_internal_shdr): Delete.  Use Elf_Internal_Shdr
	throughout instead.
	* elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
	* elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
	Remove INLINE keyword.
	(elf_swap_reloc_in): Likewise.  Also clear r_addend.
	(elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
	as a bfd_byte *.
	(elf_write_relocs): Consolidate REL and RELA code.
	(elf_slurp_reloc_table_from_section): Simplify REL code.
	(NAME(_bfd_elf,size_info)): Populate reloc swap entries.
	* elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
	* elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
	RELA code.
	(elf_link_adjust_relocs): Likewise.  Don't malloc space for temp
	reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
	(elf_link_output_relocs): Likewise.
	(elf_reloc_link_order): Likewise.
	(elf_finish_pointer_linker_section): Likewise.
	(struct elf_link_sort_rela): Remove union.
	(elf_link_sort_cmp1): Update to suit.
	(elf_link_sort_cmp2): Here too.
	(elf_link_sort_relocs): Consolidate REL and RELA code.  Fix memory
	over-allocation for int_rels_per_ext_rel != 1 case.
	* elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
	* elf32-i386.c: Likewise.
	* elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
	* elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
	elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
	* elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
	* elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
	elf64-sparc.c, elf64-x86-64.c: Likewise.
	* elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
	* elfxx-mips.c (sort_dynamic_relocs): Likewise for
	bfd_elf32_swap_reloc_in.

	* elf32-arm.h: Update elf32_arm_info_to_howto calls.
	* elf32-mips.c: Likewise for mips_info_to_howto_rel.
	(mips_elf64_swap_reloc_in): Zero r_addend.
	(mips_elf64_be_swap_reloc_in): Likewise.
	(mips_elf64_slurp_one_reloc_table): Simplify.

	* elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
	* elf64-hppa.c (hppa64_elf_size_info): Likewise.
	* elf64-sparc.c (sparc64_elf_size_info): Likewise.
2002-11-28 11:55:43 +00:00
Kaz Kojima 1448fa3227 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
unresolved debugging relocs in dynamic applications.
	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
	* ld-sh/refdbg-0-dso.d: New test.
	* ld-sh/refdbg-1.d: Likewise.
	* ld-sh/refdbg.s: Likewise.
	* ld-sh/refdbglib.s: Likewise.
2002-11-28 08:37:15 +00:00
Alan Modra 8fe83ebee4 daily update 2002-11-27 23:00:04 +00:00
Alan Modra df869a462a daily update 2002-11-26 23:00:05 +00:00
Alan Modra 73722af036 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
(_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
	on a relocatable link.  Comment typos.
	* elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
	in the order they are declared.  Clear elf_hash_value too.
	(_bfd_elf_link_hash_table_init): Likewise assign in order.  Clear
	eh_info and tls_segment.
	* elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
	sorted when discarding relocs by turning them into R_*_NONE.

	* libbfd.c (warn_deprecated): Comment spelling.
	* po/SRC-POTFILES.in: Regenerate.
2002-11-26 11:54:02 +00:00
Alan Modra 8ae8aa02d3 daily update 2002-11-25 23:00:05 +00:00
Alan Modra 6902388cfe daily update 2002-11-24 23:00:05 +00:00
Alan Modra 462cb1bb28 daily update 2002-11-23 23:00:03 +00:00
Alan Modra 3f4147632f daily update 2002-11-22 23:00:05 +00:00
Alan Modra caa402677f daily update 2002-11-21 23:00:04 +00:00
Richard Henderson 7c25b72c17 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
arch's st_other bits when merging visibilities.
        (elf_link_output_extsym): Tidy clearing of visibility field.
2002-11-21 18:52:36 +00:00
Alan Modra dc12c51f36 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
(SWAP_OUT_RELOC_OFFSET): Define.
2002-11-21 13:11:33 +00:00
Alan Modra ca38dbba3d daily update 2002-11-20 23:00:05 +00:00
Alexandre Oliva 963f13ecfe * elf.c (_bfd_elf_link_hash_table_init): Make sure
can_refcount is properly extended to the type of
init_refcount.
2002-11-20 18:17:04 +00:00
Alan Modra 3643cf46d6 daily update 2002-11-19 23:00:05 +00:00
Alexandre Oliva 4ffba85cf6 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
(_bfd_mips_elf_relocate_section): Use it.
2002-11-19 20:52:32 +00:00
Alexandre Oliva ee6423ed14 * elfxx-mips.c (MNAME): New macro.
(_bfd_mips_elf_check_relocs): Use it.
(_bfd_mips_elf_discard_info): Likewise.
(_bfd_mips_elf_final_link): Likewise.
2002-11-19 20:50:43 +00:00
Alan Modra cdcf6e38a2 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
rel_hdr.sh_size too.
2002-11-19 06:32:35 +00:00
Alan Modra 80b26a8da1 daily update 2002-11-18 23:00:06 +00:00
Klee Dienes 93509525ce 2002-11-16 Klee Dienes <kdienes@apple.com>
* Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
	(BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
	(BFD_H_FILES): Add bfdwin.c, bfdio.c.
	(LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
	Add dependencies for bfdwin.c, bfdio.c.
	* bfd.c: Remove bfd_get_mtime, bfd_get_size.
	* libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
	bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
	bfd_tell, bfd_flush, bfd_stat, bfd_seek.
	* bfdio.c: New file.  Contains real_read, bfd_bread, bfd_write,
	bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
	bfd_get_size (moved from libbfd.c and bfd.c).
	* bfdwin.c New file.  Contains _bfd_window_internal,
	bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
	libbfd.c and bfd.c).
	* po/SRC-POTFILES.in: Regenerate.
	* po/bfd.pot: Regenerate.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
	* aclocal.m4: Regenerate.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

2002-11-16  Klee Dienes  <kdienes@apple.com>

	* Makefile.am (DOCFILES): Add bfdwin.texi, bfdio.texi.
	(PROTOS): Add bfdio.p, bfdwin.p.
	(SRCDOC): Add bfdio.c, bfdwin.c.
	(SRCPROT): Add bfdio.c, bfdwin.c.
	(SRCIPROT): Add bfdio.c, bfdwin.c.
	(LIBBFD_H_DEP): Add bfdio.c, bfdwin.c.
	(BFD_H_DEP): Add bfdio.c, bfdwin.c.
	Add rules for bfdio.texi, bfdwin.text.
	* bfd.texinfo: Include bfdio.texi.
2002-11-18 16:37:54 +00:00
Alan Modra 3ae414543e * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY. 2002-11-18 00:33:01 +00:00
Alan Modra b98a09c8ac daily update 2002-11-17 23:00:03 +00:00
Alan Modra ad6e681780 daily update 2002-11-16 23:00:04 +00:00
Klee Dienes aca9b8e5ab Remove spurious ChangeLog addition. 2002-11-16 21:09:08 +00:00
Klee Dienes 087e01e5f0 2002-11-16 Klee Dienes <kdienes@apple.com>
* m88k.h (INSTAB): Remove 'next' field.
	(instruction): Remove definition; replace with extern declaration
	and mark as const.

2002-11-16  Klee Dienes  <kdienes@apple.com>

	* m88k-dis.c: (HASHTAB): New type, used to build instruction hash tables.
	Contains a pointer to an INSTAB and a pointer to the next hash
	chain entry.
	(instructions): Move definition from m88k.h; remove initialization
	of 'next' field.
	(hashtable): Now an aray of pointer-to-HASHTAB, not INSTAB.
	(printop): Mark pointer to OPSPEC as const.
	(install): Remove; fold into init_disasm.
	(m88kdis): Update to ihashtab_initialized to 1 after calling init_disasm.
	entry_ptr now iterates through HASHTABs, not INSTABs.
	(init_disasm): Iterate through the instructions and add to hashtable[].
2002-11-16 18:34:52 +00:00
Alan Modra b7b7461f84 daily update 2002-11-15 23:00:04 +00:00
Nick Clifton e514ac71cb Fix h8300 relaxation. 2002-11-15 11:18:49 +00:00
Klee Dienes eddc4f813f 2002-11-15 Klee Dienes <kdienes@apple.com>
* pef.c (bfd_pef_convert_architecture): Move declaration
        ARCH_POWERPC and ARCH_M68K to the start of the function.
2002-11-15 08:38:38 +00:00
Alan Modra 11e6ddcda6 daily update 2002-11-14 23:00:04 +00:00
Svein Seldal 51908eee4e * coff-tic4x.c (tic4x_howto_table): Formatting fixup 2002-11-14 11:02:30 +00:00