Commit Graph

4387 Commits

Author SHA1 Message Date
Alan Modra 0c10aee68f daily update 2005-02-27 23:00:05 +00:00
Alan Modra b413488773 daily update 2005-02-26 23:00:07 +00:00
Alan Modra 6efe8f6c8a daily update 2005-02-25 23:00:06 +00:00
Alan Modra 3d3cf61741 daily update 2005-02-24 23:00:05 +00:00
Ben Elliston 10adf131a5 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
* format.c (bfd_check_format_matches): Likewise.
	* archive.c (BFD_GNU960_ARMAG): Likewise.
	(bfd_generic_archive_p): Likewise.
	(_bfd_write_archive_contents): Likewise.
2005-02-24 20:16:56 +00:00
H.J. Lu 60b779bff6 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
* configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
	* configure: Regenerate.
2005-02-24 15:49:46 +00:00
Julian Brown 1f02cbd9ee * elflink.c (elf_link_add_object_symbols): Force symbols in
discarded COMDAT group sections to have default visibility.
2005-02-24 15:28:56 +00:00
Alan Modra f60ca5e351 * coffcode.h (coff_print_aux): Warning fix.
* elf-m10300.c (mn10300_elf_relax_section): Use section->id
	instead of section pointer to identify.
	* coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
	the correct size buffer for local sym mangling too.
	(h8300_bfd_link_add_symbols): Likewise.
	* elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
	warning.
	* elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
	* elf32-xtensa.c (literal_value_hash): Warning fix.
	* versados.c (process_otr): Warning fix.
	(versados_canonicalize_reloc): Likewise.
	* vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
	* vms.c (fill_section_ptr): Warning fix.
2005-02-24 13:34:38 +00:00
Alan Modra 949caf8935 daily update 2005-02-23 23:00:06 +00:00
H.J. Lu 9a5d8e72e5 2005-02-22 H.J. Lu <hongjiu.lu@intel.com>
* coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
	* coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2005-02-23 16:22:15 +00:00
