Commit Graph

107 Commits

Author SHA1 Message Date
Alan Modra 69263e9083 * bfd-in.h (BFD_VERSION): Remove wrong comment.
(BFD_DEFAULT_TARGET_SIZE): New.
	(BFD_ARCH_SIZE): Comment.
	* configure.in (target_size): New.  Set instead of target64 in
	selvecs case statement.  Set target64 from it.
	(bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
2001-08-17 03:54:53 +00:00
Alan Modra 3619ad0439 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
(bfd_errmsgs): Add corresponding message.
	* archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
	finding an archive that contains different format object files.
	Return bfd_error_wrong_object_format for this case.
	* format.c: Formatting fixes.  s/CONST/const/.
	(bfd_check_format_matches): Accept archives that give
	bfd_error_wrong_object_format if no full match is found.  Tidy
	code handling matching_vector.  Don't return a pointer to freed
	memory in `matching'.  Handle ambiguous matches as for partial
	archive matches.
	* bfd-in2.h: Regenerate.
2001-08-17 03:19:01 +00:00
H.J. Lu d69bb69b89 2001-08-09 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
	to ...
	* elf-bfd.h: Here.
	* bfd-in2.h: Regenerated.
2001-08-09 16:46:02 +00:00
H.J. Lu ae4221d7c2 2001-08-09 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_sprintf_vma): New prototype.
	(bfd_fprintf_vma): Likewise.
	(bfd_elf_sprintf_vma): Likewise.
	(bfd_elf_fprintf_vma): Likewise.
	(bfd_printf_vma): New. Defined with bfd_fprintf_vma.
	* bfd-in2.h: Regenerated.

	* bfd.c (bfd_sprintf_vma): New. Defined.
	(bfd_fprintf_vma): Likewise.

	* elf.c (bfd_elf_sprintf_vma): New. Defined.
	(bfd_elf_fprintf_vma): Likewise.
2001-08-09 16:00:21 +00:00
Nick Clifton 55ab10f0ee Fix formatting 2001-08-09 09:09:03 +00:00
Jim Wilson a4bd839069 sje patch for 32-bit IA-64 ELF relocs for HPUX
* reloc.c (bfd_reloc_code_type): Add IA64 relocs
	BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
	* elfxx-ia64.c (ia64_howto_table): Define how to handle
	new relocations.
	(elfNN_ia64_reloc_type_lookup): Handle new relocations.
	(elfNN_ia64_check_relocs): Likewise.
	(elfNN_ia64_install_value): Likewise.
	(elfNN_ia64_relocate_section): Likewise.
2001-07-12 01:24:14 +00:00
Hans-Peter Nilsson 99293407a5 * elflink.h (struct elf_assign_sym_version_info): Remove member
export_dynamic.  All users changed to use info member.
	NAME(bfd_elf,size_dynamic_sections)): Remove parameter
	export_dynamic, instead use member in parameter info.
	* bfd-in.h (bfd_elf32_size_dynamic_sections,
	bfd_elf64_size_dynamic_sections): Update prototype.
	* bfd-in2.h: Regenerate.
2001-06-18 22:05:10 +00:00
Nick Clifton 0f2712edc9 Add support for .uahword, .uaword and .uaxword pseudo ops 2001-05-28 09:23:54 +00:00
H.J. Lu f34d8777dd 2001-05-25 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Regenerated.
	* libcoff.h: Likewise.
2001-05-25 06:29:21 +00:00
Nick Clifton c2feb66418 Add MIPS ELF64 relocs 2001-05-23 17:36:38 +00:00
Nick Clifton d1cf510e5e Add MIPS r12k support 2001-05-23 17:26:40 +00:00
Alan Modra d1778b88f8 Add a flag to asection, linker_has_input, and use it to reliably
determine whether an input section is the first one assigned to
an output section.
2001-05-17 03:58:45 +00:00
Jakub Jelinek 8550eb6e64 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
fields, change sec into secinfo.
	(struct sec_merge_info): Add chain, remove last fields.
	(struct sec_merge_sec_info): Add next, sec, psecinfo fields.
	(sec_merge_hash_lookup): If lookup could not use a string only
	because it has bad alignment, mark the old string for deletion.
	(sec_merge_add): Add secinfo argument. Don't compute entry's
	position, instead record the section.
	(sec_merge_emit): Update for the sec into secinfo change in
	struct sec_merge_hash_entry.
	(_bfd_merge_section): Only record the section for merging, defer
	putting strings into the hash table.
	(cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
	_bfd_merge_sections): New functions.
	(_bfd_merged_section_offset): Update for the sec_merge_hash_entry
	changes.
	* libbfd-in.h (_bfd_merge_sections): Add prototype.
	(_bfd_nolink_bfd_merge_sections): Define.
	* libbfd.h: Likewise.
	(bfd_generic_merge_sections): Add prototype.
	* targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
	(struct bfd_target): Likewise.
	* bfd.c (bfd_merge_sections): Define.
	* bfd-in2.h: Rebuilt.
	* elf.c (_bfd_elf_merge_sections): New function.
	* elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
	* elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
	* reloc.c (bfd_generic_merge_sections): New function.
	* vms.c (vms_bfd_merge_sections): New function.
	* aout-adobe.c (aout_32_bfd_merge_sections): Define.
	* aout-target.h (MY_bfd_merge_sections): Define.
	* aout-tic30.c (MY_bfd_merge_sections): Define.
	* binary.c (binary_bfd_merge_sections): Define.
	* bout.c (b_out_bfd_merge_sections): Define.
	* coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
	* coffcode.c (coff_bfd_merge_sections): Define.
	* coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
	* i386msdos.c (msdos_bfd_merge_sections): Define.
	* i386os9k.c (os9k_bfd_merge_sections): Define.
	* ieee.c (ieee_bfd_merge_sections): Define.
	* ihex.c (ihex_bfd_merge_sections): Define.
	* nlm-target.h (nlm_bfd_merge_sections): Define.
	* oasys.c (oasys_bfd_merge_sections): Define.
	* ppcboot.c (ppcboot_bfd_merge_sections): Define.
	* som.c (som_bfd_merge_sections): Define.
	* srec.c (srec_bfd_merge_sections): Define.
	* tekhex.c (tekhex_bfd_merge_sections): Define.
	* versados.c (versados_bfd_merge_sections): Define.
	* xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.

	* ldlang.c (lang_process): Call bfd_merge_sections.
2001-05-11 12:23:48 +00:00
Frank Ch. Eigler d436a9b307 * externalize a function
2001-04-25  Frank Ch. Eigler  <fche@redhat.com>

	* bfd-in.h (bfd_cache_close): Declare newly exported function.
	* bfd-in2.h: Regenerated.
2001-04-25 21:08:02 +00:00
Nick Clifton b3baf5d0a8 Add OpenRISC support 2001-04-24 15:08:16 +00:00
H.J. Lu a80f694198 2001-04-14 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Regenerate.
2001-04-15 01:02:54 +00:00
Jakub Jelinek f5fa8ca231 bfd/
* libbfd-in.h (_bfd_merge_section): New.
	(_bfd_write_merged_section): New.
	(_bfd_merged_section_offset): New.
	* libbfd.h: Rebuilt.
	* linker.c (_bfd_generic_link_output_symbols): Handle
	discard_sec_merge.
	* aoutx.h (aout_link_write_symbols): Likewise.
	* pdp11.c (aout_link_write_symbols): Likewise.
	* elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
	(elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
	sections.
	(elf_link_sec_merge_syms): New.
	(elf_link_input_bfd): Call _bfd_merged_section_offset
	and _bfd_write_merged_section.
	Handle discard_sec_merge.
	* elf-bfd.h (struct elf_link_hash_table): Add merge_info
	field.
	(struct bfd_elf_section_data): Likewise.
	* elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
	SEC_STRINGS section flags and entsize from their ELF counterparts.
	(_bfd_elf_link_hash_table_init): Initialize merge_info.
	(elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
	from their BFD counterparts.
	* merge.c: New file.
	* Makefile.am: Add strtab.lo.
	* Makefile.in: Rebuilt.
include/
	* bfdlink.h (bfd_link_discard): Add discard_sec_merge.
gas/
	* config/obj-elf.c (obj_elf_change_section): Add entsize argument,
	handle SHF_MERGE and SHF_STRINGS.
	(obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS.
	(obj_elf_section): Allow additional argument specifying entity size.
	* write.c (adjust_reloc_syms): Keep relocations against local symbols
	in SEC_MERGE sections.
ld/
	* ldmain.c (main): Default to discard_sec_merge.
	* lexsup.c (OPTION_DISCARD_NONE): Define.
	(ld_options): Add --discard-none.
	(parse_args): Handle OPTION_DISCARD_NONE.
	* ldlang.c (wild_doit): SEC_MERGE should be set in the output
	section only if SEC_MERGE and SEC_STRINGS flags and entsize of
	all its input sections match.
2001-04-13 00:34:36 +00:00
Hans-Peter Nilsson 58d29fc398 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
	BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
	BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
	BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
	BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
	* bfd-in2.h, libbfd.h: Regenerate.
2001-03-22 11:17:16 +00:00
Nick Clifton 7898dedac0 Update copyright notices 2001-03-08 21:04:02 +00:00
Nick Clifton 3cac17aec8 Rest of the changes for Coldfire V4. 2001-03-06 20:15:27 +00:00
Nick Clifton e135f41bc2 Add PDP-11 support 2001-02-18 23:33:11 +00:00
Nick Clifton a85d7ed0f0 Add s390 support 2001-02-10 00:58:38 +00:00
Kazu Hirata c02e7c3eff 2001-01-25 Kazu Hirata <kazu@hxi.com>
* bfd-in2.h: Fix formatting.
	* libbfd.h: Likewise.
2001-01-25 20:17:45 +00:00
H.J. Lu 541389e202 2001-01-23 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Rebuild.
2001-01-24 04:56:29 +00:00
Kazu Hirata 3fde5a36df 2001-01-23 Kazu Hirata <kazu@hxi.com>
* aoutx.h: Fix formatting.
	* bfd.c: Likewise.
	* bfd-in2.h: Likewise.
	* bfd-in.h: Likewise.
	* cpu-i386.c: Likewise.
	* cpu-m68hc11.c: Likewise.
	* dwarf2.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* format.c: Likewise.
	* freebsd.h: Likewise.
	* hash.c: Likewise.
	* hp300hpux.c: Likewise.
	* hppabsd-core.c: Likewise.
	* hpux-core.c: Likewise.
2001-01-23 20:27:54 +00:00
Nick Clifton 0d2bcfafbf Updated ARC assembler from arccores.com 2001-01-11 21:20:20 +00:00
Nick Clifton 8c603c85a1 Add bfd_get_bits() and bfd_put_bits(). 2000-12-21 18:20:04 +00:00
Nick Clifton c6c98b3833 Add MIPS SB1 machine 2000-12-02 01:10:33 +00:00
Nick Clifton 84ea6cf2c5 Add MIPS V and MIPS 64 machine numbers 2000-12-02 00:55:22 +00:00
Nick Clifton e7af610e14 Add MIPS32 as a seperate MIPS architecture 2000-12-01 21:35:38 +00:00
Nick Clifton 8d88c4ca53 Add support for x86_64-*-linux-gnu* target 2000-11-30 19:16:54 +00:00
Kazu Hirata e60b52c622 2000-11-28 Kazu Hirata <kazu@hxi.com>
* aoutx.h: Fix formatting.
	* bfd-in.h: Likewise.
	* bfd-in2.h: Likewise.
	* cache.c: Likewise.
	* cisco-core.c: Likewise.
	* coff64-rs6000.c: Likewise.
	* coffcode.h: Likewise.
	* coffswap.h: Likewise.
	* corefile.c: Likewise.
2000-11-28 21:42:16 +00:00
Nick Clifton 077b8428ab Add ARM v5t, v5te and XScale support 2000-11-25 00:21:40 +00:00
Kazu Hirata eb6e10cb73 2000-11-20 Kazu Hirata <kazu@hxi.com>
* bfd-in.h: Fix formatting.
	* bfd-in2.h: Likewise.
	* bfd.c: Likewise.
	* bout.c: Likewise.
2000-11-21 02:24:32 +00:00
Richard Henderson 18b27f179e * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
(allocate_dynrel_entries): Likewise.
        (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
        (set_pltoff_entry): Likewise.
        (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
        (elfNN_ia64_reloc_type_lookup): Likewise.
        (elfNN_ia64_install_value): Likewise.
        (elfNN_ia64_relocate_section): Likewise.
        * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
        (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2000-11-16 22:44:07 +00:00
Kazu Hirata 8546af7422 2000-11-08 Kazu Hirata <kazu@hxi.com>
* bfd-in.h: Fix formatting.
	* bfd-in2.h: Likewise.
2000-11-08 23:57:04 +00:00
Jim Wilson bbe66d0820 ia64-hpux patches from Steve Ellcey.
* archures.c: (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32) Add defines
	to differentiate elf32 and elf64 on ia64.
	* bfd-in2.h: Regenerate.
	* config.bfd: Add target for "ia64*-*-hpux*".
	* configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
	* configure: Regenerate.
	* cpu-ia64.c (bfd_ia64_elf32_arch) Add elf32 arch info structure.
	* targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
	* Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
	from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
	* Makefile.in: Regnerate.
	* elf64-ia64.c: Deleted
	* elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2000-11-07 00:43:26 +00:00
Nick Clifton 59ff2774bb Add support for *-storm-chaos target 2000-11-02 23:03:24 +00:00
Jakub Jelinek 19f7b01094 gas/
* config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p
	instructions to loose any special insn->architecture mask.

	* config/tc-sparc.c (v9a_asr_table): Add v9b ASRs.
	(sparc_md_end, sparc_arch_types, sparc_arch,
	sparc_elf_final_processing): Handle v8plusb and v9b architectures.
	(sparc_ip): Handle siam mode operands. Support v9b ASRs (and
	request v9b architecture if they are used).

bfd/
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
	elf32_sparc_object_p, elf32_sparc_final_write_processing):
	Support v8plusb.
	* elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
	sparc64_elf_object_p): Support v9b.
	* archures.c: Declare v8plusb and v9b machines.
	* bfd-in2.h: Ditto.
	* cpu-sparc.c: Ditto.

include/opcode/
	* sparc.h (enum sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_V9B.
	Note that '3' is used for siam operand.

opcodes/
	* sparc-dis.c (v9a_asr_reg_names): Add v9b ASRs.
	(compute_arch_mask): Add v8plusb and v9b machines.
	(print_insn_sparc): siam mode decoding, accept ASRs up to 25.
	* opcodes/sparc-opc.c: Support for Cheetah instruction set.
	(prefetch_table): Add #invalidate.
2000-10-20 10:38:47 +00:00
Alan Modra 24376d1b58 Another try at correcting relocations against discarded
link-once section symbols.
2000-10-12 03:44:51 +00:00
Nick Clifton 0752970ef8 add support for embedded relocs in m68k ELF port 2000-09-15 18:52:52 +00:00
Nick Clifton 156c2f8bf7 Add support for the MIPS32 2000-09-14 01:47:38 +00:00
Alan Modra a966dba9da `template' isn't a very good name for a variable.
Who invented c++ anyway?
2000-09-06 00:22:01 +00:00
Alan Modra 1bd916895e (SEC_HAS_GOT_REF): Define new flag for asection.
(bfd_get_unique_section_name): New function.
2000-09-05 02:42:16 +00:00
Nick Clifton 7a6cc5fb0c Add .gnu.linkobce.wi. to the list of debug section names.
Update generated files
2000-09-02 20:33:48 +00:00
Alexandre Oliva 37c644f2f5 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
(sh_reloc_map): Add new relocs.
(sh_elf_check_relocs, sh_elf_link_hash_newfunc,
sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
functions.
(ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
(elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
elf_sh_plt_entry_be, elf_sh_plt_entry_le,
elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
New array constants.
(elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
New variables.
(elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
elf_sh_plt_reloc_offset): Define.
(elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
elf_sh_link_hash_table): New structs.
(sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
(sh_elf_relocate_section, sh_elf_check_relocs): Handle new
relocation types.
(elf_backend_create_dynamic_sections,
bfd_elf32_bfd_link_hash_table_create,
elf_backend_adjust_dynamic_symbol,
elf_backend_size_dynamic_sections,
elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
elf_backend_plt_readonly, elf_backend_want_plt_sym,
elf_backend_got_header_size, elf_backend_plt_header_size):
Define.
* reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
New relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
2000-09-02 02:33:26 +00:00
H.J. Lu a963dc6ade 2000-08-22 H.J. Lu <hjl@gnu.org>
* elf-bfd.h (elf_link_hash_table): Add runpath.

	* bfd-in.h (bfd_elf_get_runpath_list): New prototype.
	* bfd-in2.h: Rebuilt.

	* elf.c (_bfd_elf_link_hash_table_init): Initialize the
	"runpath" field to NULL.
	(bfd_elf_get_runpath_list): New function.

	* elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
	DT_RUNPATH entries.
2000-08-22 19:33:16 +00:00
Nick Clifton bc67d8a6e3 Restore reverted code. Fix bug in reverted code which was eliminating too
many segments.
2000-08-03 19:40:29 +00:00
H.J. Lu c0f7859bc6 2000-08-03 H.J. Lu <hjl@gnu.org>
* section.c: Back out the change made by Nick Clifton
	<nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
	binaries.
	* bfd-in2.h: Likewise.
	* elf.c: Likewise.
2000-08-03 13:50:35 +00:00
Jason Eckhardt a87fdb8d10 2000-07-31 Jason Eckhardt <jle@cygnus.com>
* reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
        * bfd-in2.h, libbfd.h: Regenerate.
2000-08-01 01:45:29 +00:00