Commit Graph

116 Commits

Author SHA1 Message Date
Alan Modra c9727e01b5 bfd/
* bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
	* elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
	* elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
	* libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
	* targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
	Use both symbol tables on non-relocatable objects.  Use a common
	error exit.  Fix "mid" warning.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
binutils/
	* objdump.c (dump_bfd): Pass both symbol tables to
	bfd_get_synthetic_symtab.
2004-08-28 03:05:18 +00:00
Jason Thorpe 225247f09f bfd:
* config.bfd (hppa*-*-netbsd*): Set targ_defvec to
bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
to targ_selvecs.
* configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
* configure: Regenerate.
* elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
case that accepts OSABI=NetBSD and OSABI=SysV.
(elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
the base of .got or .data (if .got does not exist).
(elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
set OSABI=NetBSD.
(TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
(TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
* targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
(_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.

gas:
* config/tc-hppa.h (TARGET_FORMAT): Set to "elf32-hppa-netbsd"
for TE_NetBSD.

ld:
* emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
2004-07-27 22:30:25 +00:00
H.J. Lu 082b729701 bfd/
2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>

	* aout-adobe.c (aout_32_section_already_linked): Defined.
	* aout-target.h (MY_section_already_linked): Likewise.
	* aout-tic30.c (MY_section_already_linked): Likewise.
	* binary.c (binary_section_already_linked): Likewise.
	* bout.c (b_out_section_already_linked): Likewise.
	* coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
	* coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
	* coffcode.h (coff_section_already_linked): Likewise.
	* i386msdos.c (msdos_section_already_linked): Likewise.
	* i386os9k.c (os9k_section_already_linked): Likewise.
	* ieee.c (ieee_section_already_linked): Likewise.
	* ihex.c (ihex_section_already_linked): Likewise.
	* mach-o.c (bfd_mach_o_section_already_linked): Likewise.
	* mmo.c (mmo_section_already_linked): Likewise.
	* nlm-target.h (nlm_section_already_linked): Likewise.
	* oasys.c (oasys_section_already_linked): Likewise.
	* pef.c (bfd_pef_section_already_linked): Likewise.
	* ppcboot.c (ppcboot_section_already_linked): Likewise.
	* som.c (som_bfd_discard_group): Likewise.
	* srec.c (srec_section_already_linked): Likewise.
	* tekhex.c (tekhex_section_already_linked): Likewise.
	* versados.c (versados_section_already_linked): Likewise.
	* vms.c (vms_section_already_linked): Likewise.
	* coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
	* xsym.c (bfd_sym_section_already_linked): Likewise.

	* bfd-in.h (bfd_section_already_linked_table_init): New.
	(bfd_section_already_linked_table_free): Likewise.

	* coff-rs6000.c (rs6000coff_vec): Add
	_bfd_generic_section_already_linked.
	(pmac_xcoff_vec): Likewise.
	* coff64-rs6000.c (rs6000coff64_vec): Likewise.
	(aix5coff64_vec): Likewise.

	* elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
	* elflink.c (_bfd_elf_section_already_linked): New function.

	* elfxx-target.h (bfd_elfNN_section_already_linked): Defined.

	* libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
	(_bfd_generic_section_already_linked): New.
	(bfd_section_already_linked_hash_entry): Likewise.
	(bfd_section_already_linked): Likewise.
	(bfd_section_already_linked_table_lookup): Likewise.
	(bfd_section_already_linked_table_insert): Likewise.

	* linker.c (bfd_section_already_linked): New.
	(_bfd_section_already_linked_table): Likewise.
	(bfd_section_already_linked_table_lookup): Likewise.
	(bfd_section_already_linked_table_insert): Likewise.
	(already_linked_newfunc): Likewise.
	(bfd_section_already_linked_table_init): Likewise.
	(bfd_section_already_linked_table_free): Likewise.
	(_bfd_generic_section_already_linked): Likewise.

	* section.c (bfd_section): Remove comdat.
	(bfd_comdat_info): Moved to ...
	* bfd-in.h (coff_comdat_info): Here.
	(bfd_coff_get_comdat_section): New.
	* coffgen.c (bfd_coff_get_comdat_section): Likewise.
	* libcoff-in.h (coff_section_tdata): Add comdat.
	* coffcode.h (handle_COMDAT): Updated.
	* cofflink.c (coff_link_add_symbols): Likewise.
	* ecoff.c (bfd_debug_section): Likewise.

	* targets.c (bfd_target): Add _section_already_linked.
	(BFD_JUMP_TABLE_LINK): Updated.

	* bfd-in2.h: Regenerated.
	* libbfd.h: Likewise.
	* libcoff.h: Likewise.

binutils/

2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>

	* objcopy.c (filter_symbols): Use bfd_coff_get_comdat_section
	to access comdat.
	* objdump.c (dump_section_header): Likewise.

ld/

2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>

	* ldlang.c (already_linked_hash_entry): Removed.
	(already_linked): Likewise.
	(already_linked_table): Likewise.
	(section_already_linked): Call bfd_section_already_linked.
	(lang_process): Replace already_linked_table_init with
	bfd_section_already_linked_table_init and check return. Replace
	already_linked_table_free with bfd_section_already_linked_table_free.
2004-07-21 15:42:58 +00:00
Nick Clifton 1fe1f39c06 Add new port: crx-elf 2004-07-07 17:28:53 +00:00
Nick Clifton 85fbca6a4f Add support for sh-symbian-elf target 2004-07-06 16:58:43 +00:00
Nick Clifton c6f8758fa0 Add support for an m88k-openbsd target 2004-05-24 14:48:18 +00:00
Bob Wilson 80fccad2d4 binutils ChangeLog:
2004-05-17  David Heine  <dlheine@tensilica.com>
	* objcopy.c (setup_bfd_headers): New function.
	(copy_object): Call setup_bfd_headers.
bfd ChangeLog:
	2004-05-17  David Heine  <dlheine@tensilica.com>
	* aout-target.h (MY_bfd_copy_private_header_data): Define.
	* aout-tic30.c (MY_bfd_copy_private_header_data): Define.
	* bfd.c (bfd_copy_private_header_data): Define.
	* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
	interface.
	* coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
	* coffcode.h (coff_bfd_copy_private_header_data): Define.
	* elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
	* elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
	segments by calling copy_private_bfd_data.
	(_bfd_elf_copy_private_header_data): Define.
	* elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
	* libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
	* libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
	* mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
	* mmo.c (mmo_bfd_copy_private_header_data): Define.
	* ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
	* som.c (som_bfd_copy_private_header_data): Define.
	* targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
	* vms.c (vms_bfd_copy_private_header_data): Define.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
2004-05-17 16:40:01 +00:00
Alexandre Oliva 43850d5b4b * configure.in (bfd_elf32_frvfdpic_vec): New.
* configure: Rebuilt.
* targets.c (bfd_elf32_frvfdpic_vec): New.
* config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
on the latter.
* elf32-frv.c: Prefix all identifiers added for FDPIC support with
frvfdpic instead of frv.  Rearrange elf-target macros such that
the FDPIC-specific ones are only defined for this new target
vector.
(bfd_elf32_frvfdpic_vec): Declare.
(IS_FDPIC): New.
(elf32_frv_relocate_section): Use it to enable segment checking
and to control rofixup emission.  Add output section vma to
applied relocation in non-LOAD non-ALLOC sections.  Use
_bfd_error_handler for errors.
(_frv_create_got_section): Create .rel.got and .rofixup only in
FDPIC.  Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
linker script.
(elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
(elf32_frvfdpic_modify_segment_map): Likewise.
(elf32_frv_finish_dynamic_sections): New, do-nothing.
(elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC.  Improve
error message if we miscompute the rofixup size.
(frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
(frvfdpic_elf_encode_eh_address): Likewise.
(elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
Record relocs only in FDPIC.  Make sure _gp is defined for GPREL
relocs.  Reject unknown relocation types.
(elf32_frv_object_p): Make sure target vector matches FDPIC bits.
(frv_elf_merge_private_bfd_data): Likewise.
(ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
0x4000 for newly-added elf32-frvfdpic.
2004-05-06 02:46:29 +00:00
Alan Modra 72adc23045 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
* elf-bfd.h (bfd_elf_is_group_section): Declare.
	* elf.c (bfd_elf_is_group_section): New function.
	* elfxx-target.h (bfd_elfNN_bfd_is_group_section
	* section.c (bfd_generic_is_group_section): New function.
	* targets.c (struct bfd_target): Add _bfd_is_group_section field.
	(BFD_JUMP_TABLE_LINK): Adjust.
	* aout-adobe.c (aout_32_bfd_is_group_section): Define.
	* aout-target.h (MY_bfd_is_group_section): Define.
	* aout-tic30.c (MY_bfd_is_group_section): Define.
	* bfd.c (bfd_is_group_section): Define.
	* binary.c (binary_bfd_is_group_section): Define.
	* bout.c (b_out_bfd_is_group_section): Define.
	* coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
	* coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
	* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
	* coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
	* coffcode.h (coff_bfd_is_group_section): Define.
	* i386msdos.c (msdos_bfd_is_group_section): Define.
	* i386os9k.c (os9k_bfd_is_group_section): Define.
	* ieee.c (ieee_bfd_is_group_section): Define.
	* ihex.c (ihex_bfd_is_group_section): Define.
	* libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
	* mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
	* mmo.c (mmo_bfd_is_group_section): Define.
	* nlm-target.h (nlm_bfd_is_group_section): Define.
	* oasys.c (oasys_bfd_is_group_section): Define.
	* pef.c (bfd_pef_bfd_is_group_section): Define.
	* ppcboot.c (ppcboot_bfd_is_group_section): Define.
	* srec.c (srec_bfd_is_group_section): Define.
	* tekhex.c (tekhex_bfd_is_group_section): Define.
	* versados.c (versados_bfd_is_group_section): Define.
	* vms.c (vms_bfd_is_group_section): Define.
	* xsym.c (bfd_sym_bfd_is_group_section): Define.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
2004-04-30 14:23:40 +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 0949843db2 Add (linker) support for CR16C processor 2004-03-30 14:04:32 +00:00
Alan Modra 8ce8c090f3 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
(BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
	(bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
	(bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
	(bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
	* configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
	(BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
	when using long.
	* libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
	(bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
	(bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
	(bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
	(bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
	* dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
	(read_8_bytes, read_indirect_string, read_address): Likewise.
	(read_abbrevs, parse_comp_unit): Likewise.
	* targets.c (struct bfd_target): Likewise.
	* aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
	* hppabsd-core.c: Likewise.  Formatting.
	* hpux-core.c: Likewise.
	* irix-core.c: Likewise.
	* netbsd-core.c: Likewise.
	* osf-core.c: Likewise.
	* ptrace-core.c: Likewise.
	* sco5-core.c: Likewise.
	* trad-core.c: Likewise.
	* configure: Regenerate.
	* bfd-in2.h: Regenerate.
2004-03-15 14:21:43 +00:00
Alan Modra edeb6e24a9 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
(bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
	(bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
	(bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
	(bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
	(bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
	(bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
	* libbfd.c: Likewise in function definitions.
	(bfd_put_8): Mask with 0xff rather than casting to char.
	(bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
	(bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
	(H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
	(H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
	(H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
	(H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
	* libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
	(H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
	(H_GET_64, H_GET_32, H_GET_16): Likewise.
	(H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
	* archive.c (do_slurp_coff_armap): Update swap prototype.
	* coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
	(tic54x_getl_signed_32): Likewise.
	(tic54x_putl32): Likewise.  Mask with 0xff rather than casting to char.
	* mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
	* pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
	(bfd_getp_signed_32, bfd_putp32): Likewise.
	* targets.c (struct bfd_target): Use void* in place of bfd_byte* for
	bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
	bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
	bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
	bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
	bfd_h_getx_signed_16, bfd_h_putx16.
	* aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
	* hppabsd-core.c: Similarly.  Rename NO_SIGNED_GET to NO_GETS.
	* hpux-core.c: Likewise.
	* irix-core.c: Likewise.
	* netbsd-core.c: Likewise.
	* osf-core.c: Likewise.
	* ptrace-core.c: Likewise.
	* sco5-core.c: Likewise.
	* trad-core.c: Likewise.
	* bfd-in2.h: Regenerate.
2004-03-15 12:23:11 +00:00
Nick Clifton 6edf0760c5 Add support for m32r-linux target, including a RELA ABI and PIC. 2003-12-19 11:44:01 +00:00
Kazu Hirata 7dee875eb1 * ChangeLog: Fix typos.
* ecoff.c: Fix comment typos.
	* ecofflink.c: Likewise.
	* format.c: Likewise.
	* hp300hpux.c: Likewise.
	* i386linux.c: Likewise.
	* ieee.c: Likewise.
	* m68klinux.c: Likewise.
	* mach-o.h: Likewise.
	* mipsbsd.c: Likewise.
	* oasys.c: Likewise.
	* opncls.c: Likewise.
	* peXXigen.c: Likewise.
	* reloc.c: Likewise.
	* reloc16.c: Likewise.
	* section.c: Likewise.
	* simple.c: Likewise.
	* som.c: Likewise.
	* som.h: Likewise.
	* sparclinux.c: Likewise.
	* srec.c: Likewise.
	* syms.c: Likewise.
	* targets.c: Likewise.
	* tekhex.c: Likewise.
	* versados.c: Likewise.
	* vms-gsd.c: Likewise.
	* vms-hdr.c: Likewise.
	* vms-misc.c: Likewise.
	* xcofflink.c: Likewise.
	* xsym.h: Likewise.
	* bfd-in2.h: Regenerate.
2003-11-30 18:40:41 +00:00
Alan Modra 0f867abe4a * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
* aoutx.h (NAME(aout,set_section_contents)): Ditto.
	* bfd-in2.h: Regenerate.
	* binary.c (binary_set_section_contents): Ditto.
	* bout.c (b_out_set_section_contents): Ditto.
	* coff-tic54x.c (tic54x_set_section_contents): Ditto.
	* coffcode.h (coff_set_section_contents): Ditto.
	* ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
	* elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
	* elf.c (_bfd_elf_set_section_contents): Ditto.
	* elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
	* elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
	* i386msdos.c (msdos_set_section_contents): Ditto.
	* ieee.c (ieee_set_section_contents): Ditto.
	* ihex.c (ihex_set_section_contents): Ditto.
	* libaout.h (NAME(aout,set_section_contents)): Ditto.
	* libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
	(_bfd_generic_set_section_contents): Ditto.
	* libbfd.h: Regenerate.
	* libbfd.c (_bfd_generic_set_section_contents): Ditto.
	* libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
	* libnlm.h (nlmNAME(set_section_contents)): Ditto.
	(struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
	* mmo.c (mmo_set_section_contents): Ditto.
	* nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
	* nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
	* nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
	* nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
	* nlmcode.h (nlm_set_section_contents): Ditto.
	* oasys.c (oasys_set_section_contents): Ditto.
	* pdp11.c (NAME(aout,set_section_contents)): Ditto.
	* ppcboot.c (ppcboot_set_section_contents): Ditto.
	* srec.c (srec_set_section_contents): Ditto.
	* targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
	* tekhex.c (tekhex_set_section_contents): Ditto.
	(move_section_contents): Ditto.
	* versados.c (versados_set_section_contents): Ditto.
	* vms-misc.c (_bfd_save_vms_section): Ditto.
	* vms.c (vms_set_section_contents): Ditto.
	* vms.h (_bfd_save_vms_section): Ditto.
2003-11-04 10:41:52 +00:00
Andrew Cagney fc0a224429 Index: sim/frv/ChangeLog
2003-10-30  Andrew Cagney  <cagney@redhat.com>

	* traps.c: Replace "struct symbol_cache_entry" with "struct
	bfd_symbol".

Index: sim/d10v/ChangeLog
2003-10-30  Andrew Cagney  <cagney@redhat.com>

	* simops.c: Replace "struct symbol_cache_entry" with "struct
	bfd_symbol".

Index: sim/common/ChangeLog
2003-10-30  Andrew Cagney  <cagney@redhat.com>

	* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
	with "struct bfd_symbol".

Index: ld/ChangeLog
2003-10-30  Andrew Cagney  <cagney@redhat.com>

	* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
	with "struct bfd_symbol".

Index: bfd/ChangeLog
2003-10-30  Andrew Cagney  <cagney@redhat.com>

	* syms.c: Replace "struct symbol_cache_entry" with "struct
	bfd_symbol".
	* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
	* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
	* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
	* bfd-in2.h: Re-generate.
2003-10-31 05:32:46 +00:00
Andrew Cagney 198beae2cf 2003-10-19 Andrew Cagney <cagney@redhat.com>
* targets.c: Replace "struct sec" with "struct bfd_section"
	* syms.c, sparclynx.c, section.c, opncls.c: Ditto.
	* libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
	* elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
	* aout-tic30.c, aout-target.h:
	* bfd-in2.h, libcoff.h, libbfd.h: Regenerate.

Index: binutils/ChangeLog
2003-10-19  Andrew Cagney  <cagney@redhat.com>

	* coffgrok.h (coff_section): Replace 'struct sec" with "struct
	bfd_section".

Index: gdb/ChangeLog
2003-10-19  Andrew Cagney  <cagney@redhat.com>

	* symtab.c: Replace "struct sec" with "struct bfd_section".
	* objfiles.c, linespec.c, blockframe.c, block.c: Ditto.

Index: ld/ChangeLog
2003-10-19  Andrew Cagney  <cagney@redhat.com>

	* pe-dll.c: Replace "struct sec" with "struct bfd_section".

Index: sim/common/ChangeLog
2003-10-19  Andrew Cagney  <cagney@redhat.com>

	* sim-base.h: Replace "struct sec" with "struct bfd_section".
2003-10-20 14:38:46 +00:00
Andrew Cagney 6cee3f79e4 Index: doc/ChangeLog
2003-10-15  Andrew Cagney  <cagney@redhat.com>

	* bfdint.texi (BFD target vector symbols): Rename _get_symtab to
	_canonicalize_symtab.

2003-10-15  Andrew Cagney  <cagney@redhat.com>

	* targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
	with NAME##_canonicalize_symtab.
	* libcoff-in.h (coff_canonicalize_symtab): Update.
	* xsym.h (bfd_sym_canonicalize_symtab): Update.
	* elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
	* coffgen.c (coff_canonicalize_symtab): Update.
	* libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
	* libnlm.h (nlmNAME(canonicalize_symtab)): Update.
	* ieee.c (ieee_vec): Update comment.
	* libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
	* mmo.c (mmo_canonicalize_symtab): Update.
	* nlm-target.h (nlm_canonicalize_symtab): Update.
	* nlmcode.h (nlm_canonicalize_symtab): Update.
	* i386msdos.c (msdos_canonicalize_symtab): Update.
	* hp300hpux.c (MY (canonicalize_symtab)): Update.
	* oasys.c (oasys_canonicalize_symtab): Update.
	* som.c (som_canonicalize_symtab): Update.
	* pef.c (bfd_pef_canonicalize_symtab): Update.
	* nlmcode.h (nlm_canonicalize_symtab): Update.
	* xsym.c (bfd_sym_canonicalize_symtab): Update.
	* vms.c (vms_canonicalize_symtab): Update.
	* versados.c (versados_canonicalize_symtab): Update.
	* mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
	* ieee.c (ieee_canonicalize_symtab): Update.
	* pdp11.c (NAME(aout,canonicalize_symtab)): Update.
	* reloc.c: Update comment.
	* libaout.h (NAME(aout,canonicalize_symtab)): Update.
	* coff64-rs6000.c (aix5coff64_vec): Update.
	* coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
	* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
	* aoutx.h (NAME(aout,canonicalize_symtab)): Update.
	* elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
	* hp300hpux.c (MY_canonicalize_symtab): Update.
	* ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
	* aout-tic30.c (MY_canonicalize_symtab): Update.
	* aout-target.h (MY_canonicalize_symtab): Update.
	* ppcboot.c (ppcboot_canonicalize_symtab): Update.
	* elf.c (_bfd_elf_canonicalize_symtab): Update.
	* elfcode.h (elf_canonicalize_symtab): Update.
	* ihex.c (ihex_canonicalize_symtab): Update.
	* tekhex.c (tekhex_canonicalize_symtab): Update.
	* binary.c (binary_canonicalize_symtab): Update.
	* srec.c (srec_canonicalize_symtab): Update.
2003-10-16 04:11:10 +00:00
Nick Clifton afa105f875 Include bfd_elf64_sparc_vec if BFD64 is enabled. 2003-10-08 13:50:23 +00:00
Alan Modra 9c5bfbb7fd * elfxx-target.h: Remove PTR cast.
* targets.c (bfd_target): Make backend_data const void *.
	* elf-bfd.h: Constify all occurrences of struct elf_backend_data.
	* elf-m10300.c: Likewise.
	* elf.c: Likewise.
	* elf32-hppa.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-m68hc1x.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-sh64.c: Likewise.
	* elf32-sparc.c: Likewise.
	* elf32-xtensa.c: Likewise.
	* elf64-mips.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-s390.c: Likewise.
	* elf64-sh64.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elfcode.h: Likewise.
	* elfcore.h: Likewise.
	* elflink.c: Likewise.
	* elflink.h: Likewise.
	* elfxx-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	* elfxx-mips.h: Likewise.
	* elf.c (prep_headers): Remove useless check for null backend_data.
	* bfd-in2.h: Regenerate.
2003-08-07 08:38:11 +00:00
Richard Henderson 02e6ad56bf * config.bfd, configure.host, configure.in: Remove ia64-aix support.
* elfxx-ia64.c, targets.c: Likewise.
2003-07-16 22:48:59 +00:00
Alexandre Oliva 73c3cd1c3d 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
* elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
(ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2001-06-02  Nick Clifton  <nickc@cambridge.redhat.com>
* elf32-am33lin.c: Rename global functions.
2001-05-09  Alexandre Oliva  <aoliva@redhat.com>
* config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
* configure.in (bfd_elf32_am33lin_vec): Added.
* Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
(elf32-am33lin.lo): List dependencies.
* aclocal.m4, configure, Makefile.in: Rebuilt.
* elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
ELF_ARCH was not defined before.
(elf_symbol_leading_char): Define if not defined.
* elf32-am33lin.c: Override the definitions above.
* targets.c (bfd_elf32_am33lin_vec): New.
2003-07-10 04:44:37 +00:00
Alan Modra c58b95236c Convert to C90 and a few tweaks. 2003-06-29 10:06:40 +00:00
Nick Clifton e0001a05d2 Add Xtensa port 2003-04-01 15:50:31 +00:00
Nick Clifton ed781d5d99 Change embedded documentation to use consistent indentation and to split up
long lines.  Change informal style of description for functions lacking real
documentation.
2003-02-14 11:16:09 +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 2469cfa284 Add support for msp430. 2002-12-30 19:25:13 +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 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 e84d6fca26 * bfd.c (struct bfd_preserve): New.
(bfd_preserve_save): New function.
	(bfd_preserve_restore): Ditto.
	(bfd_preserve_finish): Ditto.
	* bfd-in2.h: Regenerate.
	* mach-o.c: Formatting.
	(bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
	(bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
	(bfd_mach_o_core_p): Ditto.
	(bfd_mach_o_scan): Pass in mdata.
	* mach-o.h (bfd_mach_o_scan): Update prototype.
	* pef.c: Formatting.
	(bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
	(bfd_pef_xlib_object_p): Ditto.
	(bfd_pef_scan): Pass in mdata.  Move version check to bfd_pef_object_p.
	* pef.h (bfd_pef_scan): Update prototype.
	* xsym.c: Formatting, K&R fixes.
	(bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
	(bfd_sym_scan): New function split out from bfd_sym_object_p.
	* xsym.h (bfd_sym_scan): Declare.
	* elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
	(elf_core_file_p): Likewise.
	* targets.c (_bfd_target_vector): Revert 2002-11-08 change.
2002-11-12 15:44:24 +00:00
Alan Modra 207b304b84 Disable sym_vec too. 2002-11-07 23:26:51 +00:00
Alan Modra 3b029f6508 * targets.c (_bfd_target_vector): Disable pef_vec and pef_xlib_vec. 2002-11-07 23:13:30 +00:00
Nick Clifton 3af9a47b1c Add support for PEF, Mach-O, xSYM 2002-11-06 13:26:29 +00:00
Alan Modra b6821651ed * Makefile.am: Remove entries for elf32-qnx.[ch].
* Makefile.in: Regenerate.
	* config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
	ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
	bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
	* configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
	bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
	and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
	bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
	* configure: Regenerate.
	* elf32-qnx.c: Remove.
	* elf32-qnx.h: Remove.
	* elf.c: Remove calls to QNX specific set_nonloadable_filepos,
	is_contained_by_filepos, and copy_private_bfd_data_p.
	* elf32-i386.c: Remove QNX extended bfd support.
	* elf32-ppc.c: Remove QNX extended bfd support.
	* elf32-sh.c: Remove QNX extended bfd support.
	* elfarm-nabi.c: Remove QNX extended bfd support.
	* targets.c: Remove qnx vectors.
	* elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
	(elf_backend_is_contained_by_filepos): Remove.
	(elf_backend_copy_private_bfd_data_p): Remove.
	* po/SRC-POTFILES.in: Regenerate.
2002-11-06 11:38:35 +00:00
Alan Modra 08f740041a * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
vectors in target_selvecs.
	(shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
	in target_selvecs.
	(sh-*-netbsdelf*): Likewise.
	* configure.in (assocvecs): New variable.  Handle assocvecs like
	selvecs.
	* configure: Regenerate.
	* format.c (bfd_check_format_matches): Store bfd_target pointers
	in matching_vector instead of target names.  Select first target
	from bfd_associated_vector that matches a list of ambiguous targets.
	* targets.c (_bfd_associated_vector): New array.
	(bfd_associated_vector): New variable.
	(_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
	* libbfd-in.h (bfd_associated_vector): Declare.
	* libbfd.h: Regenerate.
2002-11-05 01:18:56 +00:00
Alan Modra ef485c0196 * targets.c (_bfd_target_vector): Add missing qnx vectors. 2002-10-21 11:01:00 +00:00
Alan Modra b50afec9dd * targets.c (bfd_target_list): Don't return the default target twice. 2002-10-21 10:58:42 +00:00
Stephen Clarke efacd36e84 * Makefile.am: Add entries for elf32-sh64-lin.c and
elf64-sh64-lin.c. Regenerate.
* Makefile.in: Regenerate.
* config.bfd:  Change sh64eb-*-linux* and sh64-*-linux*
to use sh64 vectors rather than sh vectors.
* configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
* configure: Regenerate.
* elf32-sh64-lin.c: New file.
* elf64-sh64-lin.c: New file.
* targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2002-10-09 19:03:57 +00:00
David O'Brien 4ada7262d0 2002-09-16 Bruno Haible <bruno@clisp.org>
* elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
	by a target variant implementation.
	* elf64-alpha.c: Likewise.
	* elf32-i386-fbsd.c: New file.
	* elf64-alpha-fbsd.c: New file.
	* targets.c: Support bfd_elf32_i386_freebsd_vec and
	bfd_elf64_alpha_freebsd_vec.
	* configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
	bfd_elf64_alpha_freebsd_vec.
	* Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
	(BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
	(BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
	(elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
	* config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
	specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.

	* config/tc-i386.h (ELF_TARGET_FORMAT): New macro.
	(TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf32-i386".
	* config/tc-i386.c (i386_target_format): Likewise.
	* config/tc-alpha.h (ELF_TARGET_FORMAT): New macro.
	(TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf64-alpha".

	* emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to
	elf32-i386-freebsd.
	* emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to
	elf64-alpha-freebsd.

Approved by:  Alan Modra <amodra@bigpond.net.au>
              Message-ID: <20020715021113.GJ30362@bubble.sa.bigpond.net.au>
2002-09-17 02:24:40 +00:00
Nick Clifton 026df7c5e6 Add TMS320C4x support 2002-08-28 10:38:51 +00:00
Nick Clifton ed71e1110d Add sh-nto support 2002-08-22 17:27:20 +00:00
Nick Clifton 59bc061d4b Add QNX Neutrino PowerPC support and common up QNX functions 2002-08-09 15:38:24 +00:00
Thiemo Seufer 8a397dadf0 * Makefile.am: Add n32 ABI support.
* Makefile.in: Regenerate.
	* config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
	bit vectors for mips*-*-linux targets as optional.
	* configure.in: Add n32 ABI vectors.
	* configure: Regenerate.
	* elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
	* elfn32-mips.c: New file, n32 ABI support.
	* targets.c: Add n32 ABI vectors.
2002-07-31 00:32:10 +00:00
Nick Clifton 7e392df659 Add arm-*-nto port. 2002-07-30 17:32:30 +00:00
Nick Clifton cf88bb9f09 Add IP2k support to BFD and LD 2002-07-17 14:15:52 +00:00
Alan Modra ba26fd966c * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
	Run "make dep-am".
	* config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
	host_aout_vec.
	* configure.in (vaxbsd_vec): Add.
	* targets.c (vaxbsd_vec): Add.
	* Makefile.in: Rebuild.
	* configure: Rebuild.
	* po/SRC-POTFILES.in: Rebuild.
2002-07-01 08:31:53 +00:00
Nick Clifton 680f9d5c14 Only create a selvecs for aix5coff64_vec if 64-bit bfd support has been enabled. 2002-06-25 10:05:05 +00:00
Dave Brolley 4e5ba5b7eb 2002-06-18 Dave Brolley <brolley@redhat.com>
From Catherine Moore, Michael Meissner, Dave Brolley:
	* po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
	* targets.c: Support bfd_elf32_frv_vec.
	* reloc.c: Add FRV relocs.
	* configure.in: Add support for bfd-elf32-frv-vec.
	* config.bfd (targ_cpu): Add support for frv-*-elf.
	* archures.c: Add frv arch and machines.
	* Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
	(ALL_MACHINES_CFILES): Add cpu-frv.c.
	(BFD32_BACKENDS): Add elf32-frv.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-frv.c
	(cpu-frv.lo): New target.
	(elf32-frv.lo): New target.
	* cpu-frv.c: New file.
	* elf32-frv.c: New file.
2002-06-18 21:10:55 +00:00
Alan Modra 341ca62211 * targets.c: Sort target vecs.
(_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
	bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
	bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
	bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
	* configure.in: Sort target vecs.  Add m88kmach3_vec.
	* configure: Regenerate.
2002-06-17 02:27:38 +00:00