Commit Graph

3464 Commits

Author SHA1 Message Date
Nathan Sidwell d13d89fafa * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
logic for null_input_bfd detection.
2004-03-17 12:27:05 +00:00
Alan Modra 9183ed4b1b Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*. 2004-03-17 00:46:25 +00:00
Alan Modra 66e7d8ca91 daily update 2004-03-16 23:00:07 +00:00
Mark Kettenis 021d7868d0 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
code.
2004-03-16 12:22:18 +00:00
Alan Modra 051d5130f3 copyright date. 2004-03-16 10:31:18 +00:00
Alan Modra 51992aec7a * elflink.c (elf_link_read_relocs_from_section): Don't use
NUM_SHDR_ENTRIES in end of reloc calc.  Move NULL shdr check..
	(_bfd_elf_link_read_relocs): ..to here.
	* elf32-ppc.c (ppc_elf_relax_section): Formatting.
2004-03-16 10:29:12 +00:00
Alan Modra ccba357f63 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
values selected in configure.host.  Require both to be defined
	before setting BFD_HOST_64_BIT_DEFINED.  Protect assignment to
	corresponding BFD_HOST vars with quotes.
	<${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
	Always require BFD_HOST_64_BIT_DEFINED.
	<file_ptr type>: Find off_t size before emitting message.  Combine
	off_t and ftello64 conditional.
	* configure: Regenerate.
2004-03-16 09:05:22 +00:00
Alan Modra 419783084d * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
aliasing warning.  Remove trailing whitespace throughout file.
2004-03-16 01:49:30 +00:00
Alan Modra 17b3eb0e44 daily update 2004-03-15 23:00:05 +00:00
Dave Anglin d63b5ed92a * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
input_section in calls to get_dyn_name.
	* elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *".	Use section id of first section in input BFD to build dynamic name for
	local symbols.
	(elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
2004-03-15 17:53:45 +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
Alan Modra c1b954e2d7 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
selected.
2004-03-15 00:02:56 +00:00
Alan Modra 2fbc322a92 daily update 2004-03-14 23:00:05 +00:00
Alan Modra 7a4c866389 daily update 2004-03-13 23:00:35 +00:00
Mark Kettenis 85cfd8d379 * config.bfd: Add x86_64-*-openbsd*.
* configure.in (x86_64-*-openbsd*): Set COREFILE to
netbsd-core.lo.
* configure: Regenerate.
2004-03-13 12:33:48 +00:00
Alan Modra b9dab629a2 daily update 2004-03-12 23:00:04 +00:00
Nick Clifton d1f161ea0a Ignore data-only sections when checking interworking status 2004-03-12 11:57:05 +00:00
Alan Modra 72f77c86f3 daily update 2004-03-11 23:00:05 +00:00
Alan Modra c08930e821 daily update 2004-03-10 23:00:05 +00:00
Alan Modra 47dbbcec98 daily update 2004-03-09 23:00:16 +00:00
Jim Wilson 8b6f268359 Patch from Steve Ellcey for potential race condition.
* elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
2004-03-09 20:50:56 +00:00
Alan Modra 22713fee95 daily update 2004-03-08 23:00:05 +00:00
Alan Modra 0403751b79 daily update 2004-03-07 23:00:05 +00:00
Alan Modra 68a9cfde2e daily update 2004-03-06 23:00:05 +00:00
Fred Fish 79cda7cfd9 Reviewed and approved by Alan Modra <amodra@bigpond.net.au>
2004-03-05  Fred Fish  <fnf@redhat.com>
	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
	mips16 symbols to be even rather than testing first for even/odd.
	(_bfd_mips_elf_link_output_symbol_hook): Ditto.
2004-03-05 23:50:54 +00:00
Nathan Sidwell e5caec89a0 * elf.c (map_sections_to_segments): Ignore .tbss sections for
layout purposes.

	* ldlang.c (lang_add_section): Don't force SEC_LOAD on
	SEC_THREAD_LOCAL.
	(IGNORE_SECTION): Ignore .tbss sections too.
	(lang_size_sections_1): .tbss sections do not advance dot.

	* ld-scripts/size.exp: New.
	* ld-scripts/size-[12].{d,s,t}: New.
2004-03-05 11:26:05 +00:00
Alan Modra 8ed4850611 daily update 2004-03-04 23:00:04 +00:00
Alan Modra 8480666147 daily update 2004-03-03 23:00:05 +00:00
Alexandre Oliva 02bb6eae73 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
undefined symbols as hash_new.
2004-03-03 21:31:10 +00:00
Joern Rennecke ae51a426eb 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
opcodes:
	* sh-dis.c (print_insn_sh): Don't disassemble fp instructions in
	nofpu mode.  Add BFD type bfd_mach_sh4_nommu_nofpu.
	* sh-opc.h: Add sh4_nommu_nofpu architecture and adjust instructions
	accordingly.
bfd:
	* archures.c: Add bfd_mach_sh4_nommu_nofpu.
	* cpu-sh.c: Ditto.
	* elf32-sh.c: Ditto.
	* bfd-in2.h: Regenerate.
include/elf:
	* sh.h: Add EF_SH4_NOMMU_NOFPU.
gas:
	* config/tc-sh.c (md_parse_option): Add -isa=sh4-nofpu and
	-isa=sh4-nommu-nofpu options. Adjust help messages accordingly.
	(sh_elf_final_processing): Output BFD type sh4_nofpu if that is
	the most general type or the user specifically requested it.
	(md_assemble): Add a new error message for when an instruction
	is understood, but is not allowed due to an -isa option.
2004-03-03 18:01:49 +00:00
Alexandre Oliva 3b712a1afc * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
dynrelocs.
(_frv_count_got_plt_entries): Initialize them.
(frv_pic_relocs_info_find): Add insert argument.  Adjust all
callers.
(frv_pic_relocs_info_for_global): Likewise.
(frv_pic_relocs_info_for_local): Likewise.
(frv_pic_merge_early_relocs_info): New.
(_frv_resolve_final_relocs_info): Use it in case one entry maps to
another.
(_frv_add_dyn_reloc): Add entry argument.  Adjust all callers.
Check that we don't exceed the allocated count for entry.
(_frv_add_rofixup): Likewise.
(_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
(elf32_frv_finish_dynamic_sections): Improve error message in case
we emit too few rofixup entries.
2004-03-02 23:01:18 +00:00
Alan Modra abc523ed9f daily update 2004-03-02 23:00:05 +00:00
Alan Modra 1b427280cd daily update 2004-03-01 23:00:06 +00:00
Richard Sandiford 676a64f422 Add fr450 support. 2004-03-01 10:11:46 +00:00
Alan Modra 2d9a3a9b5d daily update 2004-02-29 23:00:21 +00:00
H.J. Lu 0ad989f9fd 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.

	* elflink.h (is_global_data_symbol_definition): Moved to
	elflink.c.
	(elf_link_is_defined_archive_symbol): Likewise.
	(elf_link_add_archive_symbols): Likewise. Renamed to
	_bfd_elf_link_add_archive_symbols.

	* elflink.c (elf_link_is_defined_archive_symbol): Get the size
	of ELF symbol table entry from backend.
	(_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
	instead of elf_link_add_object_symbols.
2004-02-29 06:11:52 +00:00
Alan Modra 75fba9fba7 daily update 2004-02-28 23:00:05 +00:00
Alexandre Oliva ec3391e704 * elf-bfd.h (struct elf_backend_data): Added
elf_backend_can_make_relative_eh_frame,
elf_backend_can_make_lsda_relative_eh_frame and
elf_backend_encode_eh_address.
(_bfd_elf_encode_eh_address): Declare.
(_bfd_elf_can_make_relative): Declare.
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
hooks to decide whether to attempt to make_relative and
make_lsda_relative.
(_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
(_bfd_elf_can_make_relative): New.
(_bfd_elf_encode_eh_address): New.
* elf32-frv.c (frv_elf_use_relative_eh_frame): New.
(frv_elf_encode_eh_address): New.
(elf_backend_can_make_relative_eh_frame): Define.
(elf_backend_can_make_lsda_relative_eh_frame): Define.
(elf_backend_encode_eh_address): Define.
* elfxx-target.h
(elf_backend_can_make_relative_eh_frame): Define.
(elf_backend_can_make_lsda_relative_eh_frame): Define.
(elf_backend_encode_eh_address): Define.
(elfNN_bed): Add them.
2004-02-28 00:35:45 +00:00
Alexandre Oliva e6deed0a00 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
complain_on_overflow to signed.
2004-02-28 00:33:33 +00:00
Alan Modra 8c9c8ebf32 daily update 2004-02-27 23:00:04 +00:00
H.J. Lu b60d7a1a49 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
* elflink.h (sort_symbol): New.
	(elf_link_add_object_symbols): Use a sorted symbol array for
	weakdef.
2004-02-27 17:02:48 +00:00
Martin Schwidefsky 1c3ff0f2a5 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
for pc relative relocs.
	(elf_s390_relocate_section): Likewise.
	* elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
	for pc relative relocs.
	(elf_s390_relocate_section): Likewise.
2004-02-27 10:03:05 +00:00
Alan Modra 9faa1d7f04 daily update 2004-02-26 23:00:05 +00:00
H.J. Lu de9811afe2 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
	count_dyn_reloc.
2004-02-26 17:45:19 +00:00
H.J. Lu ac33696c68 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
	field to track if a relocation is against readonly section.
	(count_dyn_reloc): Take a new argument for rent->reltext.
	(elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
	(get_reloc_section): Don't set ia64_info->reltext here.
	(allocate_dynrel_entries): Set ia64_info->reltext here.
2004-02-26 03:54:06 +00:00
Alan Modra b8453b0a24 daily update 2004-02-25 23:00:05 +00:00
Alan Modra 6af50bd7b3 daily update 2004-02-24 23:00:06 +00:00
Alexandre Oliva 072c89031a * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
(_frv_emit_got_relocs_plt_entries): Decay relocation to protected
function's descriptor to symbol+offset, and map local undefweak
symbol to NULL function descriptor.
(elf32_frv_relocate_section): Likewise.
2004-02-24 16:39:01 +00:00
Alan Modra 4cb3503a21 daily update 2004-02-23 23:00:05 +00:00