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
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
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
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
H.J. Lu
082b729701
bfd/
...
2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
* aout-adobe.c (aout_32_section_already_linked): Defined.
* aout-target.h (MY_section_already_linked): Likewise.
* aout-tic30.c (MY_section_already_linked): Likewise.
* binary.c (binary_section_already_linked): Likewise.
* bout.c (b_out_section_already_linked): Likewise.
* coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
* coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
* coffcode.h (coff_section_already_linked): Likewise.
* i386msdos.c (msdos_section_already_linked): Likewise.
* i386os9k.c (os9k_section_already_linked): Likewise.
* ieee.c (ieee_section_already_linked): Likewise.
* ihex.c (ihex_section_already_linked): Likewise.
* mach-o.c (bfd_mach_o_section_already_linked): Likewise.
* mmo.c (mmo_section_already_linked): Likewise.
* nlm-target.h (nlm_section_already_linked): Likewise.
* oasys.c (oasys_section_already_linked): Likewise.
* pef.c (bfd_pef_section_already_linked): Likewise.
* ppcboot.c (ppcboot_section_already_linked): Likewise.
* som.c (som_bfd_discard_group): Likewise.
* srec.c (srec_section_already_linked): Likewise.
* tekhex.c (tekhex_section_already_linked): Likewise.
* versados.c (versados_section_already_linked): Likewise.
* vms.c (vms_section_already_linked): Likewise.
* coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
* xsym.c (bfd_sym_section_already_linked): Likewise.
* bfd-in.h (bfd_section_already_linked_table_init): New.
(bfd_section_already_linked_table_free): Likewise.
* coff-rs6000.c (rs6000coff_vec): Add
_bfd_generic_section_already_linked.
(pmac_xcoff_vec): Likewise.
* coff64-rs6000.c (rs6000coff64_vec): Likewise.
(aix5coff64_vec): Likewise.
* elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
* elflink.c (_bfd_elf_section_already_linked): New function.
* elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
* libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
(_bfd_generic_section_already_linked): New.
(bfd_section_already_linked_hash_entry): Likewise.
(bfd_section_already_linked): Likewise.
(bfd_section_already_linked_table_lookup): Likewise.
(bfd_section_already_linked_table_insert): Likewise.
* linker.c (bfd_section_already_linked): New.
(_bfd_section_already_linked_table): Likewise.
(bfd_section_already_linked_table_lookup): Likewise.
(bfd_section_already_linked_table_insert): Likewise.
(already_linked_newfunc): Likewise.
(bfd_section_already_linked_table_init): Likewise.
(bfd_section_already_linked_table_free): Likewise.
(_bfd_generic_section_already_linked): Likewise.
* section.c (bfd_section): Remove comdat.
(bfd_comdat_info): Moved to ...
* bfd-in.h (coff_comdat_info): Here.
(bfd_coff_get_comdat_section): New.
* coffgen.c (bfd_coff_get_comdat_section): Likewise.
* libcoff-in.h (coff_section_tdata): Add comdat.
* coffcode.h (handle_COMDAT): Updated.
* cofflink.c (coff_link_add_symbols): Likewise.
* ecoff.c (bfd_debug_section): Likewise.
* targets.c (bfd_target): Add _section_already_linked.
(BFD_JUMP_TABLE_LINK): Updated.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
* libcoff.h: Likewise.
binutils/
2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
* objcopy.c (filter_symbols): Use bfd_coff_get_comdat_section
to access comdat.
* objdump.c (dump_section_header): Likewise.
ld/
2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
* ldlang.c (already_linked_hash_entry): Removed.
(already_linked): Likewise.
(already_linked_table): Likewise.
(section_already_linked): Call bfd_section_already_linked.
(lang_process): Replace already_linked_table_init with
bfd_section_already_linked_table_init and check return. Replace
already_linked_table_free with bfd_section_already_linked_table_free.
2004-07-21 15:42:58 +00:00
H.J. Lu
e56f61be75
bfd/
...
2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
* bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
DYN_NO_NEEDED.
(bfd_elf_get_dyn_lib_class): New prototype.
* elf.c (bfd_elf_get_dyn_lib_class): New function.
* elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
entry is needed. Issue an error if a DT_NEEDED entry is needed
for a file marked DYN_NO_NEEDED.
(elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
for DT_NEEDED tags.
* bfd-in2.h: Regenerated.
ld/
2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Also
check the add_needed field.
(dt_needed): New struct.
(gld${EMULATION_NAME}_try_needed): Change the first argument
to a pointer to struct dt_needed. Check the DYN_NO_ADD_NEEDED
bit in the file where the DT_NEEDED entry comes from.
(gld${EMULATION_NAME}_search_needed): Change the second
argument to a pointer to struct dt_needed.
(gld${EMULATION_NAME}_check_ld_so_conf): Updated.
(gld${EMULATION_NAME}_after_open): Likewise.
* ld.texinfo: Add --add-needed document.
* ldlang.c (new_afile): Set p->add_needed.
* ldlang.h (lang_input_statement_type): Add add_needed field.
* ldmain.h (add_needed): Declare.
* ldmain.c (add_needed): New global var.
* lexsup.c (option_values): Add OPTION_ADD_NEEDED and
OPTION_NO_ADD_NEEDED.
(ld_options): Likewise.
(parse_args): Handle them.
2004-07-19 16:40:52 +00:00
Nick Clifton
1fe1f39c06
Add new port: crx-elf
2004-07-07 17:28:53 +00:00
H.J. Lu
b602c853d8
bfd/
...
2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
* bfd.c (bfd_get_section_ident): New.
* elflink.c (elf_link_read_relocs_from_section): Call
bfd_get_section_ident to identify the section when reporting
error.
(_bfd_elf_link_output_relocs): Likewise.
(elf_link_output_extsym): Likewise.
(elf_link_input_bfd): Likewise.
(bfd_elf_gc_record_vtinherit): Likewise.
* bfd-in2.h: Regenerated.
ld/
2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
* ldmisc.c (vfinfo): Call bfd_get_section_ident to identify
the section.
2004-07-02 01:39:32 +00:00
Alan Modra
1a23a9e613
bfd/
...
* elf64-mmix.c (mmix_set_relaxable_size): Save original size in
rawsize.
(mmix_elf_perform_relocation): Adjust for above change.
(mmix_elf_relocate_section): Likewise.
(mmix_elf_relax_section): Likewise. Use output_section->rawsize.
(mmix_elf_get_section_contents): Delete.
(bfd_elf64_get_section_contents): Delete.
(mmix_elf_relocate_section): Zero stub area.
* linker.c (default_indirect_link_order): Alloc max of section size
and rawsize.
* simple.c (bfd_simple_get_relocated_section_contents): Likewise.
* section.c (bfd_malloc_and_get_section): Likewise.
(struct bfd_section): Update rawsize comment.
* bfd-in2.h: Regenerate.
ld/
* ldlang.c (lang_reset_memory_regions): Save last relax pass section
size in rawsize.
2004-06-29 14:13:47 +00:00
Alan Modra
075154045b
* bfd-in.h (bfd_get_section_limit): Define.
...
* reloc.c (bfd_perform_relocation, bfd_install_relocation)
(_bfd_final_link_relocate): Use bfd_get_section_limit.
* aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
* coff-arm.c (coff_arm_relocate_section): Likewise.
* coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
* cpu-ns32k.c (do_ns32k_reloc): Likewise.
(bfd_ns32k_final_link_relocate): Likewise.
* elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
* elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
* elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
(i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
* elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
(m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
* elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
* elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
* elf32-or32.c (or32_elf_consth_reloc): Likewise.
* elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
* elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
* elf32-sh.c (sh_elf_reloc_loop): Likewise.
* elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
(sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
* elf32-v850.c (v850_elf_reloc): Likewise.
* elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
* elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
* elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
* elf64-mips.c (mips_elf64_gprel32_reloc)
(mips16_gprel_reloc): Likewise.
* elf64-mmix.c (mmix_elf_reloc): Likewise.
* elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
* elf64-sparc.c (init_insn_reloc): Likewise.
* elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
* elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
(_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
(_bfd_mips_elf_generic_reloc): Likewise.
* bfd-in2.h: Regenerate.
2004-06-29 13:46:34 +00:00
Alan Modra
3722b82f10
* bfd-in.h (struct stab_info): Move from stabs.c.
...
* stabs.c (struct stab_link_includes_table): Delete.
(stab_link_includes_lookup): Delete.
(_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
level of indirection from sinfo parm.
(_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
stabstr section. Adjust hash table accesses.
* coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
alloc. Adjust stab_info test.
* cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
(_bfd_coff_final_link): Adjust stab_info test.
(_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
* elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
in place.
* libcoff-in.h (struct coff_link_hash_table): Likewise.
* elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
* elflink.c (bfd_elf_final_link): Don't attempt to link linker created
stabstr section. Adjust stab_info test.
* libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
(_bfd_write_stab_strings): Adjust prototypes.
* libbfd.h: Regenerate.
* libcoff.h: Regenerate.
* bfd-in2.h: Regenerate.
2004-06-28 13:57:59 +00:00
Nick Clifton
097f809a19
Add support for M32R GOT relocs
2004-06-25 16:11:09 +00:00
Alan Modra
eea6121ac0
bfd/
...
* section.c (struct sec): Rename "_cooked_size" to "size".
Rename "_raw_size" to "rawsize".
(STD_SECTION): Adjust comments.
(bfd_set_section_size, bfd_get_section_contents): Use size.
(bfd_malloc_and_get_section): New function.
* bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
* coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
Correctly free reloc and contents memory.
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
and fake CIE now that we can shink section size to zero.
(_bfd_elf_write_section_eh_frame): Likewise..
* elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
* elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
_bfd_stab_section_offset. Use _bfd_elf_section_offset.
* stabs.c (_bfd_stab_section_offset_): Remove unused args and
unneeded indirection.
* elf.c (_bfd_elf_section_offset): .. and update call.
* libbfd-in.h (_bfd_stab_section_offset): Update prototype.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
Replace occurrences of "_raw_size" and "_cooked_size" in most places
with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
sections. Use "rawsize", if non-zero, for bfd_get_section_contents
calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
Similarly use "rawsize", if non-zero, in reloc functions to validate
reloc addresses. Use new bfd_malloc_and_get_section in most places
where bfd_get_section_contents was called. Expand all occurrences of
bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
grok_prstatus and similar functions to "size".
* aix386-core.c (aix386_core_file_p): ..
* aix5ppc-core.c (xcoff64_core_p): ..
* aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
aout_adobe_set_section_contents): ..
* aout-target.h (callback): ..
* aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
MY_bfd_final_link): ..
* aoutf1.h (sunos4_core_file_p): ..
* aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
final_link, aout_link_input_section): ..
* binary.c (binary_object_p, binary_canonicalize_symtab,
binary_set_section_contents): ..
* bout.c (b_out_callback, b_out_write_object_contents,
b_out_set_section_contents, b_out_bfd_relax_section,
b_out_bfd_get_relocated_section_contents): ..
* cisco-core.c (cisco_core_file_validate): ..
* coff-alpha.c (alpha_ecoff_object_p,
alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
* coff-arm.c (coff_arm_relocate_section,
bfd_arm_allocate_interworking_sections): ..
* coff-h8300.c (h8300_reloc16_extra_cases,
h8300_bfd_link_add_symbols): ..
* coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
* coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
ppc_bfd_coff_final_link): ..
* coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
* coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
sh_align_loads, sh_coff_get_relocated_section_contents): ..
* coff64-rs6000.c (xcoff64_write_object_contents,
xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
* coffcode.h (coff_compute_section_file_positions,
coff_write_object_contents): ..
* coffgen.c (make_a_section_from_file, coff_write_symbols,
coff_section_symbol, build_debug_section): ..
* cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
process_embedded_commands, _bfd_coff_link_input_bfd,
_bfd_coff_write_global_sym): ..
* cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
* cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
* dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
* dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
_bfd_dwarf2_find_nearest_line): ..
* ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
ecoff_compute_section_file_positions,
_bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
_bfd_elf_discard_section_eh_frame_hdr,
_bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
_bfd_elf_write_section_eh_frame,
_bfd_elf_write_section_eh_frame_hdr): ..
* elf-hppa.h (elf_hppa_sort_unwind): ..
* elf-m10200.c (mn10200_elf_relax_section,
mn10200_elf_relax_delete_bytes,
mn10200_elf_get_relocated_section_contents): ..
* elf-m10300.c (_bfd_mn10300_elf_create_got_section,
mn10300_elf_check_relocs, mn10300_elf_relax_section,
mn10300_elf_relax_delete_bytes,
mn10300_elf_get_relocated_section_contents,
_bfd_mn10300_elf_adjust_dynamic_symbol,
_bfd_mn10300_elf_discard_copies,
_bfd_mn10300_elf_size_dynamic_sections,
_bfd_mn10300_elf_finish_dynamic_sections): ..
* elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
_bfd_elf_make_section_from_phdr, elf_fake_sections,
bfd_elf_set_group_contents, map_sections_to_segments,
elf_sort_sections, assign_file_positions_for_segments,
SECTION_SIZE, copy_private_bfd_data,
_bfd_elf_get_dynamic_reloc_upper_bound,
_bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
_bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
_bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
* elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
bfd_elf32_arm_process_before_allocation,
elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
elf32_arm_write_section): ..
* elf32-cris.c (cris_elf_grok_prstatus,
elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
cris_elf_check_relocs, elf_cris_size_dynamic_sections,
elf_cris_discard_excess_dso_dynamics,
elf_cris_discard_excess_program_dynamics): ..
* elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
* elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
* elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
_frv_create_got_section, _frvfdpic_assign_plt_entries,
elf32_frvfdpic_size_dynamic_sections,
elf32_frvfdpic_modify_segment_map,
elf32_frvfdpic_finish_dynamic_sections): ..
* elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
elf32_h8_get_relocated_section_contents): ..
* elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
elf32_hppa_finish_dynamic_sections): ..
* elf32-i370.c (i370_elf_adjust_dynamic_symbol,
i370_elf_size_dynamic_sections, i370_elf_check_relocs,
i370_elf_finish_dynamic_sections): ..
* elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
allocate_dynrelocs, elf_i386_size_dynamic_sections,
elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
* elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
* elf32-ip2k.c (ip2k_is_switch_table_128,
ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
ip2k_relax_switch_table_256, ip2k_elf_relax_section,
adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
* elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
allocate_dynrelocs, m32r_elf_size_dynamic_sections,
m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
m32r_elf_get_relocated_section_contents): ..
* elf32-m68hc11.c (m68hc11_elf_build_one_stub,
m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
m68hc11_elf_relax_delete_bytes): ..
* elf32-m68hc12.c (m68hc12_elf_build_one_stub,
m68hc12_elf_size_one_stub): ..
* elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
* elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
* elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
elf32_mips_grok_prstatus): ..
* elf32-or32.c (or32_elf_consth_reloc): ..
* elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
elf_create_pointer_linker_section, ppc_elf_create_linker_section,
ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
allocate_dynrelocs, ppc_elf_size_dynamic_sections,
ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
ppc_elf_final_write_processing): ..
* elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
allocate_dynrelocs, elf_s390_size_dynamic_sections,
elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
* elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
sh_elf_relax_delete_bytes, sh_elf_align_loads,
sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
* elf32-sh64-com.c (sh64_address_in_cranges,
sh64_get_contents_type): ..
* elf32-sh64.c (sh64_find_section_for_address,
sh64_elf_final_write_processing): ..
* elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
* elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
* elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
elf_vax_size_dynamic_sections, elf_vax_discard_copies,
elf_vax_instantiate_got_entries, elf_vax_relocate_section,
elf_vax_finish_dynamic_sections): ..
* elf32-xstormy16.c (xstormy16_elf_24_reloc,
xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
xstormy16_elf_finish_dynamic_sections): ..
* elf32-xtensa.c (xtensa_read_table_entries,
elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
get_relocation_opcode, retrieve_contents, find_relaxable_sections,
collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
relax_section, shrink_dynamic_reloc_sections, relax_property_section,
xtensa_callback_required_dependence): ..
* elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
* elf64-hppa.c (allocate_dynrel_entries,
elf64_hppa_size_dynamic_sections,
elf64_hppa_finish_dynamic_sections): ..
* elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
elf64_mips_grok_prstatus): ..
* elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
mmix_elf_relocate_section, mmix_elf_final_link,
mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
mmix_elf_relax_section, mmix_elf_get_section_contents): ..
* elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
ppc64_elf_build_stubs, ppc64_elf_relocate_section,
ppc64_elf_finish_dynamic_sections): ..
* elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
allocate_dynrelocs, elf_s390_size_dynamic_sections,
elf_s390_finish_dynamic_sections): ..
* elf64-sh64.c (sh_elf64_get_relocated_section_contents,
sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
sh64_elf64_finish_dynamic_sections): ..
* elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
sparc64_elf_finish_dynamic_symbol,
sparc64_elf_finish_dynamic_sections): ..
* elf64-x86-64.c (elf64_x86_64_grok_prstatus,
elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
elf64_x86_64_finish_dynamic_sections): ..
* elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
* elfcode.h (elf_slurp_reloc_table): ..
* elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
elf_finalize_dynstr, elf_link_add_object_symbols,
bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
* elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
elf32_mips_grok_prstatus): ..
* elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
elfNN_ia64_choose_gp, elfNN_ia64_final_link,
elfNN_ia64_finish_dynamic_sections): ..
* elfxx-mips.c (mips_elf_create_procedure_table,
mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
mips_elf_global_got_index, mips_elf_multi_got,
mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
mips_elf_allocate_dynamic_relocations,
mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
_bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
_bfd_mips_elf_always_size_sections,
_bfd_mips_elf_size_dynamic_sections,
_bfd_mips_elf_finish_dynamic_symbol,
_bfd_mips_elf_finish_dynamic_sections,
_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
_bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
_bfd_elf_mips_get_relocated_section_contents,
_bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
* hp300hpux.c (callback): ..
* hppabsd-core.c (make_bfd_asection): ..
* hpux-core.c (make_bfd_asection): ..
* i386linux.c (linux_link_create_dynamic_sections,
bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
* i386msdos.c (msdos_write_object_contents): ..
* i386os9k.c (os9k_callback, os9k_write_object_contents,
os9k_set_section_contents): ..
* ieee.c (parse_expression, ieee_slurp_external_symbols,
ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
ieee_write_section_part, do_with_relocs, do_as_repeat,
do_without_relocs, ieee_write_debug_part, init_for_output,
ieee_set_section_contents): ..
* ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
* irix-core.c (do_sections, make_bfd_asection): ..
* libaout.h (aout_section_merge_with_text_p): ..
* libbfd.c (_bfd_generic_get_section_contents,
_bfd_generic_get_section_contents_in_window): ..
* linker.c (default_indirect_link_order): ..
* lynx-core.c (make_bfd_asection): ..
* m68klinux.c (linux_link_create_dynamic_sections,
bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
* mach-o.c (bfd_mach_o_make_bfd_section,
bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
bfd_mach_o_scan_read_segment): ..
* merge.c (_bfd_add_merge_section, record_section, merge_strings,
_bfd_merge_sections): ..
* mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
mmo_map_set_sizes, mmo_canonicalize_symtab,
mmo_internal_write_section, mmo_write_object_contents): ..
* netbsd-core.c (netbsd_core_file_p): ..
* nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
nlm_alpha_set_public_section): ..
* nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
* nlm32-sparc.c (nlm_sparc_write_import): ..
* nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
nlm_compute_section_file_positions): ..
* oasys.c (oasys_object_p, oasys_slurp_section_data,
oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
* opncls.c (get_debug_link_info): ..
* osf-core.c (make_bfd_asection): ..
* pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
final_link, aout_link_input_section): ..
* peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
* pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
* ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
* ptrace-core.c (ptrace_unix_core_file_p): ..
* reloc.c (bfd_perform_relocation, bfd_install_relocation,
_bfd_final_link_relocate, bfd_generic_relax_section,
bfd_generic_get_relocated_section_contents): ..
* reloc16.c (bfd_coff_reloc16_relax_section,
bfd_coff_reloc16_get_relocated_section_c): ..
* riscix.c (riscix_some_aout_object_p): ..
* rs6000-core.c (read_hdr, make_bfd_asection): ..
* sco5-core.c (make_bfd_asection): ..
* simple.c (bfd_simple_get_relocated_section_contents): ..
* som.c (som_object_setup, setup_sections, som_prep_headers,
som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
som_set_reloc_info, som_get_section_contents,
som_bfd_link_split_section): ..
* sparclinux.c (linux_link_create_dynamic_sections,
bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
* srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
* stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
_bfd_write_stab_strings, _bfd_stab_section_offset): ..
* sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
sunos_finish_dynamic_link): ..
* syms.c (_bfd_stab_section_find_nearest_line): ..
* tekhex.c (first_phase, tekhex_set_section_contents,
tekhex_write_object_contents): ..
* trad-core.c (trad_unix_core_file_p): ..
* versados.c (process_esd, process_otr, process_otr): ..
* vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
* vms-misc.c (add_new_contents): ..
* vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
* vms.c (vms_set_section_contents): ..
* xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
_bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
* xsym.c (bfd_sym_scan): .. See above.
binutils/
* objcopy.c (copy_section): Don't set _cooked_size.
include/
* bfdlink.h (struct bfd_link_order): Update comment.
ld/
* ldlang.c (print_output_section_statement): Don't print size before
relaxation.
(IGNORE_SECTION): Remove bfd arg. Update all callers.
* ldexp.c (fold_name): .. See below.
* ldlang.c (section_already_linked, print_output_section_statement,
print_input_section, insert_pad, size_input_section,
lang_check_section_addresses, lang_size_sections_1,
lang_size_sections, lang_do_assignments_1, lang_set_startof,
lang_one_common, lang_reset_memory_regions, lang_process,
lang_abs_symbol_at_end_of, lang_do_version_exports_section): ..
* ldwrite.c (build_link_order, clone_section, ds, split_sections): ..
* pe-dll.c (process_def_file, generate_reloc): ..
* emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment,
gld${EMULATION_NAME}_before_allocation): ..
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): ..
* emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation,
sh64_elf_${EMULATION_NAME}_after_allocation): ..
* emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): ..
* emultempl/xtensaelf.em (ld_assign_relative_paged_dot,
ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use
"size" instead of "_raw_size" and "_cooked_size". Expand
bfd_section_size macro invocations.
2004-06-24 04:46:28 +00:00
Jerome Guitton
02d5a37b2d
* bfd-in.h (bfd_cache_close_all): New function declaration.
...
* bfd-in2.h: Regenerate.
* cache.c (bfd_cache_close_all): New function definition.
2004-06-17 11:47:51 +00:00
Alan Modra
911d08a746
* section.c (struct sec): Remove usused flags. Reorganize a little.
...
(bfd_get_section_size_before_reloc): Delete.
(bfd_get_section_size_after_reloc): Delete.
(STD_SECTION): Update.
(bfd_get_section_size_now): Delete.
(bfd_set_section_contents): Don't referece reloc_done.
(bfd_get_section_contents): Remove reloc_done comment.
* bout.c (b_out_bfd_get_relocated_section_contents): Don't set
reloc_done.
* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
* ecoff.c (bfd_debug_section): Update initializer.
* elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
* bfd-in.h (bfd_section_size): Expand.
(bfd_get_section_size): New macro.
* bfd-in2.h: Regenerate.
* coff64-rs6000.c (xcoff64_write_object_contents): Replace
bfd_get_section_size_before_reloc with bfd_get_section_size.
* coffcode.h (coff_write_object_contents): Likewise.
* coffgen.c (build_debug_section): Likewise.
* dwarf1.c (parse_line_table): Likewise.
(_bfd_dwarf1_find_nearest_line): Likewise.
* ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
* i386msdos.c (msdos_write_object_contents): Likewise.
* pdp11.c (squirt_out_relocs): Likewise.
* elf32-sh64.c (sh64_find_section_for_address): Remove comment.
* elf64-mmix.c (mmix_elf_final_link): Update comment.
2004-06-15 01:24:22 +00:00
Joern Rennecke
f6f9408fbf
2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
...
bfd:
* Makefile.am: Regenerate dependencies.
* Makefile.in: Regenerate.
* archures.c: Add bfd_mach_sh3_nommu .
* bfd-in2.h: Regenerate.
* cpu-sh.c: Add sh3-nommu architecture.
(bfd_to_arch_table): Create new table.
(sh_get_arch_from_bfd_mach): Create new function.
(sh_get_arch_up_from_bfd_mach): Create new function.
(sh_merge_bfd_arch): Create new function.
* elf32-sh.c (sh_ef_bfd_table): Add table.
(sh_elf_check_relocs): Replace switch statement with
use of sh_ef_bfd_table .
(sh_elf_get_flags_from_mach): Add new function.
(sh_find_elf_flags): Likewise.
(sh_elf_copy_private_data): Replace most of non-elf contents
with a call to sh_merge_bfd_arch() .
gas:
* Makefile.am: Regenerate dependecies.
* Makefile.in: Regenerate.
* config/tc-sh.c (valid_arch): Make unsigned.
(preset_target_arch): Likewise.
(md_begin): Use new architecture flags system.
(get_specific): Likewise.
(assemble_ppi): Likewise.
(md_assemble): Likewise. Also fix error check for bad opcodes.
(md_parse_option): Likewise. Also generate -isa values according
to the table in bfd/cpu-sh.c instead of just constants. Also
allow <arch>-up ISA variants.
(sh_elf_final_processing): Replace if-else chain with a call to
sh_find_elf_flags().
* testsuite/gas/sh/arch: New directory.
* testsuite/gas/sh/arch/arch.exp: New test script.
* testsuite/gas/sh/arch/arch_expected.txt: New file.
* testsuite/gas/sh/arch/sh.s: New file.
* testsuite/gas/sh/arch/sh2.s: New file.
* testsuite/gas/sh/arch/sh-dsp.s: New file.
* testsuite/gas/sh/arch/sh2e.s: New file.
* testsuite/gas/sh/arch/sh3-nommu.s: New file.
* testsuite/gas/sh/arch/sh3.s: New file.
* testsuite/gas/sh/arch/sh3-dsp.s: New file.
* testsuite/gas/sh/arch/sh3e.s: New file.
* testsuite/gas/sh/arch/sh4-nommu-nofpu.s: New file.
* testsuite/gas/sh/arch/sh4-nofpu.s: New file.
* testsuite/gas/sh/arch/sh4.s: New file.
* testsuite/gas/sh/arch/sh4a-nofpu.s: New file.
* testsuite/gas/sh/arch/sh4al-dsp.s: New file.
* testsuite/gas/sh/arch/sh4a.s: New file.
include/elf:
* sh.h (EF_SH_HAS_DSP): Remove.
(EF_SH_HAS_FP): Remove.
(EF_SH_MERGE_MACH): Remove.
(EF_SH4_NOFPU): Convert to decimal.
(EF_SH4A_NOFPU): Likewise.
(EF_SH4_NOMMU_NOFPU): Likewise.
(EF_SH3_NOMMU): Add new macro.
(EF_SH_BFD_TABLE): Likewise.
(sh_find_elf_flags): Add prototype.
(sh_elf_get_flags_from_mach): Likewise.
opcodes:
* sh-dis.c (target_arch): Make unsigned.
(print_insn_sh): Replace (most of) switch with a call to
sh_get_arch_from_bfd_mach(). Also use new architecture flags system.
* sh-opc.h: Redefine architecture flags values.
Add sh3-nommu architecture.
Reorganise <arch>_up macros so they make more visual sense.
(SH_MERGE_ARCH_SET): Define new macro.
(SH_VALID_BASE_ARCH_SET): Likewise.
(SH_VALID_MMU_ARCH_SET): Likewise.
(SH_VALID_CO_ARCH_SET): Likewise.
(SH_VALID_ARCH_SET): Likewise.
(SH_MERGE_ARCH_SET_VALID): Likewise.
(SH_ARCH_SET_HAS_FPU): Likewise.
(SH_ARCH_SET_HAS_DSP): Likewise.
(SH_ARCH_UNKNOWN_ARCH): Likewise.
(sh_get_arch_from_bfd_mach): Add prototype.
(sh_get_arch_up_from_bfd_mach): Likewise.
(sh_get_bfd_mach_from_arch_set): Likewise.
(sh_merge_bfd_arc): Likewise.
ld:
* testsuite/ld-sh/arch/arch.exp: New test script.
* testsuite/ld-sh/arch/arch_expected.txt: New file.
* testsuite/ld-sh/arch/sh.s: New file.
* testsuite/ld-sh/arch/sh2.s: New file.
* testsuite/ld-sh/arch/sh-dsp.s: New file.
* testsuite/ld-sh/arch/sh2e.s: New file.
* testsuite/ld-sh/arch/sh3-nommu.s: New file.
* testsuite/ld-sh/arch/sh3.s: New file.
* testsuite/ld-sh/arch/sh3-dsp.s: New file.
* testsuite/ld-sh/arch/sh3e.s: New file.
* testsuite/ld-sh/arch/sh4-nommu-nofpu.s: New file.
* testsuite/ld-sh/arch/sh4-nofpu.s: New file.
* testsuite/ld-sh/arch/sh4.s: New file.
* testsuite/ld-sh/arch/sh4a-nofpu.s: New file.
* testsuite/ld-sh/arch/sh4al-dsp.s: New file.
* testsuite/ld-sh/arch/sh4a.s: New file.
2004-05-28 12:32:10 +00:00
Nick Clifton
2d643429de
Add --hash-size switch to the linker
2004-05-21 15:38:04 +00:00
Bob Wilson
80fccad2d4
binutils ChangeLog:
...
2004-05-17 David Heine <dlheine@tensilica.com>
* objcopy.c (setup_bfd_headers): New function.
(copy_object): Call setup_bfd_headers.
bfd ChangeLog:
2004-05-17 David Heine <dlheine@tensilica.com>
* aout-target.h (MY_bfd_copy_private_header_data): Define.
* aout-tic30.c (MY_bfd_copy_private_header_data): Define.
* bfd.c (bfd_copy_private_header_data): Define.
* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
interface.
* coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
* coffcode.h (coff_bfd_copy_private_header_data): Define.
* elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
* elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
segments by calling copy_private_bfd_data.
(_bfd_elf_copy_private_header_data): Define.
* elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
* libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
* libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
* mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
* mmo.c (mmo_bfd_copy_private_header_data): Define.
* ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
* som.c (som_bfd_copy_private_header_data): Define.
* targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
* vms.c (vms_bfd_copy_private_header_data): Define.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
2004-05-17 16:40:01 +00:00
Nick Clifton
6b6e92f432
Add support for 521x,5249,547x,548x.
2004-05-05 14:33:14 +00:00
H.J. Lu
fafe6678a5
bfd/
...
2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
* section.c (bfd_get_section_by_name_if): New.
* bfd-in2.h: Regenerated.
gas/
2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
* config/obj-elf.c (get_section): Return bfd_boolean.
(obj_elf_change_section): Call bfd_get_section_by_name_if
instead of bfd_map_over_sections.
2004-05-02 14:36:25 +00:00
H.J. Lu
bc87dd2ec1
2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
...
* section.c (bfd_sections_find_if): New.
* bfd-in2.h: Regenerated.
2004-04-30 15:01:15 +00:00
Alan Modra
72adc23045
* section.c (bfd_make_section_anyway): Add all sections to hash tab.
...
* elf-bfd.h (bfd_elf_is_group_section): Declare.
* elf.c (bfd_elf_is_group_section): New function.
* elfxx-target.h (bfd_elfNN_bfd_is_group_section
* section.c (bfd_generic_is_group_section): New function.
* targets.c (struct bfd_target): Add _bfd_is_group_section field.
(BFD_JUMP_TABLE_LINK): Adjust.
* aout-adobe.c (aout_32_bfd_is_group_section): Define.
* aout-target.h (MY_bfd_is_group_section): Define.
* aout-tic30.c (MY_bfd_is_group_section): Define.
* bfd.c (bfd_is_group_section): Define.
* binary.c (binary_bfd_is_group_section): Define.
* bout.c (b_out_bfd_is_group_section): Define.
* coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
* coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
* coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
* coffcode.h (coff_bfd_is_group_section): Define.
* i386msdos.c (msdos_bfd_is_group_section): Define.
* i386os9k.c (os9k_bfd_is_group_section): Define.
* ieee.c (ieee_bfd_is_group_section): Define.
* ihex.c (ihex_bfd_is_group_section): Define.
* libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
* mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
* mmo.c (mmo_bfd_is_group_section): Define.
* nlm-target.h (nlm_bfd_is_group_section): Define.
* oasys.c (oasys_bfd_is_group_section): Define.
* pef.c (bfd_pef_bfd_is_group_section): Define.
* ppcboot.c (ppcboot_bfd_is_group_section): Define.
* srec.c (srec_bfd_is_group_section): Define.
* tekhex.c (tekhex_bfd_is_group_section): Define.
* versados.c (versados_bfd_is_group_section): Define.
* vms.c (vms_bfd_is_group_section): Define.
* xsym.c (bfd_sym_bfd_is_group_section): Define.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
2004-04-30 14:23:40 +00:00
Chris Demetriou
3e722fb54b
[ bfd/ChangeLog ]
...
2004-04-28 Chris Demetriou <cgd@broadcom.com>
* reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
* bfd-in2.h: Regenerate.
* libbfd.h: Likewise.
[ gas/ChangeLog ]
2004-04-28 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (HAVE_32BIT_ADDRESSES, append_insn, macro_build)
(load_address, macro, mips_ip, md_parse_option)
(mips_force_relocation, mips_validate_fix, md_apply_fix3)
(s_change_sec, pic_need_relax, tc_gen_reloc): Remove all
embedded-PIC handling, and update comments.
(SWITCH_TABLE): Remove.
* config/tc-mips.h (DIFF_EXPR_OK): Delete.
(enum mips_pic_level): Remove EMBEDDED_PIC.
(EXTERN_FORCE_RELOC): Remove embedded-PIC handling.
(TC_FORCE_RELOCATION): Update comment.
* ecoff.c (ecoff_build_lineno): Add comment about some code that
might be safe to remove now that MIPS embedded-PIC is gone.
2004-04-29 05:14:22 +00:00
Jakub Jelinek
4c45e5c9ce
bfd/
...
* bfd.c (bfd_get_synthetic_symtab): Define.
* targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
NAME##_get_synthetic_symtab.
(struct bfd_target): Add _bfd_get_synthetic_symtab.
* libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
* elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
relplt_name fields.
(_bfd_elf_get_synthetic_symtab): New prototype.
* elfcode.h (elf_get_synthetic_symtab): Define.
* elf.c (_bfd_elf_get_synthetic_symtab): New function.
* elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
(elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
(elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
* elf32-i386.c (elf_i386_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
* elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
* elf32-s390.c (elf_s390_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
* elf64-s390.c (elf_s390_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
* elf32-sparc (elf32_sparc_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
* elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
* elf32-ppc.c (ppc_elf_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
* aout-target.h (MY_get_synthetic_symtab): Define.
* aout-tic30.c (MY_get_synthetic_symtab): Define.
* coff-rs6000.c (rs6000coff_vec): Add
_bfd_nodynamic_get_synthetic_symtab.
(pmac_xcoff_vec): Likewise.
* coff64-rs6000.c (rs6000coff64_vec): Add
_bfd_nodynamic_get_synthetic_symtab.
(aix5coff64_vec): Likewise.
* sunos.c (MY_get_synthetic_symtab): Define.
* vms.c (vms_get_synthetic_symtab): Define.
binutils/
* objdump.c (synthsyms, synthcount): New variables.
(disassemble_data): Use dynsyms for stripped binaries or libraries.
Add synthetized symbols.
(dump_bfd): For disassemble, initialize dynsyms always and
also synthsyms. Free synthsyms and clear {sym,dynsym,synth}count
before returning.
2004-04-22 14:45:32 +00:00
Nick Clifton
fd99574ba5
Add support for ColdFire MAC instructions and tidy up support for other m68k
...
variants.
2004-04-22 10:33:16 +00:00
Chris Demetriou
23867d6732
[ bfd/ChangeLog ]
...
2004-04-21 Chris Demetriou <cgd@broadcom.com>
* coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
* bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
(bfd_mips_elf32_create_embedded_relocs): Remove prototypes
* bfd-in2.h: Regenerate.
[ ld/ChangeLog ]
2004-04-21 Chris Demetriou <cgd@broadcom.com>
* ld.texinfo: Remove MIPS --embedded-relocs documentation.
* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
* emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
(EXTRA_EM_FILE): Use mipsecoff.em
* emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
(EXTRA_EM_FILE): Use mipsecoff.em
* emultempl/mipsecoff.em: Restructure to be included as an
extra emulation file.
(check_sections, gld${EMULATION_NAME}_after_open)
(gld${EMULATION_NAME}_after_allocation)
(gld${EMULATION_NAME}_get_script)
(ld_${EMULATION_NAME}_emulation): Remove
(gld${EMULATION_NAME}_before_parse): Rename to...
(mipsecoff_before_parse): This.
(LDEMUL_BEFORE_PARSE): Define.
* emultempl/mipself.em: Remove file.
* scripttempl/mips.sc (.rel.sdata): Do not include in output.
(__runtime_reloc_start, __runtime_reloc_stop): Stop providing
these symbols.
* Makefile.am: Remove dependencies on emultempl/mipself.em.
* Makefile.in: Regenerate.
[ ld/testsuite/ChangeLog ]
2004-04-21 Chris Demetriou <cgd@broadcom.com>
* ld-empic/run.c: Removed as part of MIPS --embedded-relocs removal.
* ld-empic/empic.exp: Likewise.
* ld-empic/relax.t: Likewise.
* ld-empic/relax1.c: Likewise.
* ld-empic/relax2.c: Likewise.
* ld-empic/relax3.c: Likewise.
* ld-empic/relax4.c: Likewise.
* ld-empic/runtest1.c: Likewise.
* ld-empic/runtest2.c: Likewise.
* ld-empic/runtesti.s: Likewise.
* ld-mips-elf/empic1-ln.d: Likewise.
* ld-mips-elf/empic1-lp.d: Likewise.
* ld-mips-elf/empic1-mn.d: Likewise.
* ld-mips-elf/empic1-mp.d: Likewise.
* ld-mips-elf/empic1-ref.s: Likewise.
* ld-mips-elf/empic1-sn.d: Likewise.
* ld-mips-elf/empic1-sp.d: Likewise.
* ld-mips-elf/empic1-space.s: Likewise.
* ld-mips-elf/empic1-tgt.s: Likewise.
* ld-mips-elf/empic2-fwd-0.d: Likewise.
* ld-mips-elf/empic2-fwd-1.d: Likewise.
* ld-mips-elf/empic2-fwd-tgt.s: Likewise.
* ld-mips-elf/empic2-ref.s: Likewise.
* ld-mips-elf/empic2-rev-0.d: Likewise.
* ld-mips-elf/empic2-rev-1.d: Likewise.
* ld-mips-elf/empic2-rev-tgt.s: Likewise.
* ld-mips-elf/empic2-space.s: Likewise.
* ld-mips-elf/emrelocs-eb.d: Likewise.
* ld-mips-elf/emrelocs-el.d: Likewise.
* ld-mips-elf/emrelocs.ld: Likewise.
* ld-mips-elf/emrelocs1.s: Likewise.
* ld-mips-elf/emrelocs2.s: Likewise.
* ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
2004-04-21 20:52:31 +00:00
Andrew Cagney
40838a725a
2004-04-21 Andrew Cagney <cagney@redhat.com>
...
* opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
(struct opncls, opncls_btell, opncls_bseek, opncls_bread)
(opncls_bwrite, opncls_bclose, opncls_bflush)
(opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
bfd iovec that uses function callbacks.
(bfd_close): Use the iovec's bclose.
* cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
(cache_bclose, cache_bflush, cache_bstat)
(cache_iovec): New functions and global variable, implement a
cache "iovec", where applicable set bfd_error.
(bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
* bfdio.c (struct bfd_iovec): Define.
(real_read): Delete function.
(bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
(bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
assume that bread and bwrite set bfd_error.
* bfd.c (struct bfd): Add "iovec", update comments.
* bfd-in2.h, libbfd.h: Re-generate.
2004-04-21 17:05:12 +00:00
Nick Clifton
6482c264f4
Add support for a .secrel32 x86 reloc to allow DWARF" debug information to used
...
with COFF based x86 ports.
2004-04-20 12:17:16 +00:00
Paul Brook
e489d0aef7
* bfd/bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
...
* bfd/elf32-arm.h (struct elf32_elf_section_map): New.
(struct _arm_elf_section_data): New.
(elf32_arm_section_data): Define.
(struct elf32_arm_link_hash_table): Add byteswap_code.
(elf32_arm_link_hash_table_create): Initialize byteswap_code.
(bfd_elf32_arm_process_before_allocation): Add byteswap_code.
(elf32_arm_post_process_headers): Set EF_ARM_BE8.
(elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
(bfd_elf32_new_section_hook, elf_backend_write_section,
elf_backend_link_output_symbol_hook): Define.
* ld/emultempl/armelf.em (byteswap_code): Add.
(arm_elf_before_allocation): Pass extra parameter.
(PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
(PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
* ld/emultempl/armelf_oabi.em: Pass extra parameter.
* ld/ld.texinfo: Document --be8.
2004-04-01 11:20:04 +00:00
Nick Clifton
0949843db2
Add (linker) support for CR16C processor
2004-03-30 14:04:32 +00:00
Alan Modra
c152c7961c
* Makefile.am: Remove all mention of elflink.h.
...
* Makefile.in: Regenerate.
* bfd-in.h (bfd_elf_discard_info): Declare.
(bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
* bfd-in2.h: Regenerate.
* elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
bfd_elf32_link_record_dynamic_symbol,
bfd_elf64_link_record_dynamic_symbol,
_bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
_bfd_elf32_link_record_local_dynamic_symbol,
_bfd_elf64_link_record_local_dynamic_symbol,
_bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
_bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
_bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
_bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
_bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
_bfd_elf32_reloc_symbol_deleted_p,
_bfd_elf64_reloc_symbol_deleted_p): Delete.
(bfd_elf_link_record_dynamic_symbol,
bfd_elf_link_record_local_dynamic_symbol,
bfd_elf_final_link, bfd_elf_gc_sections,
bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
bfd_elf_reloc_symbol_deleted_p): Declare.
(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
* elf32-arm.h: Update for changed function names. Remove local
WILL_CALL_FINISH_DYNAMIC_SECTION define.
* elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
* elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
* elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
* elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
* elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
* elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
* elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
* elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
* elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
(bfd_elfNN_print_symbol): Define.
* elfcode.h: Don't include elflink.h.
(elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
elf_gc_record_vtinherit, elf_gc_record_vtentry,
elf_link_record_local_dynamic_symbol): Don't define.
* elflink.c: Update for changed function names. Move elflink.h
code here.
* elflink.h: Delete file.
* po/SRC-POTFILES.in: Regenerate.
* po/bfd.pot: Regenerate.
doc/
* bfdint.texi: Remove all mention of elflink.h.
2004-03-27 10:58:09 +00:00
Alan Modra
11c251f45d
missed files in last commit
2004-03-26 04:42:57 +00:00
Alan Modra
4a43e768f1
bfd/
...
* elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
dyn_lib_class field. Rearrange for better packing.
(elf_dt_soname): Delete.
(elf_dyn_lib_class): Define.
* elf.c (bfd_elf_set_dt_needed_name): Update comment.
(bfd_elf_set_dt_needed_soname): Delete.
(bfd_elf_set_dyn_lib_class): New function.
* elflink.h (add_dt_needed_tag): New function. Split out from..
(elf_link_add_object_symbols): ..here. Rename "name" to "soname".
Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
initialization of soname.
(elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
elf_dt_soname.
* bfd-in.h (enum dynamic_lib_link_class): New.
(bfd_elf_set_dt_needed_soname): Delete.
(bfd_elf_set_dyn_lib_class): Declare.
* bfd-in2.h: Regenerate.
ld/
* ld.texinfo: Add --as-needed doco.
* ldmain.c (as_needed): New global var.
* ldmain.h (as_needed): Declare.
* lexsup.c (option_values): Add OPTION_AS_NEEDED and
OPTION_NO_AS_NEEDED.
(ld_options): Likewise.
(parse_args): Handle them.
* ldlang.h (lang_input_statement_type): Add as_needed field.
* ldlang.c (new_afile): Set p->as_needed.
* emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
(gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
(ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
* ldlang.c (open_input_bfds): Remove useless cast.
(lang_do_assignments_1): Likewise.
(lang_for_each_input_section): Delete.
2004-03-18 12:50:20 +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
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
Richard Sandiford
676a64f422
Add fr450 support.
2004-03-01 10:11:46 +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
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
Nick Clifton
28d39d1a3a
Stop indexed move byte instructions from being relaxed.
2004-01-21 11:17:53 +00:00
Alexandre Oliva
5153284539
2003-12-17 Alexandre Oliva <aoliva@redhat.com>
...
* elf32-frv.c (_frv_osec_readonly_p): New.
(_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
undefweak symbol.
(_frv_count_got_plt_entries): Adjust expected count accordingly.
(elf32_frv_relocate_section): Likewise. Error out if attempting
to emit rofixups or dynamic relocs in read-only segments. Use
_bfd_elf_section_offset to adjust r_offsets in rofixups and
dynamic relocations.
2003-12-12 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
relocations or fixups involving merged sections correctly. Avoid
crash when undefined symbol is referenced by R_FRV_32 or
R_FRV_FUNCDESC_VALUE.
2003-12-02 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
input section holding local symbol to addend of R_FRV_32 or
R_FRV_FUNCDESC_VALUE dynamic relocation.
2003-11-27 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
(elf32_frv_always_size_sections): Don't store pointer to
__stacksize symbol in sec_info.
(elf32_frv_modify_segment_map): Look it up here.
2003-11-26 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
of the lazy PLT entry, not only its offset, as the low word of a
function descriptor.
2003-11-10 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
if a hash table entry already exists but is not a definition.
2003-11-05 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
(_frv_add_rofixup): Don't inline.
(_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
for undefweak symbols.
(elf32_frv_relocate_section): Avoid crash while computing
relocation when linking with shared library. Only emit rofixups
and dynamic relocations for alloc&load sections. Mark binaries
with inter-segment relocations for relocation as a unit.
(_frv_create_got_section): Rename .rofixup.got to .rofixup.
(DEFAULT_STACK_SIZE): New.
(_frv_count_got_plt_entries): Fix thinko in deciding whether to
emit rofixups or dynamic relocs when linking dynamic non-PIE
executables.
(elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
shared libs too. Reserve the last entry for the GOT pointer.
(elf32_frv_finish_dynamic_sections): Emit it.
(elf32_frv_always_size_sections): New.
(elf32_frv_modify_segment_map): New.
(elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
sections.
(frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
(frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
(elf_backend_always_size_sections): New.
(elf_backend_modify_segment_map): New.
2003-10-31 Alexandre Oliva <aoliva@redhat.com>
* config.bfd: Added frv-*-*linux*.
* elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
ABS section, instead of crashing.
(elf32_frv_relocate_section): Don't crash before warning about
different segments in non-PIC relocation.
2003-10-17 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
relocs to undefweak symbols.
(elf32_frv_relocate_section): Ditto for undefined symbols.
2003-10-06 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
gotfixup section was created.
2003-09-30 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_howto_table): Change GOT12,
FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
complain_overflow_signed.
* elf32-frv.c (_frv_add_rofixup): Do not error out if contents
have not been allocated.
(_frv_emit_got_relocs_plt_entries): Return non-void. Assert
privfd only if dynamic sections were created.
(elf32_frv_relocate_section): Compute gprel_segment, and use it
for GPREL relocs. When linking relocatable FDPIC executables,
emit warnings for relocations that would be illegal on PIE or
shared libraries. Emit rofixup for R_FRV_32 only if input object
is not FDPIC.
(_frv_create_got_section): Define _gp symbol in the rofixup
section.
(elf32_frv_finish_dynamic_sections): If rofixups needed but
dynamic sections missing, error out requesting -melf32frvfd.
2003-09-19 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
computation of addends from section and global or local symbol
value. Change return type to bfd_boolean, and return a failure if
a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
nonzero addend is required.
(elf32_frv_relocate_section): Likewise. Print error for
unsupported nonzero addends.
2003-09-18 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
force everything local.
(_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
* elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
(frv_gotfixup_section): New.
(FRV_SYM_LOCAL): Accept undefweak and local common symbols.
(struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
and relocsfdv.
(_frv_add_rofixup): New.
(_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
improve some ugly conditions.
(elf32_frv_relocate_section): Likewise. Reject inter-segment
relocations in fdpic.
(_frv_create_got_section): Create .rofixup.got section.
(struct _frv_dynamic_got_info): Added fixups.
(_frv_count_got_plt_entries): Account in-GOT relocations into
relocs32, relocsfd and relocsfdv. Account them into relocs or
fixups, as appropriate.
(elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
sizing of gotrel.
(elf32_frv_finish_dynamic_sections): Verify that the right number
of relocations and fixups was generated.
(elf32_frv_check_relocs): Compute relocs32, relocsfd and
relocsfdv.
* elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
(FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
descriptor of a (formerly-)global symbol is local.
(struct frv_pic_relocs_info): Adjust comments.
(_frv_emit_got_relocs_plt_entries): Adjust.
(elf32_frv_relocate_section): Likewise.
(_frv_count_got_plt_entries): Likewise.
* elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
symbol's value to addend in the common preamble. Decay dynamic
symbols to section+offset if they bind or call locally, for GOT
and FUNCDESC_VALUE, respectively.
(elf32_frv_relocate_section): Likewise.
(elf32_frv_check_relocs): Don't register as dynamic symbols of
internal or hidden visibility.
2003-09-17 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
argument, so as to not call _bfd_elf_rel_local_sym to compute it.
(elf32_frv_relocate_section): Pass relocation addend in. Use
original relocation addend to look up the got relocs/plt entries
table. Do not call _bfd_elf_rel_local_sym. Don't error out when
processing relocations that reference .scommon symbols.
2003-09-15 Alexandre Oliva <aoliva@redhat.com>
Introduce support for dynamic linking.
* elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
(elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
(frv_reloc_type_lookup): Return REL howtos for executables and
dynamic libraries.
(frv_info_to_howto_rel): New.
(struct frv_elf_link_hash_table): New.
(frv_hash_table, frv_got_section, frv_gotrel_section,
frv_plt_section, frv_pltrel_section, frv_relocs_info,
frv_got_initial_offset, frv_plt_initial_offset): New macros.
(frv_elf_link_hash_table_create): New.
(struct frv_pic_relocs_info): New.
(frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
(frv_pic_relocs_info_find): New.
(frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
New.
(FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
(_frv_add_dyn_reloc, _frv_osec_to_segment): New.
(_frv_emit_got_relocs_plt_entries): New.
(elf32_frv_relocate_section): Add support for dynamic linking.
Handle new relocations.
(_frv_create_got_section): New.
(elf32_frv_create_dynamic_sections): New.
(ELF_DYNAMIC_INTERPRETER): New.
(struct _frv_dynamic_got_info): New.
(_frv_count_got_plt_entries): New.
(struct _frv_dynamic_got_plt_info): New.
(_frv_compute_got_alloc_data): New.
(_frv_get_got_entry, _frv_get_fd_entry): New.
(_frv_assign_got_entries, _frv_assign_plt_entries): New.
(_frv_resolve_final_relocs_info): New.
(elf32_frv_size_dynamic_sections): New.
(elf32_frv_finish_dynamic_sections): New.
(elf32_frv_adjust_dynamic_symbol): New.
(elf32_frv_finish_dynamic_symbol): New.
(elf32_frv_check_relocs): Handle new relocs. Explain how the
whole thing works.
(elf_info_to_howto_rel): Define.
(bfd_elf32_bfd_link_hash_table_create): Define.
(elf_backend_create_dynamic_sections): Define.
(elf_backend_adjust_dynamic_symbol): Define.
(elf_backend_size_dynamic_sections): Define.
(elf_backend_finish_dynamic_symbol): Define.
(elf_backend_finish_dynamic_sections): Define.
(elf_backend_want_got_sym): Define.
(elf_backend_got_header_size): Define.
(elf_backend_want_got_plt): Define.
(elf_backend_plt_readonly): Define.
(elf_backend_want_plt_sym): Define.
(elf_backend_plt_header_size): Define.
(elf_backend_may_use_rel_p): Define.
(elf_backend_may_use_rela_p): Define.
(elf_backend_default_use_rela_p): Define.
2003-08-08 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
(frv_reloc_map): Map the corresponding BFD relocs to them.
(frv_reloc_type_lookup): ... and back to BFD relocs.
* reloc.c: New relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
2003-08-04 Alexandre Oliva <aoliva@redhat.com>
* elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
R_FRV_FUNCDESC_GOTLO): New.
(frv_reloc_map): Map the corresponding BFD relocs to them.
(frv_reloc_type_lookup): ... and back to BFD relocs.
* reloc.c: New relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
2004-01-06 19:18:59 +00:00
Nick Clifton
6edf0760c5
Add support for m32r-linux target, including a RELA ABI and PIC.
2003-12-19 11:44:01 +00:00
Nick Clifton
8884595866
Add support for the M32R2 processor.
2003-12-03 17:38:48 +00:00
Kazu Hirata
7dee875eb1
* ChangeLog: Fix typos.
...
* ecoff.c: Fix comment typos.
* ecofflink.c: Likewise.
* format.c: Likewise.
* hp300hpux.c: Likewise.
* i386linux.c: Likewise.
* ieee.c: Likewise.
* m68klinux.c: Likewise.
* mach-o.h: Likewise.
* mipsbsd.c: Likewise.
* oasys.c: Likewise.
* opncls.c: Likewise.
* peXXigen.c: Likewise.
* reloc.c: Likewise.
* reloc16.c: Likewise.
* section.c: Likewise.
* simple.c: Likewise.
* som.c: Likewise.
* som.h: Likewise.
* sparclinux.c: Likewise.
* srec.c: Likewise.
* syms.c: Likewise.
* targets.c: Likewise.
* tekhex.c: Likewise.
* versados.c: Likewise.
* vms-gsd.c: Likewise.
* vms-hdr.c: Likewise.
* vms-misc.c: Likewise.
* xcofflink.c: Likewise.
* xsym.h: Likewise.
* bfd-in2.h: Regenerate.
2003-11-30 18:40:41 +00:00
Kazu Hirata
5c4491d385
* aix5ppc-core.c: Fix comment typos.
...
* aout-arm.c: Likewise.
* aout-ns32k.c: Likewise.
* aoutx.h: Likewise.
* archures.c: Likewise.
* bfd-in.h: Likewise.
* bfd.c: Likewise.
* bfdio.c: Likewise.
* coff-arm.c: Likewise.
* coff-h8300.c: Likewise.
* coff-i860.c: Likewise.
* coff-m88k.c: Likewise.
* coff-mcore.c: Likewise.
* coff-ppc.c: Likewise.
* coff-rs6000.c: Likewise.
* coff-z8k.c: Likewise.
* coff64-rs6000.c: Likewise.
* coffcode.h: Likewise.
* cofflink.c: Likewise.
* cpu-alpha.c: Likewise.
* cpu-arm.c: Likewise.
* cpu-ns32k.c: Likewise.
* dwarf2.c: Likewise.
* bfd-in2.h: Regenerate.
2003-11-24 18:06:40 +00:00
Alan Modra
0f867abe4a
* aout-adobe.c (aout_adobe_set_section_contents): Constify location.
...
* aoutx.h (NAME(aout,set_section_contents)): Ditto.
* bfd-in2.h: Regenerate.
* binary.c (binary_set_section_contents): Ditto.
* bout.c (b_out_set_section_contents): Ditto.
* coff-tic54x.c (tic54x_set_section_contents): Ditto.
* coffcode.h (coff_set_section_contents): Ditto.
* ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
* elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
* elf.c (_bfd_elf_set_section_contents): Ditto.
* elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
* elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
* i386msdos.c (msdos_set_section_contents): Ditto.
* ieee.c (ieee_set_section_contents): Ditto.
* ihex.c (ihex_set_section_contents): Ditto.
* libaout.h (NAME(aout,set_section_contents)): Ditto.
* libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
(_bfd_generic_set_section_contents): Ditto.
* libbfd.h: Regenerate.
* libbfd.c (_bfd_generic_set_section_contents): Ditto.
* libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
* libnlm.h (nlmNAME(set_section_contents)): Ditto.
(struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
* mmo.c (mmo_set_section_contents): Ditto.
* nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
* nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
* nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
* nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
* nlmcode.h (nlm_set_section_contents): Ditto.
* oasys.c (oasys_set_section_contents): Ditto.
* pdp11.c (NAME(aout,set_section_contents)): Ditto.
* ppcboot.c (ppcboot_set_section_contents): Ditto.
* srec.c (srec_set_section_contents): Ditto.
* targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
* tekhex.c (tekhex_set_section_contents): Ditto.
(move_section_contents): Ditto.
* versados.c (versados_set_section_contents): Ditto.
* vms-misc.c (_bfd_save_vms_section): Ditto.
* vms.c (vms_set_section_contents): Ditto.
* vms.h (_bfd_save_vms_section): Ditto.
2003-11-04 10:41:52 +00:00
Alan Modra
e1918d2387
* bfd-in.h (_bfd_elf_tls_setup): Declare.
...
* bfd-in2.h: Regenerate.
* elf-bfd.h (struct elf_link_tls_segment): Delete.
(struct elf_link_hash_table): Add tls_sec and tls_size.
* elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
* elflink.c (_bfd_elf_tls_setup): New function.
* elflink.h (struct elf_final_link_info): Remove first_tls_sec.
(elf_bfd_final_link): Don't set first_tls_sec here. Update code
saving tls segment info, round segment size up.
(elf_link_output_extsym): Adjust code using tls segment info.
(elf_link_input_bfd): Likewise.
* elf32-i386.c (dtpoff_base, tpoff): Likewise.
* elf32-s390.c (dtpoff_base, tpoff): Likewise.
* elf32-sh.c (dtpoff_base, tpoff): Likewise.
* elf32-sparc.c (dtpoff_base, tpoff): Likewise.
* elf64-s390.c (dtpoff_base, tpoff): Likewise.
* elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
* elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
(elfNN_ia64_dtprel_base): Likewise.
* elf64-alpha.c (alpha_get_dtprel_base): Likewise.
(alpha_get_tprel_base): Likewise.
(struct alpha_relax_info): Remove tls_segment.
(elf64_alpha_relax_got_load): Adjust invocation of
alpha_get_dtprel_base and alpha_get_tprel_base.
(elf64_alpha_relax_tls_get_addr): Likewise.
(elf64_alpha_relax_section): Likewise.
(elf64_alpha_relocate_section): Likewise.
(elf64_alpha_relax_find_tls_segment): Delete.
* elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
(ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
(ppc_elf_relocate_section): Adjust to use elf.tls_sec.
* elf32-ppc.h (ppc_elf_tls_setup): Update.
* elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
(ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
(ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
(ppc64_elf_relocate_section): Likewise.
* elf64-ppc.h (ppc64_elf_tls_setup): Update.
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call
_bfd_elf_tls_setup.
2003-11-04 06:16:39 +00:00
Andrew Cagney
8530209598
2003-11-03 Andrew Cagney <cagney@redhat.com>
...
* section.c (bfd_set_section_contents): Make the "location" buffer
constant.
* bfd-in2.h: Re-generate.
Index: gdb/ChangeLog
2003-11-03 Andrew Cagney <cagney@redhat.com>
* exec.c (xfer_memory): Eliminate xfer_fn.
2003-11-03 14:44:08 +00:00
Andrew Cagney
fc0a224429
Index: sim/frv/ChangeLog
...
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 05:32:46 +00:00
Corinna Vinschen
af9ba62190
* archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
...
bfd_mach_sh4a_nofpu): New machine types.
* bfd-in2.h: Rebuilt.
* cpu-sh.c (compatible): Remove unused function.
(SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
(arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
* elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
2003-10-21 15:49:45 +00:00
Nick Clifton
3e60263266
Add ColfFire v4 support
2003-10-21 13:28:59 +00:00
Andrew Cagney
198beae2cf
2003-10-19 Andrew Cagney <cagney@redhat.com>
...
* targets.c: Replace "struct sec" with "struct bfd_section"
* syms.c, sparclynx.c, section.c, opncls.c: Ditto.
* libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
* elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
* aout-tic30.c, aout-target.h:
* bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
Index: binutils/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* coffgrok.h (coff_section): Replace 'struct sec" with "struct
bfd_section".
Index: gdb/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* symtab.c: Replace "struct sec" with "struct bfd_section".
* objfiles.c, linespec.c, blockframe.c, block.c: Ditto.
Index: ld/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* pe-dll.c: Replace "struct sec" with "struct bfd_section".
Index: sim/common/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* sim-base.h: Replace "struct sec" with "struct bfd_section".
2003-10-20 14:38:46 +00:00
Hans-Peter Nilsson
f60ebe1430
Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
...
* elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
(struct _mmix_elf_section_data): New member pjs.
(mmix_set_relaxable_size, mmix_elf_get_section_contents): New
functions.
(elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
(mmix_reloc_map): Ditto.
(mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
(mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
(mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
unused.
(mmix_elf_check_relocs): Move early return to after
mmix_elf_check_common_relocs call.
(mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
(_bfd_mmix_before_linker_allocation): Rename from
_bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
Arrange to set the initial relaxable size of sections.
(_bfd_mmix_after_linker_allocation): Rename from
_bfd_mmix_finalize_linker_allocated_gregs.
(mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
(bfd_elf64_get_section_contents): Define.
* reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
* libbfd.h, bfd-in2.h: Regenerate.
2003-10-18 15:42:40 +00:00
Andrew Cagney
6cee3f79e4
Index: doc/ChangeLog
...
2003-10-15 Andrew Cagney <cagney@redhat.com>
* bfdint.texi (BFD target vector symbols): Rename _get_symtab to
_canonicalize_symtab.
2003-10-15 Andrew Cagney <cagney@redhat.com>
* targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
with NAME##_canonicalize_symtab.
* libcoff-in.h (coff_canonicalize_symtab): Update.
* xsym.h (bfd_sym_canonicalize_symtab): Update.
* elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
* coffgen.c (coff_canonicalize_symtab): Update.
* libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
* libnlm.h (nlmNAME(canonicalize_symtab)): Update.
* ieee.c (ieee_vec): Update comment.
* libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
* mmo.c (mmo_canonicalize_symtab): Update.
* nlm-target.h (nlm_canonicalize_symtab): Update.
* nlmcode.h (nlm_canonicalize_symtab): Update.
* i386msdos.c (msdos_canonicalize_symtab): Update.
* hp300hpux.c (MY (canonicalize_symtab)): Update.
* oasys.c (oasys_canonicalize_symtab): Update.
* som.c (som_canonicalize_symtab): Update.
* pef.c (bfd_pef_canonicalize_symtab): Update.
* nlmcode.h (nlm_canonicalize_symtab): Update.
* xsym.c (bfd_sym_canonicalize_symtab): Update.
* vms.c (vms_canonicalize_symtab): Update.
* versados.c (versados_canonicalize_symtab): Update.
* mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
* ieee.c (ieee_canonicalize_symtab): Update.
* pdp11.c (NAME(aout,canonicalize_symtab)): Update.
* reloc.c: Update comment.
* libaout.h (NAME(aout,canonicalize_symtab)): Update.
* coff64-rs6000.c (aix5coff64_vec): Update.
* coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
* aoutx.h (NAME(aout,canonicalize_symtab)): Update.
* elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
* hp300hpux.c (MY_canonicalize_symtab): Update.
* ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
* aout-tic30.c (MY_canonicalize_symtab): Update.
* aout-target.h (MY_canonicalize_symtab): Update.
* ppcboot.c (ppcboot_canonicalize_symtab): Update.
* elf.c (_bfd_elf_canonicalize_symtab): Update.
* elfcode.h (elf_canonicalize_symtab): Update.
* ihex.c (ihex_canonicalize_symtab): Update.
* tekhex.c (tekhex_canonicalize_symtab): Update.
* binary.c (binary_canonicalize_symtab): Update.
* srec.c (srec_canonicalize_symtab): Update.
2003-10-16 04:11:10 +00:00
H.J. Lu
3f7deb8a34
bfd/
...
2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
* bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
(bfd_elf64_ia64_after_parse): Likewise.
* bfd-in2.h: Regenerated.
* elfxx-ia64.c (oor_ip): New.
(oor_branch_size): Likewise.
(bfd_elfNN_ia64_after_parse): Likewise.
(elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
equals sizeof (oor_ip).
ld/
2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (eelf64_ia64.c): Also depend on
$(srcdir)/emultempl/ia64elf.em.
* Makefile.in: Regenerated.
* emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Set to ia64elf.
* emultempl/ia64elf.em: New.
2003-10-13 15:55:51 +00:00
Alan Modra
a7f49d812f
* section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
...
* bfd-in2.h: Regenerate.
2003-10-11 12:32:18 +00:00
Dave Brolley
9c8ee6396f
2003-10-08 Dave Brolley <brolley@redhat.com>
...
On behalf of Michael Snyder <msnyder@redhat.com>
* archures.c: Add FRV fr550 machine.
* cpu-frv.c: Ditto.
* elf32-frv.c: Ditto.
* bfd-in2.h: Regenerate.
2003-10-08 17:57:59 +00:00
Chris Demetriou
5f74bc130d
[ bfd/ChangeLog ]
...
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* archures.c (bfd_mach_mipsisa64r2): New define.
* bfd-in2.h: Regenerate.
* aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
* cpu-mips.c (I_mipsisa64r2): New enum value.
(arch_info_struct): Add entry for I_mipsisa64r2.
* elfxx-mips.c (_bfd_elf_mips_mach)
(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
(mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
(mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
[ binutils/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* readelf.c (get_machine_flags): Handle E_MIPS_ARCH_64R2.
[ gas/Changelog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* configure.in (mipsisa64r2, mipsisa64r2el, mipsisa64r2*): New CPUs.
* configure: Regenerate.
* config/tc-mips.c (imm2_expr): New variable.
(md_assemble, mips16_ip): Initialize imm2_expr.
(ISA_HAS_64BIT_REGS, ISA_HAS_DROR, ISA_HAS_ROR): Add ISA_MIPS64R2.
(macro_build): Handle +A, +B, +C, +E, +F, +G, and +H format operands.
(macro): Handle M_DEXT and M_DINS.
(validate_mips_insn): Handle +E, +F, +G, +H, and +I format operands.
(mips_ip): Likewise.
(OPTION_MIPS64R2): New define.
(md_longopts): New entry for -mips64r2 (OPTION_MIPS64R2).
OPTION_ASE_BASE): Increase to compensate for OPTION_MIPS64R2.
(md_parse_option): Handle OPTION_MIPS64R2.
(s_mipsset): Handle setting "mips64r2" ISA.
(mips_cpu_info_table): Add mips64r2.
(md_show_usage): Document -mips64r2 option.
* doc/as.texinfo: Docuemnt -mips64r2 option.
* doc/c-mips.texi: Likewise.
[ gas/testsuite/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* gas/mips/cp0-names-mips64r2.d: New file.
* gas/mips/cp0sel-names-mips64r2.d: New file.
* gas/mips/elf_arch_mips64r2.d: New file.
* gas/mips/hwr-names-mips64r2.d: New file.
* gas/mips/mips32r2-ill-fp64.l: New file.
* gas/mips/mips32r2-ill-fp64.s: New file.
* gas/mips/mips64r2-ill.l: New file.
* gas/mips/mips64r2-ill.s: New file.
* gas/mips/mips64r2.d: New file.
* gas/mips/mips64r2.s: New file.
* gas/mips/mips.exp: Define "mips64r2" arch, and run new tests.
[ include/elf/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips.h (E_MIPS_ARCH_64R2): New define.
[ include/opcode/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips.h: Document +E, +F, +G, +H, and +I operand types.
Update documentation of I, +B and +C operand types.
(INSN_ISA64R2, ISA_MIPS64R2, CPU_MIPS64R2): New defines.
(M_DEXT, M_DINS): New enum values.
[ ld/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* ldmain.c (get_emulation): Ignore "-mips64r2".
[ ld/testsuite/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/mips-elf-flags.exp: Add tests for combinations
with MIPS64r2.
[ opcodes/ChangeLog ]
2003-09-30 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (mips_arch_choices): Add entry for "mips64r2"
(print_insn_args): Add handing for +E, +F, +G, and +H.
* mips-opc.c (I65): New define for MIPS64r2.
(mips_builtin_opcodes): Add "dext", "dextm", "dextu", "dins",
"dinsm", "dinsu", "drotl", "drotr", "drotr32", "drotrv", "dsbh",
and "dshd" for MIPS64r2. Adjust "dror", "dror32", and "drorv" to
be supported on MIPS64r2.
2003-09-30 16:17:15 +00:00
Joel Brobecker
42acdc7c30
* archures.c: Add new machine names for hppa.
...
* bfd-in2.h: Regenerate.
* cpu-hppa.c: Use the new machine names.
2003-09-08 16:46:02 +00:00
Nick Clifton
8ad30312ff
Add binutils support for v850e1 processor
2003-09-04 11:04:38 +00:00
Ian Lance Taylor
ec317fb157
* configure.in: Define and substitute BFD_HOST_LONG_LONG.
...
* bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
__GNUC__ when deciding whether to use long long for
BFD_HOST_64_BIT.
* configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
2003-08-27 17:43:39 +00:00
Nick Clifton
3b260895e3
Add MSP430 variants
2003-08-08 10:14:52 +00:00
Alan Modra
9c5bfbb7fd
* elfxx-target.h: Remove PTR cast.
...
* targets.c (bfd_target): Make backend_data const void *.
* elf-bfd.h: Constify all occurrences of struct elf_backend_data.
* elf-m10300.c: Likewise.
* elf.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-sh64.c: Likewise.
* elf32-sparc.c: Likewise.
* elf32-xtensa.c: Likewise.
* elf64-mips.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-sh64.c: Likewise.
* elf64-sparc.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfcode.h: Likewise.
* elfcore.h: Likewise.
* elflink.c: Likewise.
* elflink.h: Likewise.
* elfxx-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* elfxx-mips.h: Likewise.
* elf.c (prep_headers): Remove useless check for null backend_data.
* bfd-in2.h: Regenerate.
2003-08-07 08:38:11 +00:00
H.J. Lu
d622ef4b20
2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
...
* bfd-in2.h: Regenerated.
2003-07-25 14:55:16 +00:00
Richard Sandiford
5a7ea74950
include/opcode/
...
* mips.h (CPU_RM7000): New macro.
(OPCODE_IS_MEMBER): Match CPU_RM7000 against 4650 insns.
bfd/
* archures.c (bfd_mach_mips7000): New.
* bfd-in2.h: Regenerated.
* cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
* elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
(mips_mach_extensions): Add an entry for it.
opcodes/
* mips-dis.c (mips_arch_choices): Add rm7000 and rm9000 entries.
gas/
* config/tc-mips.c (hilo_interlocks): True for CPU_RM7000.
(mips_cpu_info_table): Add rm7000 and rm9000 entries.
gas/testsuite/
* gas/mips/rm7000.[sd]: New test.
* gas/mips/mips.exp: Run it.
2003-07-15 07:50:39 +00:00
Richard Sandiford
7a9823f1a9
bfd/
...
* bfd-in.h (bfd_h8300_pad_address): Declare.
* bfd-in2.h: Regenerate.
* cpu-h8300.c (bfd_h8300_pad_address): New function.
* coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
addresses before checking whether they can be relaxed.
(h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
Don't complain about overflows in general 8-bit relocations.
* elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
Fix handling of R_H8_DIR24A8.
ld/testsuite/
* ld-h8300/relax-3{.s,.d,-coff.d}: New test.
* ld-h8300/h8300.exp: Run it.
2003-07-11 14:59:41 +00:00
Alexandre Oliva
03a1283107
2002-12-12 Alexandre Oliva <aoliva@redhat.com>
...
* elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
pcrel_relocs_copied.
2001-12-13 Alexandre Oliva <aoliva@redhat.com>
* elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
ld-linux.so.2 to ld.so.1.
2001-10-10 Alexandre Oliva <aoliva@redhat.com>
* elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
(_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
(_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
.rela.* section contents with bfd_zalloc.
2001-09-25 Alexandre Oliva <aoliva@redhat.com>
* elf-m10300.c: Added declarations for functions missing them.
Merge some shared-library changes from the i386 back-end. Use
R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
(struct elf32_mn10300_link_hash_entry): Remove duplicates of
members of elf_link_hash_entry. Adjusted references.
(mn10300_elf_final_link_relocate): dynobj was already loaded
into a local variable, use it.
2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
* elf-m10300.c: Add missing function prototypes.
2001-08-24 Alexandre Oliva <aoliva@redhat.com>
* elf-m10300.c (mn10300_elf_relocate_section): Don't compute
relocation for dynamic relocations.
2001-05-16 Alexandre Oliva <aoliva@redhat.com>
* reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
* elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
(_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
(_bfd_mn10300_elf_create_got_section): ... here, so that its
adress is already known at the time we compute relaxations.
(mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
and PLT32 to narrower relocations.
* libbfd.h, bfd-in2.h: Rebuilt.
2001-04-12 Alexandre Oliva <aoliva@redhat.com>
* reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
BFD_RELOC_MN10300_RELATIVE): New relocs.
* libbfd.h, bfd-in2.h: Rebuilt.
* elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
(struct elf32_mn10300_link_hash_entry): Added DSO-related
fields.
(elf_mn10300_howto): Defined new relocation types.
(mn10300_reloc_map): Map them.
(_bfd_mn10300_elf_create_got_section): New fn.
(mn10300_elf_check_relocs): Handle PIC relocs.
(mn10300_elf_final_link_relocate): Likewise.
(mn10300_elf_relocate_section): Handle DSOs.
(PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
(elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
elf_mn10300_pic_plt_entry): New.
(elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
elf_mn10300_plt_reloc_offset: New macros.
(ELF_DYNAMIC_INTERPRETER): Likewise.
(_bfd_mn10300_elf_create_dynamic_sections): New function.
(_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
(_bfd_mn10300_elf_discard_copies): Likewise.
(_bfd_mn10300_elf_size_dynamic_sections): Likewise.
(_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
(_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
(elf_backend_can_gc_sections,
elf_backend_create_dynamic_sections,
elf_backend_adjust_dynamic_sections,
elf_backend_size_dynamic_sections,
elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
elf_backend_plt_readonly, elf_backend_want_plt_sym,
elf_backend_got_header_size, elf_backend_plt_header_size): New
macros.
2003-07-10 03:20:00 +00:00
Alexandre Oliva
b08fa4d3bf
2001-05-06 Alexandre Oliva <aoliva@redhat.com>
...
* elf-m10300.c (compute_function_info): Account for AM33
registers in `movm' when computing stack space for `call' when
linking for AM33/2.0 link.
2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
* archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
* bfd-in2.h: Rebuilt.
* cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
* elf-m10300.c: Updated.
2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
* archures.c (bfd_mach_am332): Defined.
* bfd-in2.h: Rebuilt.
* cpu-m10300.c (bfd_am332_arch): Defined.
(bfd_am33_arch): Chained with am33-2.
* elf-m10300.c (elf_mn10300_mach): Handle am332.
(_bfd_mn10300_elf_final_write_processing): Likewise.
2003-07-10 02:53:10 +00:00
Martin Schwidefsky
bd1ea41b84
* elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
...
(s390_tls_reloc): New function.
(elf_howto_table): Add long displacement relocations R_390_20,
R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
(elf_s390_reloc_type_lookup): Likewise.
(elf_s390_check_relocs): Likewise.
(elf_s390_gc_sweep_hook): Likewise.
(elf_s390_relocate_section): Likewise.
* elf64-s390.c: Same changes as for elf32-s390.c.
* reloc.c: Add long displacement relocations BFD_RELOC_390_20,
BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
BFD_RELOC_390_TLS_GOTIE20.
* bfd-in2.h: Regenerate.
* libbfd.h: Likewise.
2003-07-01 14:44:59 +00:00
Alan Modra
c58b95236c
Convert to C90 and a few tweaks.
2003-06-29 10:06:40 +00:00
Nick Clifton
e7c81c254c
Fix --add-gnu-debuglink
2003-06-27 08:01:28 +00:00
Alan Modra
1049f94e8e
Correct spelling of "relocatable".
2003-06-25 06:40:27 +00:00
H.J. Lu
f97b9cb853
bfd/
...
2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
* section.c (struct sec): Put back kept_section.
(STD_SECTION): Put back kept_section initialization.
* bfd-in2.h: Regenerate.
* elflink.h (elf_link_input_bfd): Also check discarded linkonce
sections for relocateable output. Use kept_section to preserve
debug information discarded by linkonce.
ld/
2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
* ldlang.c (section_already_linked): Put back assignment of
kept_section.
2003-06-18 00:30:04 +00:00
Nick Clifton
2593f09acc
Add new switch to objcopy: --add-gnu-debuglink=<file>
...
Allows packages to be shipped in two forms, a stripped executable and debug
info file.
2003-06-12 07:23:31 +00:00
Richard Sandiford
f4984206d8
include/elf/
...
* h8.h (E_H8_MACH_H8300SXN): New flag.
bfd/
* archures.c (bfd_mach_h8300sxn): New architecture.
* bfd-in2.h: Regenerate.
* cpu-h8300.c (h8300_scan): Check for 'sxn'.
(h8300sxn_info_struct): New.
(h8300sx_info_struct): Link to it.
* elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
(elf32_h8_final_write_processing): Likewise.
gas/
* config/tc-h8300.c (h8300sxnmode): New.
(md_pseudo_table): Add .h8300sxn entry. Sync others with FSF version.
ld/
* configure.tgt (h8300*): Add h8300sxn emulations.
* Makefile.am (ALL_EMULATIONS): Add eh8300sxn.o and eh8300sxnelf.o.
(eh8300sxn.c, eh8300sxnelf.c): New rules.
* Makefile.in: Regenerate.
* emulparams/h8300sxnelf.sh, emulparams/h8300sxn.sh: New files.
2003-06-10 07:09:31 +00:00
Alan Modra
ad8e1ba599
* elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
...
elfxx-target.h so that we can use elf_backend_got_header_size.
(ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
(GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
associated macros.
(ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
dst_mask.
(enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
ppc_stub_plt_branch_r2off.
(struct ppc_stub_hash_entry): Reorganize.
(struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
toc_curr, toc_off and emit_stub_syms.
(ppc64_elf_link_hash_table_create): Init them.
(ppc_stub_name): Correct string size.
(ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
(ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
used.
(ppc_type_of_stub): Tweak root.type test.
(build_plt_stub): Remove glink code. Adjust for insn macro changes.
(ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
ppc_stub_plt_branch_r2off.
(ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
(ppc64_elf_setup_section_lists): Remove htab creator flavour test.
Initialize elf_gp and toc_curr.
(ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
(ppc64_elf_next_input_section): Set toc_off.
(group_sections): Ensure groups have the same TOC.
(ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
(ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
Build new glink stub.
(ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
(ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
* elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
(ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
* section.c (struct sec): Rename flag12 to has_gp_reloc.
(STD_SECTION): Update.
* ecoff.c (bfd_debug_section): Update comment.
* bfd-in2.h: Regenerate.
2003-06-08 14:06:38 +00:00
Nick Clifton
e30ddb24b3
Add pc-relative 32-bit reloc to v850 port. Fixes ld-elf/merge test failure.
2003-06-03 16:24:06 +00:00
Roland McGrath
a05758dd2d
2003-05-19 Roland McGrath <roland@redhat.com>
...
* elf.c (bfd_elf_bfd_from_remote_memory): New function.
* bfd-in.h: Declare it.
* bfd-in2.h: Regenerated.
* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
* elf-bfd.h (struct elf_backend_data): New function pointer member
elf_backend_bfd_from_remote_memory.
(_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
Declare them.
* elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
(elfNN_bed): Add that to the initializer.
2003-05-21 00:57:20 +00:00
Michael Snyder
5d1db417ca
2003-05-16 Michael Snyder <msnyder@redhat.com>
...
From Bernd Schmidt <bernds@redhat.com>
* archures.c (bfd_mach_h8300sx): New.
* bfd-in2.h: Regenerate.
* cpu-h8300.c (h8300_scan)): Add support for h8300sx.
(h8300sx_info_struct): New.
(h8300s_info_struct): Link to it.
* elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
(elf32_h8_final_write_processing): Likewise.
(elf32_h8_relax_section): Likewise.
2003-05-16 23:39:24 +00:00
Alan Modra
45d6a902ae
* elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
...
elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
(_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
(bfd_elf_record_link_assignment): Move from elflink.h.
(_bfd_elf_merge_symbol): Likewise.
(_bfd_elf_add_default_symbol): Likewise.
(_bfd_elf_export_symbol): Likewise.
(_bfd_elf_link_find_version_dependencies): Likewise.
(_bfd_elf_link_assign_sym_version): Likewise.
(_bfd_elf_link_read_relocs): Likewise.
(_bfd_elf_link_size_reloc_section): Likewise.
(_bfd_elf_fix_symbol_flags): Likewise.
(_bfd_elf_adjust_dynamic_symbol): Likewise.
(_bfd_elf_link_sec_merge_syms): Likewise.
(elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
and bed->s->sizeof_rela.
(_bfd_elf_link_output_relocs): Likewise.
* elf-bfd.h (struct elf_size_info): Rename file_align to
log_file_align.
(struct elf_info_failed): Move from elflink.h.
(struct elf_assign_sym_version_info): Likewise.
(struct elf_find_verdep_info): Likewise.
(_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
(_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
_bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
_bfd_elf_link_assign_sym_version,
_bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
_bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
_bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
_bfd_elf_link_sec_merge_syms): Declare.
(bfd_elf32_link_create_dynamic_sections): Don't declare.
(_bfd_elf32_link_read_relocs): Likewise.
(bfd_elf64_link_create_dynamic_sections): Likewise.
(_bfd_elf64_link_read_relocs): Likewise.
* elflink.h: Move lots o' stuff elsewhere.
* bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
(bfd_elf64_record_link_assignment): Likewise.
(bfd_elf_record_link_assignment): Declare.
* bfd-in2.h: Regenerate.
* elfcode.h (elf_link_create_dynamic_sections): Don't declare.
(NAME(_bfd_elf,size_info)): Adjust for log_file_align.
* elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
(assign_file_positions_for_segments): Likewise.
(assign_file_positions_except_relocs): Likewise.
(swap_out_syms, elfcore_write_note): Likewise.
* elf-m10200.c: Adjust for changed function names.
* elf-m10300.c: Likewise.
* elf32-arm.h: Likewise.
* elf32-h8300.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-ip2k.c: Likewise.
* elf32-m32r.c: Likewise.
* elf32-m68hc11.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-mips.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-v850.c: Likewise.
* elf32-xtensa.c: Likewise.
* elf64-alpha.c: Likewise.
* elf64-hppa.c: Likewise.
* elf64-mmix.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-sh64.c: Likewise.
* elfxx-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
(MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
* elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
* elf64-hppa.c (hppa64_elf_size_info): Likewise.
* elf64-mips.c (mips_elf64_size_info): Likewise.
* elf64-s390.c (s390_elf64_size_info): Likewise.
* elf64-sparc.c (sparc64_elf_size_info): Likewise.
2003-05-09 02:27:11 +00:00
H.J. Lu
c7996ad628
bfd/
...
2003-04-28 H.J. Lu <hjl@gnu.org>
* elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
the relax finalize pass.
* section.c (struct sec): Add need_finalize_relax and remove
flag11.
(STD_SECTION): Update struct sec initializer.
* bfd-in2.h: Regenerated.
include/
2003-04-28 H.J. Lu <hjl@gnu.org>
* bfdlink.h (bfd_link_info): Add relax_finalizing.
ld/
2003-04-28 H.J. Lu <hjl@gnu.org>
* ldlang.c (lang_process): Add the relax finalize pass.
* ldmain.c (main): Initialize link_info.relax_finalizing to
FALSE.
2003-04-29 01:53:46 +00:00
Nick Clifton
8d9cd6b19b
Add support for h8300hn and h8300sn
2003-04-24 12:36:08 +00:00
Joern Rennecke
ef23021837
bfd:
...
* archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
* cpu-sh.c: Likewise.
* elf32-sh.c: Likewise.
* reloc.c (bfd_reloc_code_real): Likewise.
* elf32-sh64-com.c: Change comment to refer to SuperH.
* elf32-sh64.c: Likewise.
* elf64-sh64.c: Likewise.
* bfd-in2.h (enum bfd_architecture): Regenerate.
binutils:
* readelf.c (get_machine_name) <EM_SH>: Amend return value
to refer to SuperH.
gas:
* config/tc-sh.c: Amend comment to refer to SuperH.
* config/tc-sh.h: Likewise.
(LISTING_HEADER): Amend to refer to SuperH.
* config/tc-sh64.c: Change comment to refer to SuperH.
* config/tc-sh64.h (LISTING_HEADER): Change to refer to SuperH.
* doc/as.texinfo [SH, GENERIC]: Amend / Change to refer to SuperH.
* doc/c-sh.texi: Amend to refer to SuperH.
Add SuperH architecture documentation references.
* doc/c-sh64.texi: Change to refer to SuperH.
include/elf:
* common.h (EM_SH): Amend comment to refer to SuperH.
ld/testsuite:
* ld-sh/sh64/crange3-cmpct.rd (Machine): Change to refer to SuperH.
* ld-sh/sh64/crange3-media.rd (Machine): Likewise.
2003-04-23 21:09:04 +00:00
Nick Clifton
26597c8633
Replace references to Mitsubishi M32R with references to Renesas M32R.
2003-04-22 16:22:26 +00:00
Nick Clifton
c2dcd04ec8
Replace occurrances of 'Hitachi' with 'Renesas'.
2003-04-15 08:51:55 +00:00
Svein Seldal
be33c5dd4d
Namespace cleanup for the tic4x target. Replace s/c4x/tic4x/ and s/c3x/tic3x/. 2003 copyright update
2003-04-04 08:15:15 +00:00
Nick Clifton
e0001a05d2
Add Xtensa port
2003-04-01 15:50:31 +00:00
Nick Clifton
5a6c681789
Fixes for iWMMXt contribution.
2003-04-01 13:08:06 +00:00
Daniel Jacobowitz
6e84a90684
* simple.c (bfd_simple_get_relocated_section_contents): Add
...
parameter symbol_table. Optionally use it instead of the symbol
table from the bfd. Save and restore output offsets and output
sections around bfd_get_relocated_section_contents. Fix a memory
leak.
(simple_save_output_info, simple_restore_output_info): New
functions.
* bfd-in2.h: Regenerate.
* dwarf2.c (read_abbrevs): Use
bfd_simple_get_relocated_section_contents instead of
bfd_get_section_contents.
(decode_line_info): Likewise.
(_bfd_dwarf2_find_nearest_line): Likewise. Don't call
find_rela_addend.
(find_rela_addend): Remove.
* elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
debugging sections.
(elfNN_ia64_hash_table_create): Create the hash table with malloc,
not bfd_zalloc.
2003-04-01 00:12:12 +00:00
Nick Clifton
e16bb312f5
Add iWMMXt support
2003-03-25 20:56:01 +00:00
Alexandre Oliva
0b25d3e680
* Reverted 2003-03-02's patch.
2003-03-12 23:06:08 +00:00
Thiemo Seufer
7c2be35cae
* elf32-mips.c (elf_mips_howto_table_rel): Change definition of
...
R_MIPS_PC16 to rightshift 2.
(elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
(bfd_elf32_bfd_reloc_type_lookup): Support
BFD_RELOC_MIPSEMB_16_PCREL_S2.
* elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
R_MIPS_PC16 to rightshift 2.
(mips_elf64_howto_table_rela): Likewise.
(mips_reloc_map): Map to rightshifted BFD reloc.
* elfn32-mips.c: The same as in elf64-mips.c.
* elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
(mips_elf_calculate_relocation): Handle rightshifted addends for
R_MIPS_PC16.
* reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
MIPS Embedded PIC. Remove superfluous empty COMMENT.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
* config/tc-mips.c (append_insn): Add handling of
BFD_RELOC_MIPSEMB_16_PCREL_S2. Avoid emitting unneeded
BFD_RELOC_16_PCREL_S2 relocs and add earlier warnings about
misaligned address and reange overflow.
(macro_build): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2. Add
earlier warnings about misaligned address and reange overflow.
(mips_ip): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2.
(md_apply_fix): Likewise. Fix warning output.
(tc_gen_reloc): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2.
Allow BFD_RELOC_16_PCREL_S2 for all ABIs.
(md_convert_frag): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2.
* gas/mips/bge.d: Reactivate external branch tests.
* gas/mips/bge.s: Likewise.
* gas/mips/bgeu.d: Likewise.
* gas/mips/bgeu.s: Likewise.
* gas/mips/blt.d: Likewise.
* gas/mips/blt.s: Likewise.
* gas/mips/bltu.d: Likewise.
* gas/mips/bltu.s: Likewise.
* gas/mips/branch-misc-2.d: New File.
* gas/mips/branch-misc-2.l: Remove.
* gas/mips/mips.exp: Adjust branch-misc-2 test.
2003-03-02 21:30:15 +00:00
Alan Modra
2ce40c65db
* bfd-in.h (_bfd): Don't define.
...
* bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
* syms.c: Likewise.
* bfd-in2.h: Regenerate.
2003-02-28 23:43:35 +00:00
Andrew Cagney
c2852e886c
2003-02-27 Andrew Cagney <cagney@redhat.com>
...
* bfd.c (struct bfd): Rename "struct _bfd".
* bfd-in.h: Update copyright.
(struct bfd): Rename "struct _bfd".
(_bfd): Define for backward compatibility.
* bfd-in2.h: Regenerate.
2003-02-27 21:24:36 +00:00
Nick Clifton
ed781d5d99
Change embedded documentation to use consistent indentation and to split up
...
long lines. Change informal style of description for functions lacking real
documentation.
2003-02-14 11:16:09 +00:00
Nick Clifton
fde78edd7a
Add support for marking ARM ELF binaries as support the Cirrus EP9312 Maverick
...
floating point co-processor.
2003-02-10 10:44:48 +00:00
Alan Modra
411e1bfb66
* reloc.c: Add PPC and PPC64 TLS relocs.
...
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
* elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
(ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
against a 32 bit field.
(ppc64_elf_reloc_type_lookup): Handle TLS relocs.
(_ppc64_elf_section_data): Add t_symndx and comments.
(ppc64_elf_section_data): Use elf_section_data macro.
(ppc64_elf_new_section_hook): American spelling.
(struct got_entry, struct plt_entry): New.
(MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
(struct ppc_stub_hash_entry): Add "addend" field.
(struct ppc_link_hash_entry): Add "tls_type".
(TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
TLS_EXPLICIT): Define.
(struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
(link_hash_newfunc): Init new fields.
(ppc64_elf_link_hash_table_create): Likewise. Set init_relcount and
init_offset to NULL.
(ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
_bfd_elf_link_hash_copy_indirect, rather insert relevant code from
there.
(update_local_sym_info, update_plt_info): New functions.
(ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
handling to use got.glist rather than got.refcount. Likewise for PLT.
(ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
(func_desc_adjust): Adjust for new PLT list.
(ppc64_elf_adjust_dynamic_symbol): Likewise.
(get_sym_h, get_tls_type): New functions.
(ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
(ppc64_elf_tls_optimize): New function.
(allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
TLS relocs.
(ppc64_elf_size_dynamic_sections): Likewise.
(ppc_type_of_stub): Adjust for new PLT list.
(ppc_build_one_stub): Likewise.
(ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
calls specially.
(ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
init GOT entries that have a reloc. Generate GOT relocs here..
(ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
* elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
2003-02-04 14:50:50 +00:00
Alan Modra
68bfbfcc5a
bfd
...
* elf-bfd.h (enum elf_link_info_type): Remove.
(struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
to struct sec. Remove linkonce_p field.
(elf_linkonce_p): Delete.
(elf_discarded_section): Update for sec_info_type change.
* section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
(ELF_INFO_TYPE_NONE): Define.
(ELF_INFO_TYPE_STABS): Define.
(ELF_INFO_TYPE_MERGE): Define.
(ELF_INFO_TYPE_EH_FRAME): Define.
(ELF_INFO_TYPE_JUST_SYMS): Define.
(STD_SECTION): Update struct sec initializer.
* ecoff.c (bfd_debug_section): Likewise.
* elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
* elflink.h: Likewise.
* elf-eh-frame.c: Likewise.
* elf64-alpha.c: Likewise.
* elfxx-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* bfd-in2.h: Regenerate.
* elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
referring to used_by_bfd.
* elf64-sparc.c (sec_do_relax): Likewise.
* elf64-mmix.c (mmix_elf_section_data): Likewise.
* elfxx-mips.c (mips_elf_section_data): Likewise.
* ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
(ieee_get_section_contents): Likewise.
(ieee_new_section_hook): Formatting.
(ieee_canonicalize_reloc): Remove commented out code.
* mmo.c (mmo_section_data): Define. Use throughout file.
* oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
gas
* config/obj-elf.c (obj_elf_change_section): Set SEC_LINK_ONCE and
SEC_LINK_DUPLICATES_DISCARD directly rather than using elf_linkonce_p.
2003-02-04 12:34:08 +00:00
Nick Clifton
31f7ba0423
bfd_follow_gnu_debuglink: New function. Follow the pointer contained inside a
...
.gnu_debuglink section.
2003-01-31 10:04:16 +00:00