Nick Clifton abc0f8d0f2 Initialise bitfield. 2005-02-23 11:39:14 +00:00
Nick Clifton 9b69b847da (elf32_m68hc11_relocate_section): Initialise variables that are passed by
reference to m68hc11_get_relocation_value in case that function does not
initialise them.
2005-02-23 11:18:11 +00:00
Nick Clifton 90e868acaf (cr16c_elf_final_link_relocate): Remove duplicated return statements and
replace with a single return at the end of the function.  This helps pacify
the flow analysis code in gcc 4.0.
2005-02-23 09:56:44 +00:00
Nick Clifton 4b6c0f2fe9 (_bfd_elf_compute_section_file_positions): Initialise strtab to avoid compile
time warning.
2005-02-23 09:46:49 +00:00
Ben Elliston c3e8c140a3 * opncls.c (bfd_zalloc): Document this function. 2005-02-23 03:49:41 +00:00
Alan Modra 9f36411e5c daily update 2005-02-22 23:00:07 +00:00
H.J. Lu ebe372c1dd bfd/
2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
	SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
	Replace SEC_SHARED with SEC_COFF_SHARED.
	(styp_to_sec_flags): Likewise.

	* elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
	(TARGET_LITTLE_SYM): Likewise.

	* section.c (SEC_ARCH_BIT_0): Removed.
	(SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
	SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
	(SEC_SHARED): Renamed to ...
	(SEC_COFF_SHARED): This.
	(SEC_BLOCK): Renamed to ...
	(SEC_TIC54X_BLOCK): This.
	(SEC_CLINK): Renamed to ...
	(SEC_TIC54X_CLINK): This.
	(SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
	SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
	end.
	* bfd-in2.h: Regenerated.

binutils/

2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* objcopy.c (parse_flags): Replace SEC_SHARED with
	SEC_COFF_SHARED.

	* objdump.c (dump_section_header): Dump SEC_TIC54X_BLOCK and
	SEC_TIC54X_CLINK for TI c54x only. Remove SEC_ARCH_BIT_0. Dump
	SEC_COFF_SHARED for COFF only.

gas/

2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* config/obj-coff.c (obj_coff_section): Replace SEC_SHARED with
	SEC_COFF_SHARED.

	* config/tc-tic54x.c (tic54x_bss): Replace SEC_BLOCK with
	SEC_TIC54X_BLOCK.
	(demand_empty_rest_of_line): Likewise.
	(tic54x_sblock): Likewise.
	(tic54x_clink): Replace with SEC_CLINK with SEC_TIC54X_CLINK.

ld/

2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI
	tic54x input only.
	(lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF
	and ECOFF output only.
2005-02-22 00:50:07 +00:00
Alan Modra 954e66ebf4 daily update 2005-02-21 23:00:05 +00:00
Fred Fish 26bf4e3302 Approved by nickc@redhat.com:
2005-02-21  Fred Fish  <fnf@specifixinc.com>
	* dwarf2.c (find_abstract_instance_name): Call recursively
	to handle a DW_AT_specification.
2005-02-21 18:00:17 +00:00
Thiemo Seufer e6daada38b * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
mips_elf_create_dynamic_relocation,
	_bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
	Remove #if 0'd code.
2005-02-21 13:57:56 +00:00
Alan Modra d25604af9f bfd/
* Makefile.am: Run "make dep-am"
	* Makefile.in: Regenerate.
bfd/doc/
	* Makefile.in: Regenerate.
2005-02-21 11:48:00 +00:00
Alan Modra fedf8d51e0 * coffgen.c (bfd_coff_get_comdat_section): Check that
coff_section_data isn't NULL.
2005-02-21 11:21:29 +00:00
Alan Modra 9307c394da daily update 2005-02-20 23:00:06 +00:00
Alan Modra f075ee0c61 include/
* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
	* xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
	(xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
include/coff/
	* xcoff.h (struct xcoff_loader_info): Warning fix.
bfd/
	* bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
	* coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
	* coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
	useless assignments.
	(xcoff_write_archive_contents_big): Likewise.
	(_bfd_xcoff_put_ldsymbol_name): Likewise.
	* coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
	* coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
	* cofflink.c (process_embedded_commands): Warning fixes.
	* cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
	Warning fixes.
	* dwarf2.c: Warning fixes.
	* elf-bfd.h: Likewise.
	* elf-eh-frame.c: Likewise.
	* elf-strtab.c: Likewise.
	* elf.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-sh-symbian.c: Likewise.
	* elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
	* elf64-sh64.c: Likewise.
	* peicode.h: Likewise.
	* elf64-mmix.c: Warning fixes.
	* elfcode.h: Likewise.
	* elfxx-mips.c: Likewise.
	* libbfd-in.h: Likewise.
	* libbfd.c: Likewise.
	* mach-o.c: Likewise.
	* merge.c: Likewise.
	* mmo.c: Likewise.
	* opncls.c: Likewise.
	* pef.c: Likewise.
	* srec.c: Likewise.
	* vms-hdr.c: Likewise.
	* vms-tir.c: Likewise.
	* xtensa-isa.c: Likewise.
	* xtensa-modules.c: Likewise.
	* xsym.c: Likewise.
	(pstrcmp): Use correct choice of string lengths.  Fix return value.
	(bfd_sym_module_name): Correct string length.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
2005-02-20 14:59:07 +00:00
Alan Modra 7cfe54cc1b daily update 2005-02-19 23:00:06 +00:00
Alan Modra 0fdc72dad8 daily update 2005-02-18 23:00:07 +00:00
Alan Modra 59a63098f2 daily update 2005-02-17 23:00:05 +00:00
Alexandre Oliva 68320ddb7e bfd/ChangeLog:
* elf32-frv.c (elf32_frv_relocate_section): Remove warning from
uninitialized check_segment[1] in TLSMOFF case.
Reported by Alan Modra.
(elf32_frv_relocate_section): Improve errors and warnings.
ld/testsuite/ChangeLog:
* ld-frv/fdpic-static-6.d: Update.
* ld-frv/fdpic*.d: Remove explicit -mfdpic from #as.  Update
spelling of errors and warnings.
2005-02-17 17:11:01 +00:00
Alan Modra 1808e34136 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning. 2005-02-17 12:39:17 +00:00
Alan Modra cb82f0b5ba daily update 2005-02-16 23:00:06 +00:00
Alan Modra 7e3102a710 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
bfd_mach_o_scan_start_address.
	* elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
	* elfxx-mips.c: Remove unnecessary prototypes.
	(sort_dynamic_relocs_64): Abort if not BFD64.
2005-02-16 04:45:23 +00:00
Alan Modra 5ff625e975 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
* elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
	* pef.c (bfd_pef_scan): Don't ignore return value of
	bfd_pef_scan_start_address.
2005-02-16 02:38:53 +00:00
Alan Modra 92b7a70fca bfd/
* elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
	Skip toc reloc adjust if reloc_count is zero.
ld/
	* emultempl/ppc64elf.em (ppc_create_output_section_statements): Make
	an error creating fake bfd fatal.
	(ppc_before_allocation): Continue on after errors.
	(gld${EMULATION_NAME}_finish): Likewise.
2005-02-16 02:20:13 +00:00
Alan Modra 931a3d91ab daily update 2005-02-15 23:00:06 +00:00
Maciej W. Rozycki d6f1659387 bfd/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
	reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
	R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
	(elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
	(elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
	dst_mask.
	(mips16_gprel_reloc): Remove bit shuffling; call
	_bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
	and _bfd_mips16_elf_reloc_shuffle() instead.
	(mips16_reloc_map): New reloc map for MIPS16 relocs.
	(bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
	relocs.
	(mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
	elf_mips16_howto_table_rel.
	* elf64-mips.c (mips16_elf64_howto_table_rel): New array for
	MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
	relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
	(elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
	(elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
	dst_mask.
	(mips16_elf64_howto_table_rela): New array for MIPS16 RELA
	reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
	R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
	placeholders.
	(mips16_gprel_reloc): Remove bit shuffling; call
	_bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
	and _bfd_mips16_elf_reloc_shuffle() instead.
	(mips16_reloc_map): New reloc map for MIPS16 relocs.
	(bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
	relocs.
	(mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
	mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
	* elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
	REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
	R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
	(elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
	(elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
	dst_mask.
	(mips16_gprel_reloc): Remove bit shuffling; call
	_bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
	and _bfd_mips16_elf_reloc_shuffle() instead.
	(mips16_reloc_map): New reloc map for MIPS16 relocs.
	(bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
	relocs.
	(mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
	elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
	* elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
	handle bit shuffling for MIPS16 relocs.
	(_bfd_mips16_elf_reloc_shuffle): Likewise.
	(_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
	and _bfd_mips16_elf_reloc_shuffle().
	(_bfd_mips_elf_generic_reloc): Likewise.
	(mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
	and R_MIPS16_LO16.
	(mips_elf_obtain_contents): Remove bit shuffling.
	(mips_elf_perform_relocation): Likewise; call
	_bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
	instead.
	(_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
	and R_MIPS16_LO16.
	* elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
	(_bfd_mips16_elf_reloc_shuffle): Likewise.
	* reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
	(BFD_RELOC_MIPS16_HI16_S): Likewise.
	(BFD_RELOC_MIPS16_LO16): Likewise.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

gas/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* config/tc-mips.c (reloc_needs_lo_p): Handle
	BFD_RELOC_MIPS16_HI16_S.
	(fixup_has_matching_lo_p): Handle BFD_RELOC_MIPS16_LO16.
	(append_insn): Add BFD_RELOC_MIPS16_GPREL, BFD_RELOC_MIPS16_HI16_S
	and BFD_RELOC_MIPS16_LO16 to relocs to suppress overflow
	complaints on.
	(mips16_ip): Resolve BFD_RELOC_MIPS16_HI16_S,
	BFD_RELOC_MIPS16_HI16 and BFD_RELOC_MIPS16_LO16 for constants.
	Call my_getSmallExpression() to parse percent operators.
	(percent_op_match, mips_percent_op): Separate definitions.
	(mips16_percent_op): Define percent operators for the MIPS16 mode.
	(parse_relocation): Handle the MIPS16 mode using
	mips16_percent_op.
	(md_apply_fix3): Handle BFD_RELOC_MIPS16_HI16,
	BFD_RELOC_MIPS16_HI16_S and BFD_RELOC_MIPS16_LO16.

gas/testsuite/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* gas/mips/mips16-hilo.d: New test for the R_MIPS16_HI16 and
	R_MIPS16_LO16 relocs.
	* gas/mips/mips16-hilo-n32.d: Likewise, for the n32 ABI.
	* gas/mips/mips16-hilo.s: Source for the new tests.
	* gas/mips/mips.exp: Run the new tests.

include/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* elf/mips.h (R_MIPS16_GOT16): New reloc code.
	(R_MIPS16_CALL16): Likewise.
	(R_MIPS16_HI16): Likewise.
	(R_MIPS16_LO16): Likewise.
	(R_MIPS16_min): New fake reloc code.
	(R_MIPS16_max): Likewise.

ld/testsuite/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* ld-mips-elf/mips16-hilo.d: New test for the R_MIPS16_HI16 and
	R_MIPS16_LO16 relocs.
	* ld-mips-elf/mips16-hilo-n32.d: Likewise, for the n32 ABI.
	* ld-mips-elf/mips16-hilo.s: Auxiliary source for the new tests.
	* ld-mips-elf/mips-elf.exp: Run the new tests.
2005-02-15 19:57:54 +00:00
Jan Beulich 0ca3e4557f bfd/
2005-02-15  Jan Beulich  <jbeulich@novell.com>

	* elfxx-ia64.c (ia64_howto_table): Correct strings for
	R_IA64_DTPMOD64[LM]SB.

gas/
2005-02-15  Jan Beulich  <jbeulich@novell.com>

	* config/tc-ia64.c (ia64_gen_real_reloc_type): Define and initialize
	new variables type, suffix, and width. Handle
	BFD_RELOC_IA64_DIR(32|64)[LM]SB in FUNC_LT_FPTR_RELATIVE case.
	Handle BFD_RELOC_IA64_DIR64[LM]SB in FUNC_TP_RELATIVE case. Add
	FUNC_DTP_MODULE case. Handle BFD_RELOC_IA64_DIR32[LM]SB in
	FUNC_DTP_RELATIVE case. Return incoming relocation type if
	BFD_RELOC_IA64_IPLT[LM]SB in FUNC_IPLT_RELOC case. Generate warning
	if unable to translate relocation type, using the new variables.

gas/testsuite/
2005-02-15  Jan Beulich  <jbeulich@novell.com>

	* gas/ia64/reloc.[ds]: New.
	* gas/ia64/reloc-bad.[ls]: New.
	* gas/ia64/ia64.exp: Run new tests.
2005-02-15 07:37:11 +00:00
H.J. Lu c5509b9207 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
	backward branch in the same section.
	(elfNN_ia64_relocate_section): Inform users that the input
	section is too big to relax br instruction when overflow
	happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
	and R_IA64_PCREL21F.
2005-02-15 01:54:58 +00:00
Alan Modra cfe3fa01fc daily update 2005-02-14 23:00:06 +00:00
Nick Clifton 5cba516c96 (elf_core_file_p): Move the call to elf_backend_object_p to allow the correct
machine to be set before processing the program headers.
2005-02-14 16:17:04 +00:00
Nick Clifton b59a68e117 oops - omitted form previous delta 2005-02-14 11:40:18 +00:00
Nick Clifton 5c9c6a54a4 PR binutils/716
* peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address aware flag
from the input bfd to the output bfd.
2005-02-14 11:20:37 +00:00
Alan Modra b4fcd1cf10 daily update 2005-02-13 23:00:07 +00:00
Maciej W. Rozycki 05e24d226c * Makefile.am: Use CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD for
building chew.
* Makefile.in: Regenerate.
2005-02-13 21:39:47 +00:00
Alan Modra 55aa3d8e1b daily update 2005-02-12 23:00:06 +00:00
Alan Modra 0e68218d25 daily update 2005-02-11 23:00:06 +00:00
Maciej W. Rozycki 254f0426b5 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
R_MIPS_LITERAL relocations for external symbols.
* elf64-mips.c (mips_elf64_literal_reloc): Likewise.
* elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2005-02-11 22:29:10 +00:00
H.J. Lu e91cdea724 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
* bfd-in2.h: Rebuilt.
2005-02-11 17:33:16 +00:00
Nick Clifton 169a6afd81 (bfd_sym_parse_contained_variables_table_entry_v32): Avoid call to memcpy with
a size of 0.
2005-02-11 17:22:47 +00:00
Nick Clifton d5b2f13be7 (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC to protect the declaration of this array. 2005-02-11 17:18:41 +00:00
Nick Clifton 6c408f53b0 (iq2000_reloc_map): Remove unused structure and array. 2005-02-11 17:15:32 +00:00
Nick Clifton 596c83ecf6 (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused structure and macro. 2005-02-11 17:13:02 +00:00
Nick Clifton cb7a88a4dd (coff_std_swap_table): Add an unused attribute in case it is not used. 2005-02-11 17:10:07 +00:00
Nick Clifton 3e25964f9b (coff_rtype_to_howto): Move definition before inclusion of coffcode.h so that
it is actually picked up.
2005-02-11 17:06:17 +00:00
Paul Brook 6768797874 2005-02-11 Paul Brook <paul@codesourcery.com>
* elf-bfd.h (struct elf_link_hash_table): Add
	is_relocatable_executable.
	* elf.c (_bfd_elf_link_hash_table_init): Initialize it.
	* elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
	symbols in relocatable executables.
	(bfd_elf_record_link_assignment): Create dynamic section symbols in
	relocatable executables.
	(_bfd_elf_link_renumber_dynsyms): Ditto.
	(bfd_elf_final_link): Ditto.
	* elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
	relocations into relocatable executables.
	(elf32_arm_check_relocs): Crate dynamic sections for relocatable
	executables.  Also copy absolute relocations.
	(elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
	in relocatable executables.
	(allocate_dynrelocs): Copy relocations for relocatable executables.
	Output dynamic symbols for symbols defined in linker scripts.
2005-02-11 16:41:09 +00:00
Nick Clifton 4b74b98302 Fix compile time warning by using an unsigned type. 2005-02-11 15:59:51 +00:00
Nick Clifton ca724bf2da Remove redundant test in BFD_ASSERT 2005-02-11 15:57:10 +00:00
Alan Modra 2917689a80 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
old-style branches to undefined dot-symbols which will be
	satisfied by a plt call.
2005-02-11 14:18:15 +00:00
Alan Modra 40d16e0b39 * elf64-ppc.c (move_plt_plist): New function, extracted from..
(ppc64_elf_copy_indirect_symbol): ..here.
	(func_desc_adjust): Use move_plt_plist.
2005-02-11 03:47:40 +00:00
Alan Modra 8e0e1f2585 daily update 2005-02-10 23:00:05 +00:00
Paul Brook e37c699c87 2005-02-10 Paul Brook <paul@codesourcery.com>
* elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2005-02-10 14:14:25 +00:00
Paul Brook 6fa3860b3b 2005-02-10 Paul Brook <paul@codesourcery.com>
* elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
	symbols local.
	(elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
	(elf_link_renumber_local_hash_table_dynsyms): New function.
	(_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
ld/testsuite/
	* ld-elfvsb/hidden2.s: New file
	* ld-elfvsb/hidden2.d: New file
	* ld-elfvsb/hidden2.ld: New file
2005-02-10 14:09:43 +00:00
Jakub Jelinek d457dcf698 * bfd-in.h (BFD_LINKER_CREATED): Define.
* bfd-in2.h: Rebuilt.
	* elflink.c (bfd_elf_size_dynamic_sections): Disregard
	BFD_LINKER_CREATED bfds when determining input bfds without
	.note.GNU-stack section.

	* emultempl/hppaelf.em (hppaelf_create_output_section_statements):
	Set BFD_LINKER_CREATED on the stubs bfd.
	* emultempl/ppc64elf.em (ppc_create_output_section_statements):
	Likewise.
2005-02-10 09:15:08 +00:00
Maciej W. Rozycki 7f05722e09 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
* elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
relocations against external symbols unchanged.
2005-02-10 03:07:46 +00:00
Alan Modra 96f6015419 daily update 2005-02-09 23:00:06 +00:00
Alan Modra c36e61546a daily update 2005-02-08 23:00:06 +00:00
Paul Brook ccf5f61012 2005-02-08 Paul Brook <paul@codesourcery.com>
* elflink.c (elf_link_input_bfd): Ignore symbols from null input
	sections.
2005-02-08 13:33:56 +00:00
Hans-Peter Nilsson 370a0e1bf4 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
prefix here.
2005-02-08 03:50:08 +00:00
Alan Modra 55bc2f369c daily update 2005-02-07 23:00:04 +00:00
Maciej W. Rozycki 992771964f * elf64-mips.c: Fix formatting throughout. 2005-02-07 15:50:16 +00:00
Maciej W. Rozycki 6422fbef5f * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo. 2005-02-07 15:18:05 +00:00
Alexandre Oliva 303e4c21e7 bfd/ChangeLog:
* elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
*ABS*/*UND* sections.
(elf32_frv_relocate_section): Move zero-addend-required error...
(_frv_emit_got_relocs_plt_entries): ... here.  Report error for
missing needed TLS section.
ld/testsuite/ChangeLog:
* ld-frv/fdpic-shared-8-fail.d: Tweak error messages.
2005-02-07 07:59:34 +00:00
Hans-Peter Nilsson 9f400ee952 * aoutx.h (aout_link_add_symbols): Just return TRUE if a warning
symbol was last.
2005-02-07 02:58:27 +00:00
Hans-Peter Nilsson c386442122 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
being the last symbol.
2005-02-07 02:51:28 +00:00
Maciej W. Rozycki 765f2ef695 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
R_MIPS_GPREL32 relocations against external symbols.
* elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
comment.
2005-02-07 02:44:59 +00:00
Alan Modra 1b3a857543 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
* elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
	elf_string_from_elf_strtab.
	(_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
	(bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
	if it exists.  Don't do the reverse for SHT_SYMTAB_SHNDX.  For
	SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
	looking at cached symtab info first, before iterating over headers.
	For SHT_REL and SHT_RELA, load dynsymtab if needed.
	* elfcode.h (elf_object_p): Don't load section header stringtab
2005-02-06 23:21:44 +00:00
Alan Modra 7fd26c52da daily update 2005-02-06 23:00:04 +00:00
H.J. Lu 90f487dfe0 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
	against protected function when building shared library.

	PR 584
	* elf64-x86-64.c (is_32bit_relative_branch): New.
	(elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
	protected function symbol when building shared library for
	32bit relative branch instruction.
2005-02-06 18:11:30 +00:00
Alan Modra c4f68ce31b * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
syms when doing a relocatable link.
	(ppc64_elf_gc_mark_hook): Check that syms are defined before looking
	at u.def.section.
	(ppc64_elf_tls_setup): Likewise.
	(ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2005-02-06 10:29:39 +00:00
Alan Modra 908b32fcc9 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
(link_hash_newfunc): Clear all locals using memset.
	(make_fdh): Remove flags param.  Always create fake func desc
	weak.  Link the descriptor with the code entry sym.
	(ppc64_elf_archive_symbol_lookup): Don't return fake syms.
	(add_symbol_adjust): Adjust make_fdh call.
	(func_desc_adjust): Likewise.  Twiddle any pre-existing fake
	descriptor to strong undefined if code entry is strong.
2005-02-03 14:48:53 +00:00
Alan Modra 4ea42fb74f bfd/
* elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
	lookup here.  Set to new before calling bfd_link_repair_undef_list.
	(elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
ld/
	emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't
	look up symbol for etree_provide here.
2005-02-03 14:12:54 +00:00
Alan Modra 10d86c8a5c * linker.c (_bfd_link_hash_newfunc): Set all local fields. 2005-02-03 13:54:30 +00:00
Alan Modra 11f25ea6ca include/
* bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak.
bfd/
	* linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
	* elflink.c (elf_smash_syms): Restore symbols that were undefweak
	before the as-needed lib was loaded.  Abort on unexpected refs.
2005-02-03 03:30:49 +00:00
Alan Modra 91024f2d3e daily update 2005-02-02 23:00:08 +00:00
Alan Modra ec13b3bb1f * elflink.c (elf_smash_syms): Expand comments.
(elf_link_add_object_symbols): Only call elf_smash_syms for
	as-needed dynamic objects.
2005-02-02 02:36:35 +00:00
Alan Modra 336549c1f5 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Don't clear everything,
just the fields specific to hppa64.
2005-02-02 01:39:00 +00:00
Alan Modra 4f40114dd2 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
everything, just the field specific to ia64.
2005-02-02 01:16:36 +00:00
Alan Modra ed1a10ac51 daily update 2005-02-01 23:00:08 +00:00
Alan Modra bb700d7851 bfd/
* elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
	(make_fdh): ..here.  New function.  Don't set BSF_OBJECT for
	undefined syms.
	(struct add_symbol_adjust_data): New.
	(add_symbol_adjust): Make an undefweak func desc for old ABI
	objects to link with --as-needed shared libs.  Return fail status.
	Don't adjust old ABI func entry sym to weak if func desc syms
	isn't defined.
	(ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
	and return status.
ld/testsuite/
	* ld-powerpc/tlsso.r: Update.
	* ld-powerpc/tlstocso.r: Update.
2005-02-01 04:22:41 +00:00
Hans-Peter Nilsson 1ffd1c2fd7 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
for clarity.
2005-02-01 03:27:59 +00:00
Alan Modra 77cfaee698 include/
* bfdlink.h (bfd_link_repair_undef_list): Declare.
bfd/
	* elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
	* linker.c (bfd_link_repair_undef_list): ..to new function, but don't
	remove anything but new and undefweak.
	* elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
	existing _DYNAMIC.
	(_bfd_elf_create_dynamic_sections): Formatting.
	(bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
	(_bfd_elf_merge_symbol): Don't handle as-needed syms here.
	(struct elf_smash_data): New.
	(elf_smash_syms): New function.
	(elf_link_add_object_symbols): Call elf_smash_syms.  Don't add
	unneeded dynamic objects to loaded list.
	(elf_link_output_extsym): Don't handle as-needed here.  Strip
	bfd_link_hash_new symbols.
	* elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
	delref when dynindx is already -1.
	* elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
	symbols.
	* elfxx-mips.c (mips_elf_output_extsym): Likewise.
ld/
	* ld.texinfo: Clarify --as-needed operation.
2005-02-01 01:11:27 +00:00
Ben Elliston b15c48d171 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine. 2005-01-31 23:57:31 +00:00
Ben Elliston 0e71e4955c * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
	coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
	coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
	cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
	elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
	elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
	elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
	i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
	nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
	pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
	sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
	hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
	throughout. Similarly, collapse #if 1'd code.
2005-01-31 23:13:34 +00:00
Alan Modra 71143983c8 daily update 2005-01-31 23:00:06 +00:00
Ben Elliston 0983f4eb2b * elf-bfd.h (bfd_elf_discard_group): Remove.
* elf.c (bfd_elf_discard_group): Likewise.
	* elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2005-01-31 22:53:26 +00:00
Richard Sandiford 8c946ed5d5 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
(_bfd_elf_eh_frame_address_size): Declare.
	* elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
	(elfNN_bed): Initialize elf_backend_eh_frame_address_size.
	* elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
	(elf_backend_eh_frame_address_size): Define.
	* elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
	size from the new backend hook.
	(_bfd_elf_write_section_eh_frame): Likewise.
	(_bfd_elf_eh_frame_address_size): New function.
2005-01-31 20:39:11 +00:00
Andrew Cagney c46f8c5116 2005-01-31 Andrew Cagney <cagney@gnu.org>
* gettext.m4: Only set ENABLE_NLS when gettext is present.
2005-01-31 20:32:45 +00:00
Mark Mitchell 5cd3778de9 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
SHF_WRITE for .init_array, .fini_array, and .preinit_array.
2005-01-31 17:50:20 +00:00
Nick Clifton d648679633 Remove obsolete targets 2005-01-31 17:18:51 +00:00
Alan Modra af1e39834d daily update 2005-01-30 23:00:06 +00:00
Alan Modra 2706295c82 daily update 2005-01-29 23:00:08 +00:00
Alan Modra 30bffb23b0 daily update 2005-01-28 23:00:07 +00:00
Daniel Jacobowitz b134237006 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
* elf32-arm.c (ELF_MINPAGESIZE): Define.
	* elf32-ppc.c (ELF_MINPAGESIZE): Define.
	* elfcode.h (elf_object_p): Use minpagesize instead of
	maxpagesize.
	* elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
	(elfNN_bed): Include ELF_MINPAGESIZE.
2005-01-28 17:58:24 +00:00
Julian Brown 319850b451 * bfd/bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
* bfd/bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
	* bfd/elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
	(bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
	passing flag value from ld. Set flag value in global hash table entry.
	(elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
	relocation.
	* ld/emultempl/armelf.em (fix_v4bx): New variable.
	(arm_elf_create_output_section_statements): Communicate fix_v4bx flag
	value to bfd.
	(PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX.
	(PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx.
	(PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx.
	(PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX.
	* ld/NEWS: Mention --fix-v4bx.
	* ld/ld.texinfo: Document --fix-v4bx.
2005-01-28 17:24:41 +00:00
Alan Modra 1705a2660b daily update 2005-01-27 23:00:05 +00:00
Andrew Cagney a53bf50624 2005-01-27 Andrew Cagney <cagney@gnu.org>
* gettext.m4: Don't use NONE as a default for CATOBJEXT.
2005-01-27 14:48:23 +00:00
Alan Modra 7e8dae1527 daily update 2005-01-26 23:00:06 +00:00
Mark Mitchell dc4c9c199b * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
SymbianOS.

	* emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so
	as to include .ARM.exidx$${Base,Limit}.
	* ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
	Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
	Put .init_array, .fini_array, etc. into the read-only data
	segment.
2005-01-26 06:10:45 +00:00
Alan Modra 22a96d786c daily update 2005-01-25 23:00:05 +00:00
Alexandre Oliva 90219bd0f3 bfd/ChangeLog:
2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_relocate_section): Force local binding
for TLSMOFF.
* reloc.c: Add R_FRV_TLSMOFF.
* elf32-frv.c (elf32_frv_howto_table): Likewise.
(frv_reloc_map, frv_reloc_type_lookup): Map it.
(elf32_frv_relocate_section): Handle it.
(elf32_frv_check_relocs): Likewise.
* libbfd.h, bfd-in2.h: Rebuilt.
2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
* elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
when given an undefweak TLS symbol.  Fix constant TLS PLT entries
such that they return the constant in gr9.
(_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
symbols.
(_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
too, such that they shrink on relaxation.
(elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
(_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
if we can guarantee the use of 16-bit constants.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
Introduce TLS support for FR-V FDPIC.
* reloc.c: Add TLS relocations.
* elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
(elf32_frv_rel_tlsdesc_value_howto): New.
(elf32_frv_rel_tlsoff_howto): New.
(frv_reloc_map): Add new mappings.
(struct frvfdpic_elf_link_hash_table): Add pointer to summary
reloc information.
(frvfdpic_dynamic_got_plt_info): New.
(frvfdpic_plt_tls_ret_offset): New.
(ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
(struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
(struct _frvfdpic_dynamic_got_plt_info): Likewise.
(FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
section as local.
(struct frvfdpic_relocs_info): Add TLS fields.
(frvfdpic_relocs_info_hash): Warning clean up.
(frvfdpic_relocs_info_find): Initialize tlsplt_entry.
(frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
(FRVFDPIC_TLS_BIAS): Define.
(tls_biased_base): New.
(_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
relocations.
(frv_reloc_type_lookup): Likewise.
(frvfdpic_info_to_howto_rel): Likewise.
(elf32_frv_relocate_section): Likewise.
(_frv_create_got_section): Create the PLT section here.
(elf32_frvfdpic_create_dynamic_sections): Not here.
(_frvfdpic_count_nontls_entries): Move out of...
(_frvfdpic_count_got_plt_entries): ... here.
(_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
(_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
support.
(_frvfdpic_relax_tls_entries): New.
(_frvfdpic_compute_got_alloc_data): Add TLS support.
(_frvfdpic_get_tlsdesc_entry): New.
(_frvfdpic_assign_got_entries): Add TLS support.
(_frvfdpic_assign_plt_entries): Likewise.
(_frvfdpic_reset_got_plt_entries): New.
(_frvfdpic_size_got_plt): Move out of...
(elf32_frvfdpic_size_dynamic_sections): ... here.
(_frvfdpic_relax_got_plt_entries): New.
(elf32_frvfdpic_relax_section): New.
(elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
(elf32_frv_check_relocs): Add TLS support.
(bfd_elf32_bfd_relax_section): Define for FDPIC.
* libbfd.h, bfd-in2.h: Rebuilt.
cpu/ChangeLog:
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* frv.cpu: Add support for TLS annotations in loads and calll.
* frv.opc (parse_symbolic_address): New.
(parse_ldd_annotation): New.
(parse_call_annotation): New.
(parse_ld_annotation): New.
(parse_ulo16, parse_uslo16): Use parse_symbolic_address.
Introduce TLS relocations.
(parse_d12, parse_s12, parse_u12): Likewise.
(parse_uhi16): Likewise.  Fix constant checking on 64-bit host.
(parse_call_label, print_at): New.
gas/ChangeLog:
* config/tc-frv.c (md_apply_fix3): Mark TLS symbols as such.
2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-frv.c (frv_pic_ptr): Add tlsmoff support.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* cgen.c (gas_cgen_parse_operand): Handle
CGEN_PARSE_OPERAND_SYMBOLIC.
* config/tc-frv.c (md_cgen_lookup_reloc): Handle TLS relocations.
(frv_force_relocation): Likewise.  Fix handling of PIC
relocations.
(md_apply_fix3): Likewise.
include/elf/ChangeLog:
2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
* frv.h: Add R_FRV_TLSMOFF.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* frv.h: Add TLS relocations.
include/opcode/ChangeLog:
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* cgen.h (enum cgen_parse_operand_type): Add
CGEN_PARSE_OPERAND_SYMBOLIC.
ld/testsuite/ChangeLog:
* ld-frv/fdpic.exp: Add -mfdpic to ASFLAGS.
* ld-frv/tls.exp: Likewise.
2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
* ld-frv/tls-3.s: New.
* ld-frv/tls-static-3.d: New.
* ld-frv/tls-dynamic-3.d: New.
* ld-frv/tls-pie-3.d: New.
* ld-frv/tls-shared-3.d: New.
* ld-frv/tls-relax-static-3.d: New.
* ld-frv/tls-relax-dynamic-3.d: New.
* ld-frv/tls-relax-pie-3.d: New.
* ld-frv/tls-relax-shared-3.d: New.
* ld-frv/tls.exp: Run the new tests.
* ld-frv/tls-dynamic-2.d: Adjust for improved relaxation.
* ld-frv/tls-relax-dynamic-2.d: Likewise.
* ld-frv/tls-relax-initial-shared-2.d: Likewise.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* ld-frv/tls-1-dep.s: New.
* ld-frv/tls-1-shared.lds: New.
* ld-frv/tls-1.s: New.
* ld-frv/tls-2.s: New.
* ld-frv/tls-dynamic-1.d: New.
* ld-frv/tls-dynamic-2.d: New.
* ld-frv/tls-initial-shared-2.d: New.
* ld-frv/tls-pie-1.d: New.
* ld-frv/tls-relax-dynamic-1.d: New.
* ld-frv/tls-relax-dynamic-2.d: New.
* ld-frv/tls-relax-initial-shared-2.d: New.
* ld-frv/tls-relax-pie-1.d: New.
* ld-frv/tls-relax-shared-1.d: New.
* ld-frv/tls-relax-shared-2.d: New.
* ld-frv/tls-relax-static-1.d: New.
* ld-frv/tls-shared-1-fail.d: New.
* ld-frv/tls-shared-1.d: New.
* ld-frv/tls-shared-2.d: New.
* ld-frv/tls-static-1.d: New.
* ld-frv/tls.exp: New.
* ld-frv/fdpic-pie-1.d: Adjust for 64-bit host.
* ld-frv/fdpic-pie-2.d: Likewise.
* ld-frv/fdpic-pie-6.d: Likewise.
* ld-frv/fdpic-pie-7.d: Likewise.
* ld-frv/fdpic-pie-8.d: Likewise.
* ld-frv/fdpic-shared-1.d: Likewise.
* ld-frv/fdpic-shared-2.d: Likewise.
* ld-frv/fdpic-shared-3.d: Likewise.
* ld-frv/fdpic-shared-4.d: Likewise.
* ld-frv/fdpic-shared-5.d: Likewise.
* ld-frv/fdpic-shared-6.d: Likewise.
* ld-frv/fdpic-shared-7.d: Likewise.
* ld-frv/fdpic-shared-8.d: Likewise.
* ld-frv/fdpic-shared-local-2.d: Likewise.
* ld-frv/fdpic-shared-local-8.d: Likewise.
* ld-frv/fdpic-static-1.d: Likewise.
* ld-frv/fdpic-static-2.d: Likewise.
* ld-frv/fdpic-static-6.d: Likewise.
* ld-frv/fdpic-static-7.d: Likewise.
* ld-frv/fdpic-static-8.d: Likewise.
opcodes/ChangeLog:
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* frv-asm.c: Rebuilt.
* frv-desc.c: Rebuilt.
* frv-desc.h: Rebuilt.
* frv-dis.c: Rebuilt.
* frv-ibld.c: Rebuilt.
* frv-opc.c: Rebuilt.
* frv-opc.h: Rebuilt.
2005-01-25 20:22:41 +00:00
Alan Modra 8615f3f213 bfd/
* elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
	loadable reloc sections.
	(_bfd_elf_canonicalize_dynamic_reloc): Likewise.
	(_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
binutils/
	* nm.c (display_rel_file): Read dynamic syms before calling
	bfd_get_synthetic_symtab.
2005-01-25 10:33:55 +00:00
Alan Modra 7e9f086769 bfd/
* elflink.c (elf_link_add_object_symbols): Don't create link dynamic
	sections immediately when linking shared libs.  Instead, wait until
	we know a lib is needed.
	(_bfd_elf_link_create_dynstrtab): Extract from..
	(_bfd_elf_link_create_dynamic_sections_): ..here.
	(elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
	_bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
	for non-existent .dynamic.
	(elf_link_output_extsym): Don't complain about undefined symbols
	in as-needed dynamic libs that aren't actually linked.
ld/
	* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
	(gld${EMULATION_NAME}_after_open): Ignore needed libs if they were
	only needed by an as-needed lib that didn't get linked.
2005-01-25 01:40:04 +00:00
Alan Modra 147db43d38 daily update 2005-01-24 23:00:07 +00:00
Andrew Cagney 45181ed16d 2005-01-24 Andrew Cagney <cagney@gnu.org>
* gettext.m4: Only fall back to ../intl/ when it's present.
2005-01-24 20:01:09 +00:00
Alan Modra 7cf2451106 daily update 2005-01-23 23:00:06 +00:00
Alan Modra a6f6220f01 daily update 2005-01-22 23:00:05 +00:00
Alan Modra 5f0715770b daily update 2005-01-21 23:00:11 +00:00
Ben Elliston 753e3eb6f2 * aout-encap.c: Remove unused file. 2005-01-21 03:27:53 +00:00
Alan Modra 9a12353f39 daily update 2005-01-20 23:00:05 +00:00
Alan Modra b4f61ddf3a daily update 2005-01-19 23:00:05 +00:00
H.J. Lu 1c16dfa5fd 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
PR 679
	* elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
	non-function symbols are local.
	(_bfd_elf_symbol_refs_local_p): Likewise.
2005-01-19 16:15:11 +00:00
Alan Modra b16a311506 daily update 2005-01-18 23:00:07 +00:00
Alan Modra 1449d79bae bfd/
* bfd.c (bfd_link_just_syms): Add abfd param.
	* bfd-in2.h: Regenerate.
ld/
	* ldlang.c (section_already_linked): Adjust bfd_link_just_syms call.
	(lang_place_orphans): Don't abort on just_syms_flag, instead call
	bfd_link_just_syms.
2005-01-18 08:51:54 +00:00
Alan Modra f2ea2a2251 daily update 2005-01-17 23:00:08 +00:00
Richard Sandiford dcf507a6ee * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
(_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
	instructions.  If the amount of padding is known, reduce the size
	of the CIE or FDE by that amount.
2005-01-17 17:44:41 +00:00
Richard Sandiford 2c42be6506 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
augmentation_size.  Use bfd_signed_vmas for data_align.
	* elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
	(read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
	functions.  Don't read past the end of the enclosing CIE or FDE.
	(skip_bytes): New utility function.
	(_bfd_elf_discard_section_eh_frame): Use new functions, adding more
	sanity checking.
	(_bfd_elf_write_section_eh_frame): Use new functions.
2005-01-17 17:41:47 +00:00
Richard Sandiford acfe556796 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
assert-style REQUIRE() macro to handle sanity checks.
2005-01-17 17:39:27 +00:00
H.J. Lu c0c28ab8b2 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
* dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
	(comp_unit): Here.
	(read_unsigned_leb128): Removed.
	(read_signed_leb128): Removed.
	(find_abstract_instance_name): Updated.
	(parse_comp_unit): Accept info_ptr_unit.
	(_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
	comp unit and pass it to parse_comp_unit.

	* elf-eh-frame.c (read_unsigned_leb128): Moved to ...
	(read_signed_leb128): Moved to ...
	* libbfd.c: Here.

	* libbfd-in.h (read_unsigned_leb128): New prototype.
	(read_signed_leb128): Likewise.
	* libbfd.h: Regenerated.
2005-01-17 17:12:00 +00:00
Nick Clifton e38bc3b524 Fix SH2A machine variants in order to correctly select instruction inheritance 2005-01-17 14:08:17 +00:00
Alan Modra d7ebd26642 daily update 2005-01-16 23:00:05 +00:00
Alan Modra 5bd605a683 daily update 2005-01-15 23:00:06 +00:00
Andrew Cagney 8fb84ecc44 2005-01-15 Andrew Cagney <cagney@gnu.org>
* bfd.m4: New file.
	* acinclude.m4: Move BFD_NEED_DECLARATION,
	BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
	the new file bfd.m4.  Include ../bfd/bfd.m4.
	* configure: Re-generate.
2005-01-15 19:14:54 +00:00
Alan Modra f304d6ec50 daily update 2005-01-14 23:00:06 +00:00
Alan Modra e5f80da454 daily update 2005-01-13 23:00:05 +00:00
Alan Modra 310368cbdf daily update 2005-01-12 23:00:05 +00:00
Alan Modra b4a38de6b6 include/elf/
* ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define.
	(R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value.
bfd/
	* elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
	(ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
	reaching PLT.
	(ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
	R_PPC_RELAX32PC_PLT.
2005-01-12 11:28:28 +00:00
Alan Modra 917e110241 daily update 2005-01-11 23:00:06 +00:00
Alan Modra 3eb128b2a5 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
symbols.
	* elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
	* elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
	* elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
	* elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
	* elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
	* elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
	* elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
	* elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
	* elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
	* elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
	* elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
	* elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
	* elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
	* elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2005-01-11 09:32:53 +00:00
Alan Modra 264a1fe053 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
.dynsbss flags.
2005-01-11 08:30:35 +00:00
Alan Modra 96d24e6d62 daily update 2005-01-10 23:00:06 +00:00
Nick Clifton 5c4504f7c5 Add support for maxq10 and maxq20 machine values 2005-01-10 16:33:51 +00:00
Eric Botcazou 669460c7e6 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
non-shared object, do not reserve space in .plt and .rela.plt
	for regular symbols neither defined nor referenced in shared objects.
2005-01-10 11:23:01 +00:00
Alan Modra f7b8d4d00a daily update 2005-01-09 23:00:05 +00:00
Eric Botcazou 01aac484a6 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
to zero the structure.
	(create_got_section): Use BFD_ASSERT instead of abort.
2005-01-09 19:49:22 +00:00
Eric Botcazou a51a7930ba * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
'srelgot' fields.
	(create_got_section): New function.
	(sparc64_elf_create_dynamic_sections): Likewise.
	(sparc64_elf_check_relocs): Invoke create_got_section instead of
	_bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
	(sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
	(sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
	(sparc64_elf_finish_dynamic_symbol): Likewise.
	(sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
	(elf_backend_create_dynamic_sections): Define to
	sparc64_elf_create_dynamic_sections.
2005-01-09 19:48:28 +00:00
Eric Botcazou 151e5294b9 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
(elf_backend_omit_section_dynsym): Define to it.
	* elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
	(elf_backend_omit_section_dynsym): Define to it.
2005-01-09 09:26:55 +00:00
Alan Modra a5e16994ff daily update 2005-01-08 23:00:05 +00:00
Alan Modra 5110786067 daily update 2005-01-07 23:00:05 +00:00
Jakub Jelinek 6f79b21913 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
PT_DYNAMIC segment, unless .dynamic.
2005-01-07 09:52:00 +00:00
Alan Modra d89a8790cd daily update 2005-01-06 23:00:07 +00:00
Paul Brook 4e7fd91e3e 2005-01-06 Paul Brook <paul@codesourcery.com>
bfd/
	* config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
	* configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
	* configure: Regenerate.
	* elf32-arm.c: Add VxWorks target bfd.
	(USE_REL): Remove.
	(elf32_arm_link_hash_table): Add use_rel.
	(elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
	elf32_arm_relocate_section): Replace USE_REL with runtime check.
	Correct offset calculation for RELA case.
	(elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
	elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
	(elf32_arm_vxworks_link_hash_table_create): New function.
	* targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
	(bfd_elf32_littlearm_vxworks_vec): Ditto.
	(_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
gas/
	* config/tc-arm.c (FPU_DEFAULT): Define for TE_VXWORKS.
	(md_begin): Handle TE_VXWORKS for FP defaults.
	(md_apply_fix3): Correct rela offsets.
	(elf32_arm_target_format): Add VxWorks targets.
ld/
	* Makefie.am: Add earmelf_vxworks.
	* Makefile.in: Regenerate.
	* configure.tgt: Make arm-*-vxworks a separate case.
	* emulparams/armelf_vxworks.sh: New function.
2005-01-06 16:18:25 +00:00