Commit graph

2445 commits

Author SHA1 Message Date
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
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
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
Richard Sandiford
676a64f422 Add fr450 support. 2004-03-01 10:11:46 +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
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
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
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
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
Nick Clifton
aca305d96d Add support for 64bit NETBSD cores 2004-02-23 15:25:20 +00:00
Jakub Jelinek
646411fba0 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
2004-02-23 09:01:58 +00:00
H.J. Lu
1de1a3173e 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
	symbols with non-default visibility.
2004-02-21 23:05:13 +00:00
Danny Smith
3c9d0484ea * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
IMAGE_SCN_MEM_WRITE on known sections only.
2004-02-21 06:16:02 +00:00
Jakub Jelinek
a876ecf9be * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
symbols used in PIE relocs.
2004-02-20 17:36:36 +00:00
Jakub Jelinek
a8a6d7cef4 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
.plt sh_entsize.
2004-02-19 11:01:39 +00:00
Daniel Jacobowitz
d080fcd283 * configure.in: Update version to 2.15.90.
* configure: Regenerate.
2004-02-18 17:17:17 +00:00
Richard Sandiford
d25aed713b bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Use
	_bfd_elf_symbol_refs_local_p to decide whether to decay
	a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
	(_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
	relocs if the symbol wasn't defined by a regular object file.
	Don't check the symbol's dynindx.

ld/testsuite/
	* ld-mips/elf/elf-rel-xgot-{n32,n64-linux}.d: Update after 2004-02-02
	changes to the way large constants are added.
	* ld-mips/elf/elf-rel-got-{n32,n64-linux}.d: Likewise.  Adjust order
	of GOT entries after today's change to the handling of GOT_PAGE
	relocations.
2004-02-17 10:19:24 +00:00
Andrew Cagney
d7ce59e3ac 2004-02-16 Andrew Cagney <cagney@redhat.com>
* bfd-in.h (file_ptr, ufile_ptr): Configure type using
	@bfd_file_ptr@.
	* bfd-in2.h: Re-generate.
2004-02-16 18:46:40 +00:00
Andrew Cagney
ca0b76868a 2004-02-14 Andrew Cagney <cagney@redhat.com>
* configure.host (HDEFINES): When hppa*-*-hpux*, define
	_LARGEFILE64_SOURCE.
2004-02-14 15:38:20 +00:00
Andrew Cagney
340b6d9120 2004-02-13 Andrew Cagney <cagney@redhat.com>
* elf.c	(vma_page_aligned_bias): New function.
	(assign_file_positions_except_relocs)
	(assign_file_positions_for_segments): Replace broken modulo
	arithmetic with call to vma_page_aligned_bias.
2004-02-13 14:58:58 +00:00
Andrew Cagney
7c1927339f 2004-02-11 Andrew Cagney <cagney@redhat.com>
* bfd-in.h: Update copyright.
	(bfd_tell): Change return type to file_ptr.
	* bfd-in2.h: Re-generate.
	* cache.c: Update copyright.
	(bfd_cache_lookup_worker): Use real_fseek, do not cast offset
	parameter.
	(close_one): Use real_ftell.
	* bfdio.c: Update copyright.
	(real_ftell, real_fseek): New functions.
	(bfd_tell): Use real_fseek and real_ftell, change return type to
	file_ptr.
	(bfd_seek): Use real_ftell and real_fseek, change type of
	file_position to a file_ptr.
	* libbfd-in.h: Update copyright.
	(real_ftell, real_fseek): Declare.
	* libbfd.h: Re-generate.
2004-02-11 23:23:20 +00:00
Andrew Cagney
c1ea0c0914 * config.in: Re-generate. 2004-02-11 22:05:35 +00:00
Andrew Cagney
1012372a47 2004-02-11 Andrew Cagney <cagney@redhat.com>
* configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
	fseeko and fseeko64.  Determine bfd_file_ptr.
	* configure: Re-generate.
2004-02-11 22:01:00 +00:00
Nick Clifton
3255318a04 Add support for relaxing the 32bit ldc/stc instructions. 2004-02-09 12:15:57 +00:00
Nick Clifton
0d5f99947b Catch GOT offsets for a symbol which have no associated GOT subsection. 2004-02-09 10:30:13 +00:00
Richard Sandiford
174fd7f955 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
* elf.c (swap_out_syms): Use it to decide whether local section
	symbols should be named.
	* elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
	* elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
	(elf_backend_name_local_section_symbols): Define.
	* elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
2004-02-09 08:04:00 +00:00
H.J. Lu
03609792ae 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
	(elfNN_ia64_relax_section): Optimize brl to br during the relax
	finalize pass.
2004-01-30 23:13:28 +00:00
Alexandre Oliva
ea01195e38 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
to bfd_link_hash_entry passed by reference to
_bfd_generic_link_add_one_symbol.
2004-01-30 21:11:37 +00:00
H.J. Lu
838e70c548 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
	relocations against dynamic symbols.
2004-01-26 20:32:08 +00:00
Daniel Jacobowitz
4f199be3eb * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
change.
2004-01-23 16:51:48 +00:00
Nick Clifton
28d39d1a3a Stop indexed move byte instructions from being relaxed. 2004-01-21 11:17:53 +00:00
Danny Smith
66bed356fc * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
	flag has been cleared.
2004-01-20 21:04:19 +00:00
Kazu Hirata
7e89635aac * coff-h8300.c: Add and adjust comments about relaxation.
* elf32-h8300.c: Likewise.
2004-01-19 17:02:45 +00:00
Kazu Hirata
e804e83606 * coff-h8300.c: Fix comment typos.
* elf32-h8300.c: Likewise.
2004-01-16 23:50:20 +00:00
Kazu Hirata
630a7b0ab7 * coff-h8300.c: Add comments about relaxation.
* elf32-h8300.c: Likewise.
2004-01-16 23:35:49 +00:00
Maciej W. Rozycki
f8b7303064 * gettext.m4: Quote names of macros to be defined by AC_DEFUN
throughout.

* acinclude.m4: Quote names of macros to be defined by AC_DEFUN
throughout.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2004-01-14 13:41:37 +00:00
Ian Lance Taylor
32159579f0 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
mips_elf64_rtype_to_howto instead of using howto_table.

	* gas/mips/mips16-64.d: New test.
	* gas/mips/mips.exp: Run it.
2004-01-14 03:06:02 +00:00
Daniel Jacobowitz
c84cd8eead * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
the .plt section.
	(elf32_arm_check_relocs): Don't increment the PLT refcount for
	relocs which would not use the PLT.
2004-01-13 21:09:34 +00:00
Alan Modra
680a337845 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
(ppc64_elf_gc_sweep_hook): Likewise.
	(ppc64_elf_size_dynamic_sections): Test for .plt directly.
2004-01-13 00:31:07 +00:00
Nick Clifton
faca21e56e oops - add changeog entry for previous delta 2004-01-12 15:04:05 +00:00
Alan Modra
818a27acd6 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes. 2004-01-12 05:34:16 +00:00
Kazu Hirata
96ef141947 * elf32-h8300.c: Fix formatting. 2004-01-11 08:05:10 +00:00
Kazu Hirata
babfd660dd * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
dynamic object is present.  Declare r_symndx and h in an inner
	scope.
	* elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2004-01-11 07:40:24 +00:00
Daniel Jacobowitz
7359ea6525 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
(elf32_arm_copy_indirect_symbol): Don't copy pc_count.
	(elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
	identically.  Do not emit PC24 relocations for shared libraries.
	(elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
	identically.  Don't adjust pc_count.
	(elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
	Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
	adjust count for branch relocations.
	(allocate_dynrelocs): Correct typo in call to
	WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
	PC24 or PLT32 relocs when linking.
2004-01-09 16:53:45 +00:00