Commit Graph

2684 Commits

Author SHA1 Message Date
Alan Modra deb0e27291 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
	(struct sfpr_def_parms): New.
	(sfpr_define): New function.
	(savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
	(savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
	(savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
	(savefpr1_tail, restfpr1_tail): New functions.
	(savevr, savevr_tail, restvr, restvr_tail): New functions.
	(MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
	(ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
	code.  Define all ABI mandated _save and _rest functions.
2004-08-27 07:54:00 +00:00
Paul Brook 85a84e7a87 * INTERWORK_FLAG: Return true for EABIv3 objects. 2004-08-26 16:18:37 +00:00
Alan Modra 688c58f359 bfd/
* elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
	TRUE or FALSE.
ld/
	* ldlang.c (lang_init): Don't compare with TRUE.
2004-08-25 23:40:56 +00:00
Alan Modra 3e95eabc2c * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
that pcrel correction is applied for R_386_PC32.
2004-08-25 23:20:37 +00:00
Alan Modra f855931bbd * elf32-i386.c (elf_i386_relocate_section): Zero section contents
for R_386_32 and R_386_PC32 relocs against symbols defined in
	discarded sections.
2004-08-25 14:35:58 +00:00
Nick Clifton b18c562e39 Apply Dmitry Diky's patches to add relaxation to msp430. 2004-08-25 12:54:15 +00:00
Nick Clifton af705ba8f0 (m32r_elf_relocate_section): Handle R_M32R_SDA16_RELA in the same way as
R_M32R_SDA16.
2004-08-24 08:21:25 +00:00
Daniel Jacobowitz ea5158d820 * elflink.c (_bfd_elf_section_already_linked): Handle
SEC_LINK_DUPLICATES_SAME_CONTENTS.
2004-08-21 01:13:22 +00:00
Ben Elliston f89c4decd1 Fix typo in Alan Modra's 2004-08-16 entry. 2004-08-20 11:44:26 +00:00
Mark Mitchell 49d934f15e * config.bfd (arm*-*-symbianelf*): New target.
(arm*-*-eabi*): Likewise.
2004-08-19 18:09:44 +00:00
Alan Modra 039b3fefa6 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
"struct ppc_link_hash_entry *".
	(ppc64_elf_relocate_section): Ditto for type of h.  Introduce h_elf
	to satisfy RELOC_FOR_GLOBAL_SYMBOL.
2004-08-19 08:30:16 +00:00
Jakub Jelinek 3f764659c7 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
entries (where fd_aux overlaps next entry's fd_func).
	Add non_overlapping argument, use it.
	(ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
	ppc64_elf_size_stubs, ppc64_elf_relocate_section,
	ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
	as indexes into opd_sym_map/opd_adjust array.
	* elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.

	* emultempl/ppc64elf.em (non_overlapping_opd): New variable.
	(ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
	(OPTION_NON_OVERLAPPING_OPD): Define.
	(PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
	--non-overlapping-opd option.
2004-08-19 07:47:25 +00:00
Alan Modra c09bdfe5c9 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
if we can look up their function descriptor in a regular file.
2004-08-18 10:11:02 +00:00
Nick Clifton 271d0fc399 PR 324
(coff_link_add_symbols): Check that the comdat pointer in the coff_section_data
structure has been initialised before using it.
2004-08-18 09:44:11 +00:00
Alan Modra a010d60faf PR 338
* elflink.c (bfd_elf_record_link_assignment): Add comment about
	changing bfd_link_hash_undefined to bfd_link_hash_new.
	* ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
	was already on the undefs list.
2004-08-18 02:45:43 +00:00
Jakub Jelinek 90e3cdf2a9 bfd/
* elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
	if not yet defined.
	* elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
	(synthetic_opd, synthetic_relocatable): New variables.
	(compare_symbols, compare_relocs): New helper routines.
	(ppc64_elf_get_synthetic_symtab): New function.
	* bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
	to relsyms.
	* bfd-in2.h: Regenerated.
	* elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
	to relsyms.  Return 0 if abfd is relocatable.
binutils/
	* objdump.c (dump_bfd): For relocatable objects, pass syms instead
	of dynsyms to bfd_get_synthetic_symtab.
2004-08-17 09:07:35 +00:00
Alan Modra 7c2c850509 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections. 2004-08-17 08:51:07 +00:00
Nick Clifton 0367ecfb78 (is_arm_mapping_symbol_name): New function - return true when a symbol name
matches the requirements for an ARM mapping symbol name.
(arm_elf_find_function): New function based on elf_find_function in elf.c but
 skipping ARM mapping symbols and including thumb function symbols.
(elf32_arm_find_nearest_line): Use arm_elf_find_function.
(elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
2004-08-17 08:12:26 +00:00
Alan Modra 2441e016ac * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
(ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
	(ppc64_elf_brtaken_reloc): Here too.
2004-08-17 07:05:52 +00:00
Alan Modra 35b0ce5903 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
symbol visibility.
	(ppc64_elf_check_directives): Check that we have the right hash
	table before proceeding.
2004-08-17 05:38:28 +00:00
Alan Modra 816881401e * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
(adjust_opd_syms): Attach opd syms for deleted entries to one of
	the sections that will be discarded.
2004-08-17 01:25:21 +00:00
Alan Modra 327c1315a0 * elflink.c (elf_section_complain_discarded): Ignore .fixup. 2004-08-16 01:17:58 +00:00
Alan Modra 45fc9e4ac6 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
free space available.
2004-08-16 01:14:42 +00:00
Alan Modra 9dadfa79ec * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
occurrences with bfd_btye * thoughout file.

	* coff-rs6000.c (do_shared_object_padding): Warning fix.
	(xcoff_write_armap_big): Likewise.
	(xcoff_write_archive_contents_old): Likewise.
	(xcoff_write_archive_contents_big): Likewise.

	* elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
2004-08-16 00:25:14 +00:00
Nick Clifton 57e8b36aa9 Convert file to ISO C90 2004-08-13 15:35:22 +00:00
Alan Modra a005f94ee3 PR 293
* elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
	zero the plt field.
2004-08-13 08:41:51 +00:00
Alan Modra d003868ea7 bfd/
* bfd.c (_bfd_default_error_handler): Handle %A and %B.
	(bfd_archive_filename, bfd_get_section_ident): Delete.
	* ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
	bfd_archive_filename.
	* elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
	to warn about symbols in discarded sections.  Use _bfd_error_handler.
	* aout-adobe.c (aout_adobe_callback): See below.
	* aout-cris.c (swap_ext_reloc_in): ..
	* coff-arm.c (find_thumb_glue, find_arm_glue,
	coff_arm_relocate_section, bfd_arm_process_before_allocation,
	coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
	coff_arm_copy_private_bfd_data): ..
	* coff-i860.c (i860_reloc_processing): ..
	* coff-mcore.c (mcore_coff_unsupported_reloc,
	coff_mcore_relocate_section): ..
	* coff-ppc.c (coff_ppc_relocate_section): ..
	* coff-rs6000.c (xcoff_create_csect_from_smclas
	* coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
	sh_swap_insns, sh_relocate_section): ..
	* coff-tic54x.c (tic54x_reloc_processing): ..
	* coff-tic80.c (coff_tic80_relocate_section): ..
	* coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
	* coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
	coff_slurp_symbol_table, coff_classify_symbol,
	coff_slurp_reloc_table): ..
	* coffgen.c (_bfd_coff_read_string_table): ..
	* cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
	_bfd_coff_generic_relocate_section): ..
	* cpu-arm.c (bfd_arm_merge_machines): ..
	* cpu-sh.c (sh_merge_bfd_arch): ..
	* elf-hppa.h (elf_hppa_relocate_section): ..
	* elf.c (bfd_elf_string_from_elf_section, setup_group,
	_bfd_elf_setup_group_pointers, bfd_section_from_shdr,
	assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
	copy_private_bfd_data, _bfd_elf_validate_reloc): ..
	* elf32-arm.h (find_thumb_glue, find_arm_glue,
	bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
	elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
	elf32_arm_relocate_section, elf32_arm_set_private_flags,
	elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
	* elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
	cris_elf_merge_private_bfd_data
	* elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
	* elf32-gen.c (elf32_generic_link_add_symbols): ..
	* elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
	elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
	elf32_hppa_relocate_section): ..
	* elf32-i370.c (i370_elf_merge_private_bfd_data,
	i370_elf_check_relocs, i370_elf_relocate_section): ..
	* elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
	elf_i386_relocate_section): ..
	* elf32-m32r.c (m32r_elf_relocate_section,
	m32r_elf_merge_private_bfd_data): ..
	* elf32-m68hc1x.c (m68hc12_add_stub,
	_bfd_m68hc11_elf_merge_private_bfd_data): ..
	* elf32-m68k.c (elf_m68k_relocate_section): ..
	* elf32-mcore.c (mcore_elf_unsupported_reloc,
	mcore_elf_relocate_section): ..
	* elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
	ppc_elf_check_relocs, ppc_elf_relocate_section,
	ppc_elf_begin_write_processing): ..
	* elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
	elf_s390_relocate_section): ..
	* elf32-sh-symbian.c (sh_symbian_import_as,
	sh_symbian_process_embedded_commands,
	sh_symbian_relocate_section): ..
	* elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
	sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
	sh_elf_merge_private_data): ..
	* elf32-sparc.c (elf32_sparc_check_relocs,
	elf32_sparc_relocate_section,
	elf32_sparc_merge_private_bfd_data): ..
	* elf32-v850.c (v850_elf_check_relocs,
	v850_elf_merge_private_bfd_data): ..
	* elf32-xtensa.c (elf_xtensa_check_relocs,
	elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
	* elf64-alpha.c (elf64_alpha_relax_with_lituse,
	elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
	elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
	* elf64-gen.c (elf64_generic_link_add_symbols): ..
	* elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
	ppc64_elf_check_relocs, ppc64_elf_edit_opd,
	ppc64_elf_relocate_section): ..
	* elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
	elf_s390_relocate_section): ..
	* elf64-sh64.c (sh_elf64_relocate_section): ..
	* elf64-sparc.c (sparc64_elf_check_relocs,
	sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
	sparc64_elf_merge_private_bfd_data): ..
	* elf64-x86-64.c (elf64_x86_64_check_relocs,
	elf64_x86_64_relocate_section): ..
	* elflink.c (_bfd_elf_add_default_symbol,
	_bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
	_bfd_elf_link_output_relocs, elf_link_add_object_symbols,
	bfd_elf_size_dynamic_sections, elf_link_output_extsym,
	elf_get_linked_section_vma, elf_fixup_link_order,
	bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
	bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
	* elfxx-ia64.c (elfNN_ia64_relax_section,
	elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
	* elfxx-mips.c (mips_elf_perform_relocation,
	_bfd_mips_elf_check_relocs,
	_bfd_mips_elf_merge_private_bfd_data): ..
	* ieee.c (ieee_slurp_external_symbols): ..
	* ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
	* libbfd.c (_bfd_generic_verify_endian_match): ..
	* linker.c (_bfd_generic_link_add_one_symbol,
	_bfd_generic_section_already_linked): ..
	* pdp11.c (translate_to_native_sym_flags): ..
	* pe-mips.c (coff_pe_mips_relocate_section): ..
	* peicode.h (pe_ILF_build_a_bfd): ..
	* srec.c (srec_bad_byte): ..
	* stabs.c (_bfd_link_section_stabs): ..
	* xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
	Replace all uses of bfd_archive_filename and bfd_get_section_ident
	with corresponding %B and %A in _bfd_error_handler format string.
	Replace occurrences of "fprintf (stderr," with _bfd_error_handler
	calls to use %A and %B.  Fix "against symbol .. from section" and
	similar error messages.  Combine multiple _bfd_error_handler calls
	where they were separated due to bfd_archive_filename deficiencies.
	* bfd-in2.h: Regenerate.
include/
	* bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
	(LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
ld/
	* ldmain.c (link_callbacks): Remove "error_handler".
	* ldmisc.c: Include elf-bfd.h.
	(vfinfo): Sort comment.  Handle %A.  Use %A instead of
	bfd_get_section_indent.
	(error_handler): Delete.
	* ldmisc.h (error_handler): Delete declaration.
2004-08-13 03:16:01 +00:00
H.J. Lu 6ba842b637 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_relocate_section): Report unrecognized
	relocation.
2004-08-12 15:56:05 +00:00
Alan Modra 99877b66ad bfd/
* elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
	(struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
	Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
	Add twiddled_syms.
	(link_hash_newfunc): Init was_undefined.
	(add_symbol_adjust): Don't set undefined dot symbols to defweak;
	Use undefweak instead.
	(ppc64_elf_check_directives): Fix undefs chain.
	(ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
	references.
	(ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
	(undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
	* elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
ld/
	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Call
	ppc64_elf_restore_symbols.
2004-08-10 11:23:03 +00:00
Jakub Jelinek ba3bee0b4e * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
error, test input_section flags rather than sec.
2004-08-09 08:53:51 +00:00
Alan Modra 8387904def * elf-bfd.h (struct elf_backend_data): Add
elf_backend_archive_symbol_lookup.
	(_bfd_elf_archive_symbol_lookup): Declare.
	* elflink.c (_bfd_elf_archive_symbol_lookup): New function..
	(elf_link_add_archive_symbols): ..extracted from here.  Call the
	backend version.
	* elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
	(elfNN_bed): Init new field.
	* elf64-ppc.c (elf_backend_check_directives): Define.
	(elf_backend_archive_symbol_lookup): Define.
	(struct ppc_link_hash_table): Add tls_get_add_fd.  Make tls_get_add
	a ppc_link_hash_entry pointer.
	(get_fdh): Move.
	(ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
	(add_symbol_adjust, ppc64_elf_check_directives): New functions.
	(ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
	ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
	ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
	ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
	ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
	descriptor symbols.
2004-08-09 06:02:03 +00:00
Alan Modra 8843416a51 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
(ppc64_elf_add_symbol_hook): Test for NULL section.
	(get_sym_h): Formatting.
	(ppc64_elf_size_stubs): Include reloc addend in value stored as
	stub target_value.
2004-08-09 05:38:48 +00:00
Alan Modra b25116a9c7 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
long branch stubs with code handling plt and r2off branch stubs.
2004-08-09 05:12:14 +00:00
Alan Modra ccfa59eaa0 bfd/
* elf-bfd.h (_bfd_elf_gc_mark): Declare.
	* elflink.c (elf_link_input_bfd): Formatting.
	(_bfd_elf_gc_mark): Rename from elf_gc_mark and make global.  Adjust
	all callers.
	* elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
	(link_hash_newfunc): Don't set it.
	(ppc64_elf_copy_indirect_symbol): Nor copy it.
	(ppc64_elf_mark_entry_syms): Delete.
	(ppc64_elf_gc_mark_hook): Mark entry syms here.  Also mark opd
	sections.  Use get_opd_info.
	* elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
ld/
	* emultempl/ppc64elf.em (ppc_after_open): Delete.
	(LDEMUL_AFTER_OPEN): Don't define.
2004-08-09 03:14:12 +00:00
Alan Modra 4f800a42be * elf64-ppc.c (adjust_opd_syms): Fix merge error. 2004-08-09 02:59:15 +00:00
Alan Modra 06da1e8e7b * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
(func_desc_adjust): Don't set have_undefweak.
	(ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
	(ppc64_elf_relocate_section): NOP out calls to undefweak functions.
2004-08-09 00:54:28 +00:00
Alan Modra 34814b9fa0 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
"struct ppc_link_hash_entry *".  Adjust all references.
	(ppc64_elf_hide_symbol): Correct a comment.
2004-08-09 00:40:48 +00:00
Alan Modra 4025353c27 * elf64-ppc.c (get_opd_info): New function.
(adjust_opd_syms): Use get_opd_info.  Define removed symbols as zero.
	(ppc64_elf_edit_opd): Use get_opd_info.  Check that sym has a dot
	before calling get_fdh.  Test fdh rather than h before dereferencing
	fdh.  Mark removed symbols in opd_adjust.
	(ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
	(ppc64_elf_relocate_section): Use get_opd_info, and handle removed
	opd symbols.
	(ppc64_elf_output_symbol_hook): Likewise.
2004-08-09 00:22:53 +00:00
Paul Brook db6579d415 bfd/
* elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
	(elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
	BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
	* reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
	and BFD_RELOC_ARM_SBREL32.
	* bfd-in2.h, bbfd.h: Regenerate.
gas/
	* config/tc-arm.c (md_apply_fix3, tc_gen_reloc, arm_parse_reloc):
	Handle new relocations.
	* include/elf/arm.h (elf_arm_reloc_type): Add new EABI relocations.
gas/testsuite/
	* gas/arm/pic.s,d: Test RELABS and SBREL relocations.
2004-08-06 16:18:11 +00:00
Thiemo Seufer a4d0f1817b * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
the dynamic link symbol actually in use.
2004-08-01 20:13:16 +00:00
Stephane Carrez 83774818e5 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new 2004-08-01 19:32:28 +00:00
Thiemo Seufer 00b4930b6b * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
SHN_MIPS_TEXT and SHN_MIPS_DATA.
2004-07-30 23:56:04 +00:00
H.J. Lu 185d09adc3 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
Nick Clifton  <nickc@redhat.com>

	PR 290
	* bfd.c (_bfd_default_error_handler): Make it global.

	* elf-bfd.h (elf_backend_data): Add link_order_error_handler.

	* elf.c (assign_section_numbers): Cope gracefully with sections
	which have SHF_LINK_ORDER set but no sh_link set up.
	* elflink.c (elf_get_linked_section_vma): Likewise.

	* elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
	it to NULL.

	* elfxx-target.h (elf_backend_link_order_error_handler): New.
	Set it to _bfd_default_error_handler.
	(elfNN_bed): Add elf_backend_link_order_error_handler.

	* libbfd-in.h (_bfd_default_error_handler): New.

	* libbfd.h: Regenerated.
2004-07-30 15:37:04 +00:00
Jakub Jelinek 7946e94a55 * archures.c (bfd_mach_sparc_64bit_p): Define.
* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
	* bfd-in2.h: Rebuilt.
2004-07-30 10:08:00 +00:00
Alexandre Oliva 1d70c7fb83 include/elf/ChangeLog:
Introduce SH2a support.
2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
* sh.h (EF_SH2A_NOFPU): New.
2003-12-01  Michael Snyder  <msnyder@redhat.com>
* sh.h (EF_SH2A): New.
bfd/ChangeLog:
Introduce SH2a support.
2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
* archures.c (bfd_mach_sh2a_nofpu): New.
* bfd-in2.h: Rebuilt.
* cpu-sh.c (SH2A_NOFPU_NEXT): New.
(arch_info_struct): Add sh2a_nofpu.
* elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
2003-12-29  DJ Delorie  <dj@redhat.com>
* reloc.c: Add relocs for sh2a.
* bfd-in2.h: Regenerate.
* libbfd.hh: Regenerate.
2003-12-01  Michael Snyder  <msnyder@redhat.com>
* archures.c (bfd_mach_sh2a): New.
* bfd-in2.h: Rebuilt.
* cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
(SH2A_NEXT): New.
(arch_info_struct): Add sh2a.
* elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
binutils/ChangeLog:
* readelf.c (get_machine_flags <EM_SH>): Handle EF_SH2A and
EF_SH2A_NOFPU.
gas/ChangeLog:
Introduce SH2a support.
2004-02-24  Corinna Vinschen  <vinschen@redhat.com>
* config/tc-sh.c (get_specific): Change arch_sh2a_up to
arch_sh2a_nofpu_up.
2004-02-24  Corinna Vinschen  <vinschen@redhat.com>
* config/tc-sh.c (md_parse_option): Add sh2a-nofpu ISA handling.
2004-02-20  Corinna Vinschen  <vinschen@redhat.com>
* config/tc-sh.c (sh_elf_final_processing): Move sh2a recognition
to end of conditional expression.
2004-02-20  Corinna Vinschen  <vinschen@redhat.com>
* config/tc-sh.c: Add sh2a-nofpu support.
2003-12-29  DJ Delorie  <dj@redhat.com>
* tc-sh.c: Add sh2a support.
(parse_reg): Add tbr.
(parse_at): Support @@(disp,tbr).
(get_specific): Support sh2a opcodes.
(insert4): New, for 4 byte relocs.
(build_Mytes): Support sh2a opcodes.
(md_apply_fix3_Mytes): Support sh2a opcodes.
2003-12-02  Michael Snyder  <msnyder@redhat.com>
* config/tc-sh.c (md_parse_option): Handle sh2a.
(sh_elf_final_processing): Ditto.
gas/testsuite/ChangeLog:
2003-12-30  DJ Delorie  <dj@redhat.com>
* gas/sh/sh2a.s: New.
* gas/sh/sh2a.d: New.
* gas/sh/basic.exp: Add it.
2004-07-29 05:17:41 +00:00
Dave Anglin 404ed0cf48 PR 273
* som.c (setup_sections): Improve estimation of space sizes in
	relocatable objects.
2004-07-28 22:23:53 +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 3d7f7666a4 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
PR 161/251
	* elf-bfd.h (bfd_elf_section_data): Add sec_group.
	(elf_sec_group): Defined.
	(bfd_elf_match_symbols_in_sections): New prototype.
	(_bfd_elf_setup_group_pointers): Likewise.

	* elf.c (bfd_elf_discard_group): Abort.
	(bfd_elf_set_group_contents): Also include relocation sections.
	Remove zero-fill for ld -r.
	(_bfd_elf_setup_group_pointers): New function.
	(elf_sort_elf_symbol): Likewise.
	(elf_sym_name_compare): Likewise.
	(bfd_elf_match_symbols_in_sections): Likewise.

	* elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.

	* elflink.c (match_group_member): New.
	(elf_link_input_bfd): Check group member for discarded section.
	(try_match_symbols_in_sections): New function.
	(already_linked): Likewise.
	(_bfd_elf_section_already_linked): Support mixing comdat group
	and linkonce section.

	* libbfd-in.h (bfd_section_already_linked_table_traverse): New.
	* linker.c (bfd_section_already_linked_table_traverse): New.

	* libbfd.h: Regenerated.
2004-07-27 14:20:49 +00:00
Nick Clifton 6cd7f07efc Regeneration accidentally omitted from previous delta 2004-07-27 11:40:24 +00:00
Nick Clifton 670ec21de9 Add CRX insns: pushx, popx
Add support to GAS for expressions which are the difference of two symbols
2004-07-27 11:37:12 +00:00