summaryrefslogtreecommitdiffstats
path: root/bfd/elfxx-target.h
Commit message (Collapse)AuthorAgeFilesLines
* * elf.c ( _bfd_elf_print_private_bfd_data): CallCatherine Moore2008-02-271-0/+4
| | | | | | | | | | | | elf_backend_get_target_dtag if defined. * elf32-mips.c (elf_backend_get_target_dtag): Define. * elf64-mips.c: Likewise. * elfn32-mips.c: Likewise. * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New. * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare. * elf-bfd.h (elf_backend_get_target_dtag): Add prototype. * elfxx-target.h (elf_backend_get_target_dtag): Add default. (elf_backend_data): Add elf_backend_get_target_dtag.
* PR ld/5692Nick Clifton2008-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (enum elf_object_id): New enum, used to identify target specific extensions to the elf_obj_tdata structure. (struct elf_obj_tdata): New field 'object_id'. (elf_object_id, elf_program_header_size, elf_symtab_hdr): New macros for accessing fields in the elf_obj_tdata structure. (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object. (bfd_elf_allocate_object): New function. * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object and implement by calling bfd_elf_allocate_object. (bfd_elf_allocate_object): New function: Allocates an elf_obj_tdata structure, possibly with a target specific extension. * elfxx-target.h (bfd_elfNN_mkobject): Use bfd_elf_make_generic_object as the default value. * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata for consistency with other, similar structures. (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM ELF bfd. (elf32_arm_mkobject): Call bfd_elf_allocate_object. (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check the bfd being processed. (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. (bfd_elf32_arm_set_target_relocs): Likewise. (bfd_elf32_arm_final_link_relocate): Likewise. (bfd_elf32_arm_copy_private_bfd_data): Likewise. (bfd_elf32_arm_merge_eabi_attributes): Likewise. (bfd_elf32_arm_merge_private_bfd_data): Likewise. (bfd_elf32_arm_check_relocs): Likewise. (bfd_elf32_arm_gc_mark_extra_sections): Likewise. (bfd_elf32_arm_size_dynamic_sections): Likewise. (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr. (bfd_elf32_arm_init_maps): Likewise. (bfd_elf32_arm_final_link_relocate): Likewise. (bfd_elf32_arm_relocate_section): Likewise. (bfd_elf32_arm_gc_sweep_hook): Likewise. (bfd_elf32_arm_check_relocs): Likewise. (bfd_elf32_arm_size_dynamic_sections): Likewise. * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object. (is_i386_elf): New macro. Checks a BFD to make sure that is an x86 ELF bfd. (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd being processed. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_check_relocs): Use elf_symtab_hdr. (elf_i386_gc_sweep_hook): Likewise. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object. (elf_create_pointer_linker_section): Use is_ppc_elf_target to verify that the bfd before accessing target specific fields. (ppc_elf_check_relocs): Likewise. (elf_finish_pointer_linker_section): Likewise. (elf_create_pointer_linker_section): Use elf_symtab_hdr. (ppc_elf_check_relocs): Likewise. (ppc_elf_gc_sweep_hook): Likewise. (ppc_elf_tls_optimize): Likewise. (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relax_section): Likewise. (ppc_elf_relocate_section): Likewise. * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment reminding programmers to keep this structure in sync with the one defined in elf64-s390.c. (elf_s390_mkobject): Call bfd_elf_allocate_object. (is_s390_elf): New macro. Checks a BFD to make sure that is an s390 ELF bfd. (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd being processed. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. (elf_s390_check_relocs): Use elf_symtab_hdr. (elf_s390_gc_sweep_hook): Likewise. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object. (is_sh_elf): New macro. Checks a BFD to make sure that is an SH ELF bfd. (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the bfd being processed. (sh_elf_relocate_section): Likewise. (sh_elf_check_relocs): Likewise. (sh_elf_copy_private_data): Likewise. (sh_elf_relax_section): Use elf_symtab_hdr. (sh_elf_size_dynamic_sections): Likewise. (sh_elf_relocate_section): Likewise. (sh_elf_get_relocated_section_contents): Likewise. (sh_elf_gc_sweep_hook): Likewise. (sh_elf_check_relocs): Likewise. * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object. (is_alpha_elf): New macro. Checks a BFD to make sure that is an Alpha ELF bfd. (elf64_alpha_create_got_section): Use is_alpha_elf macro to check the bfd being processed. (elf64_alpha_create_dynamic_section): Likewise. (elf64_alpha_check_relocs): Likewise. (elf64_alpha_size_got_sections): Likewise. (elf64_alpha_relax_section): Likewise. (elf64_alpha_relocate_section): Likewise. (elf64_alpha_final_link): Likewise. (elf64_alpha_check_relocs): Use elf_symtab_hdr. (elf64_alpha_relax_section): Likewise. (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object. (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd being processed. (opd_entry_value): Likewise. (allocate_dynrelocs): Likewise. (ppc64_elf_relocate_section): Likewise. (ppc64_elf_check_relocs): Use elf_symtab_hdr. (opd_entry_value): Likewise. (ppc64_elf_gc_sweep_hook): Likewise. (get_sym_h): Likewise. (ppc64_elf_edit_opd): Likewise. (ppc64_elf_tls_optimize): Likewise. (ppc64_elf_edit_toc): Likewise. (ppc64_elf_size_dynamic_sections): Likewise. (toc_adjusting_stub_needed): Likewise. (ppc64_elf_size_stubs): Likewise. (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment reminding programmers to keep this structure in sync with the one defined in elf32-s390.c. (elf_s390_mkobject): Call bfd_elf_allocate_object. (is_s390_elf): New macro. Checks a BFD to make sure that is an s390 ELF bfd. (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd being processed. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. (elf_s390_check_relocs): Use elf_symtab_hdr. (elf_s390_gc_sweep_hook): Likewise. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object. (is_x86_64_elf): New macro. Checks a BFD to make sure that is an x86_64 ELF bfd. (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd being processed. (elf64_x86_64_size_dynamic_sections): Likewise. (elf64_x86_64_relocate_section): Likewise. (elf64_x86_64_check_relocs): Use elf_symtab_hdr. (elf64_x86_64_gc_sweep_hook): Likewise. (elf64_x86_64_size_dynamic_sections): Likewise. (elf64_x86_64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object. (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc ELF bfd. (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the bfd being processed. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. (_bfd_sparc_elf_relocate_section): Likewise.
* bfd/Alan Modra2008-01-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 5604 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param names from others. (_bfd_elf_gc_keep): Declare. * elfxx-target.h (elf_backend_gc_keep): Define. (elfNN_bed): Init new field. * elflink.c (_bfd_elf_gc_keep): New function. (bfd_elf_gc_sections): Call gc_keep. * elf64-ppc.c (elf_backend_gc_keep): Define. (struct _ppc64_elf_section_data): Move .opd related fields to a struct so they don't occupy the same storage. Adjust accesses throughout file. (ppc64_elf_gc_keep): New function, split out from.. (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark to mark .opd section, just set gc_mark. (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust unless we are changing .opd. Test non-NULL opd->adjust at all accesses throughout file. * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype. ld/ PR 5604 * ldlang.c (lang_gc_sections): Move code to set SEC_KEEP on entry syms to _bfd_elf_gc_keep. * emultempl/ppc64elf.em (ppc_before_allocation): Don't call ppc64_elf_edit_opd if no_opd_opt.
* PR ld/4424Alan Modra2007-10-181-0/+4
| | | | | | | | | | | | | | | | | | | * config.bfd (targ_selvecs): Add bfd_elf64_alpha_vec for alpha/FreeBSD. Add bfd_elf64_sparc_vec for sparc64/FreeBSD. Add bfd_elf32_i386_vec and bfd_efi_app_ia32_vec for i386/FreeBSD. (targ64_selvecs): Set for i386/FreeBSD. * elf-bfd.h (elf_backend_data): Add relocs_compatible. (_bfd_elf_default_relocs_compatible): Declare. (_bfd_elf_relocs_compatible): Declare. * elfxx-target.h (elf_backend_relocs_compatible): Define. (elfNN_bed): Init new relocs_compatible field. * elflink.c (_bfd_elf_default_relocs_compatible): New function. (_bfd_elf_relocs_compatible): New function. (elf_link_add_object_symbols): Call bed->relocs_compatible. * elf32-i386.c (elf_backend_relocs_compatible): Define. * elf64-alpha.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise.
* * elf-bfd.h (struct elf_backend_data): Delete elf_backend_sprintf_vmaAlan Modra2007-09-121-8/+0
| | | | | | | | | | | and elf_backend_fprintf_vma. (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete. * elf.c (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete. * elfxx-target.h (elf_backend_sprintf_vma): Don't define. (elf_backend_fprintf_vma): Likewise. (elfNN_bed): Don't init removed fields. * bfd.c (is32bit): New function. (bfd_sprintf_vma, bfd_fprintf_vma): Use the above.
* 2007-08-20 Jan Kratochvil <jan.kratochvil@redhat.com>Jan Kratochvil2007-08-201-4/+11
| | | | | | * elfxx-target.h [ELF_COMMONPAGESIZE && ELF_MAXPAGESIZE] (ELF_MINPAGESIZE): Fixed its size guess. Sanity checked its size. (ELF_COMMONPAGESIZE, ELF_MAXPAGESIZE): Sanity checked their size.
* Switch sources over to use the GPL version 3Nick Clifton2007-07-031-3/+5
|
* bfd:Joseph Myers2007-06-291-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-attrs.c: New. * Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo. (BFD32_BACKENDS_CFILES): Add elf-attrs.c. (elf-attrs.lo): Generate dependencies. * Makefile.in: Regenerate. * configure.in (elf): Add elf-attrs.lo. * configure: Regenerate. * elf-bfd.h (struct elf_backend_data): Add entries for object attributes. (NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list, OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST, Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility): New. (struct elf_obj_tdata): Add entries for object attributes. (elf_known_obj_attributes, elf_other_obj_attributes, elf_known_obj_attributes_proc, elf_other_obj_attributes_proc): New. (bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents, bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int, bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string, bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat, bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup, _bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type, _bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New. * elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes. (bfd_section_from_shdr): Handle attributes sections. * elflink.c (bfd_elf_final_link): Handle attributes sections. * elfxx-target.h (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section_type): New. (elfNN_bed): Update. * elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute, aeabi_attribute_list): Remove. (struct elf32_arm_obj_tdata): Remove object attributes fields. (check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2, elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes): Update for new object attributes interfaces. (uleb128_size, is_default_attr, eabi_attr_size, elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute, elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link, elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int, elf32_arm_add_eabi_attr_int, attr_strdup, elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat, copy_eabi_attributes, elf32_arm_parse_attributes): Remove. Moved to generic code in elf-attrs.c. (elf32_arm_obj_attrs_arg_type): New. (elf32_arm_fake_sections): Do not handle .ARM.attributes. (elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES. (bfd_elf32_bfd_final_link): Remove. (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section_type): New. * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object attributes. * elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise. * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise. * elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise. * elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise. * elf32-sh.c (sh_elf_copy_private_data): Likewise. * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise. binutils: * readelf.c (display_gnu_attribute): New. (process_arm_specific): Rearrange as process_attributes. (process_arm_specific): Replace by wrapper of process_attributes. gas: * as.c (create_obj_attrs_section): New. (main): Call create_obj_attrs_section for ELF. * read.c (s_gnu_attribute, skip_whitespace, skip_past_char, skip_past_comma, s_vendor_attribute): New. (potable): Add gnu_attribute for ELF. * read.h (s_vendor_attribute): Declare. * config/tc-arm.c (s_arm_eabi_attribute): Replace by wrapper round s_vendor_attribute. (aeabi_set_public_attributes): Update for new attributes interfaces. (arm_md_end): Remove attributes contents setting now done generically. include/elf: * arm.h (elf32_arm_add_eabi_attr_int, elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat, elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents, elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility): Remove. * common.h (SHT_GNU_ATTRIBUTES): Define. ld: * emulparams/armelf.sh (OTHER_SECTIONS): Remove .ARM.attributes. (ATTRS_SECTIONS): Define. * scripttempl/elf.sc, scripttempl/elf32sh-symbian.sc, scripttempl/elf_chaos.sc, scripttempl/elfi370.sc, scripttempl/elfxtensa.sc: Handle ATTRS_SECTIONS.
* 2007-04-17 Paul Brook <paul@codesourcery.com>Paul Brook2007-04-171-0/+5
| | | | | | | | | | | | | | | | | | | | bfd/ * elf.c (_bfd_elf_is_function_type): New function. * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type. (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p, is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto. * elf-bfd.h (elf_backend_data): Add is_function_type. (_bfd_elf_is_function_type): Add prototype. * elfxx-target.h (elf_backend_is_function_type): Add default definition. (elfNN_bed): Add elf_backend_is_function_type. * elf32-arm.c (elf32_arm_is_function_type): New function. (elf_backend_is_function_type): Define. ld/testsuite/ * ld-arm/preempt-app.s: New test. * ld-arm/preempt-app.sym: New. * ld-arm/arm-elf.exp: Add preempt-app.
* 2007-03-13 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2007-03-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR binutils/3826 * elf-bfd.h (elf_backend_data): Add elf_osabi. (_bfd_elf_set_osabi): New. * elf.c (_bfd_elf_set_osabi): New. * elf32-hppa.c (elf32_hppa_post_process_headers): Removed. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. (ELF_OSABI): Properly defined for each target. * elf32-i370.c (i370_elf_post_process_headers): Removed. (ELF_OSABI): Defined. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi. * elf32-msp430.c (elf32_msp430_post_process_headers): Removed. (ELF_OSABI): Defined. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with elf_osabi. * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI with elf_osabi. (ELF_OSABI): Properly defined for each target. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi for Linux. * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed. (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed. (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target with any ELF target of the compatible machine for which we do not have a specific backend. * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI with elf_osabi. * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE. (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
* 2007-02-22 Paul Brook <paul@codesourcery.com>Paul Brook2007-02-221-0/+4
| | | | | | | | | | | | | | | | | | | bfd/ * elflink.c (gc_mark_hook_fn): Remove. (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn. (bfd_elf_gc_sections): Ditto. Call gc_mark_extra_sections. * elf-bfd.h (elf_gc_mark_hook_fn): Define. (elf_backend_data): Add gc_mark_extra_sections. * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default definition. (elfNN_bed): Add elf_backend_gc_mark_extra_sections. * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function. (elf_backend_gc_mark_extra_sections): Define. ld/testsuite/ * ld-arm/arm-elf.exp (armelftests): Add gc-unwind.h. * ld-arm/gc-unwind.s: New file. * ld-arm/gc-unwind.d: New file.
* * elf-bfd.h (struct elf_backend_data): Add default_execstack.Alan Modra2007-02-191-1/+5
| | | | | | | * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack. * elfxx-target.h (elf_backend_default_execstack): Define to 1. (elfNN_bed): Init new field. * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
* * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.Alan Modra2007-02-011-0/+4
| | | | | | | | | | | | | | | * elfxx-target.h (elf_backend_write_core_note): Define and use. * elf.c (elfcore_write_prpsinfo): Call the above. Add support for 32-bit core note on 64-bit target. (elfcore_write_prstatus): Likewise. (elfcore_write_lwpstatus): Make note_name const. (elfcore_write_prfpreg): Likewise. (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit target. * elf32-ppc.c (ppc_elf_write_core_note): New function. (elf_backend_write_core_note): Define. * elf64-ppc.c (ppc64_elf_write_core_note): New function. (elf_backend_write_core_note): Define.
* 2076-01-31 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2007-01-311-2/+0
| | | | | | | | | | | * elf32-cris.c (INCLUDED_TARGET_FILE): Removed. (elf32_bed): Defined for elf32-us-cris. * elf64-sh64.c (elf64_bed): Defined for Linux. (INCLUDED_TARGET_FILE): Removed. * elfxx-target.h (elfNN_bed): Always define. Don't check INCLUDED_TARGET_FILE.
* * elf-bfd.h (struct elf_backend_data): Add as_needed_cleanup hook.Jakub Jelinek2006-12-231-0/+4
| | | | | | | | | * elfxx-target.h (elf_backend_as_needed_cleanup): Define. (elfNN_bed): Add as_needed_cleanup hook. * elflink.c (elf_link_add_object_symbols): Call it when reverting hash table changes for unneeded --as-needed input. * elf64-ppc64.c (elf_backend_as_needed_cleanup): Define. (ppc64_elf_as_needed_cleanup): New function.
* bfd/Alan Modra2006-10-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (struct elf_link_hash_table): Reorder. Add text_index_section and data_index_section. (struct elf_backend_data): Add elf_backend_init_index_section. (_bfd_elf_init_1_index_section): Declare. (_bfd_elf_init_2_index_sections): Declare. * elfxx-target.h (elf_backend_init_index_section): Define. (elfNN_bed): Init new field. * elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls section and text_index_section plus data_index_section. (_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections. (_bfd_elf_init_1_index_section): New function. (_bfd_elf_init_2_index_sections): New function. (bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section. (elf_link_input_bfd): When emitting relocs, use text_index_section and data_index_section for removed sections. * elf-m10300.c (elf_backend_omit_section_dynsym): Define. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-sh.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section and data_index_section sym for relocs against sections with no dynamic section sym. (elf_backend_init_index_section): Define. * elf32-cris.c: Similarly. * elf32-hppa.c: Similarly. * elf32-i370.c: Similarly. * elf32-m68k.c: Similarly. * elf32-mips.c: Similarly. * elf32-ppc.c: Similarly. * elf32-s390.c: Similarly. * elf32-sparc.c: Similarly. * elf32-vax.c: Similarly. * elf64-mips.c: Similarly. * elf64-ppc.c: Similarly. * elf64-s390.c: Similarly. * elf64-sparc.c: Similarly. * elf64-x86-64.c: Similarly. * elfn32-mips.c: Similarly. * elfxx-mips.c: Similarly. * elfxx-sparc.c: Similarly. * linker.c (fix_syms): Base symbols in removed sections on previous section in preference to using absolute section. ld/ * ldlang.c (strip_excluded_output_sections): Do strip sections that define syms, but don't ignore them. * ld.texinfo (Output Section Discarding): Revise. * emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call finish_default. ld/testsuite/ Update for section sym changes.
* * elflink.c (_bfd_elf_gc_mark_hook): New function.Alan Modra2006-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (_bfd_elf_gc_mark_hook): Declare. * elfxx-target.h (elf_backend_gc_mark_hook): Default to above. * elf-m10300.c (mn10300_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. * elf32-arm.c (elf32_arm_gc_mark_hook): Likewise. * elf32-cris.c (cris_elf_gc_mark_hook): Likewise. * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise. * elf32-i386.c (elf_i386_gc_mark_hook): Likewise. * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise. * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise. * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise. * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise. * elf32-s390.c (elf_s390_gc_mark_hook): Likewise. * elf32-score.c (_bfd_score_elf_gc_mark_hook): Likewise. * elf32-sh.c (sh_elf_gc_mark_hook): Likewise. * elf32-vax.c (elf_vax_gc_mark_hook): Likewise. * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Likewise. * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise. * elf64-s390.c (elf_s390_gc_mark_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise. * elf32-bfin.c (bfin_gc_mark_hook): Likewise. (bfinfdpic_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define for elf32-bfinfdpic. * elf32-d10v.c (elf32_d10v_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (elf32_d10v_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-fr30.c (fr30_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (fr30_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-frv.c (elf32_frv_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (elf32_frv_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-iq2000.c (iq2000_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (iq2000_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (openrisc_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-v850.c (v850_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (v850_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (xstormy16_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf64-sh64.c (sh_elf64_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (sh_elf64_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-avr.c (elf32_avr_gc_mark_hook): Delete. (elf32_avr_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-cr16c.c (elf32_cr16c_gc_mark_hook): Delete. (elf32_cr16c_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-crx.c (elf32_crx_gc_mark_hook): Delete. (elf32_crx_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-h8300.c (elf32_h8_gc_mark_hook): Delete. (elf32_h8_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-ip2k.c (ip2k_elf_gc_mark_hook): Delete. (ip2k_elf_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-m32c.c (m32c_elf_gc_mark_hook, m32c_elf_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-m68hc11.c (elf_backend_gc_mark_hook): Don't define. (elf_backend_gc_sweep_hook): Don't define. * elf32-m68hc12.c (elf_backend_gc_mark_hook): Don't define. (elf_backend_gc_sweep_hook): Don't define. * elf32-m68hc1x.c (elf32_m68hc11_gc_mark_hook): Delete. (elf32_m68hc11_gc_sweep_hook): Delete. * elf32-m68hc1x.h (elf32_m68hc11_gc_mark_hook): Delete. (elf32_m68hc11_gc_sweep_hook): Delete. * elf32-msp430.c (elf32_msp430_gc_mark_hook): Delete. (elf32_msp430_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-mt.c (mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
* include/Jakub Jelinek2006-07-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bfdlink.h (struct bfd_link_info): Add emit_hash and emit_gnu_hash bitfields. include/elf/ * common.h (SHT_GNU_HASH, DT_GNU_HASH): Define. ld/ * scripttempl/elf.sc: Add .gnu.hash section. * emultempl/elf32.em (OPTION_HASH_STYLE): Define. (gld${EMULATION_NAME}_add_options): Register --hash-style option. (gld${EMULATION_NAME}_handle_option): Handle it. (gld${EMULATION_NAME}_list_options): Document it. * ldmain.c (main): Initialize emit_hash and emit_gnu_hash. * ld.texinfo: Document --hash-style option. bfd/ * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_GNU_HASH. (bfd_section_from_shdr, elf_fake_sections, assign_section_numbers): Handle SHT_GNU_HASH. (special_sections_g): Include .gnu.hash section. (bfd_elf_gnu_hash): New function. * elf-bfd.h (bfd_elf_gnu_hash, _bfd_elf_hash_symbol): New prototypes. (struct elf_backend_data): Add elf_hash_symbol method. * elflink.c (_bfd_elf_link_create_dynamic_sections): Create .hash only if info->emit_hash, create .gnu.hash section if info->emit_gnu_hash. (struct collect_gnu_hash_codes): New type. (elf_collect_gnu_hash_codes, elf_renumber_gnu_hash_syms, _bfd_elf_hash_symbol): New functions. (compute_bucket_count): Don't compute HASHCODES array, instead add that and NSYMS as arguments. Use bed->s->sizeof_hash_entry instead of bed->s->arch_size / 8. Fix .hash size estimation. When not optimizing, use the number of hashed symbols rather than dynsymcount. (bfd_elf_size_dynamic_sections): Only add DT_HASH if info->emit_hash, and ADD DT_GNU_HASH if info->emit_gnu_hash. (bfd_elf_size_dynsym_hash_dynstr): Size .hash only if info->emit_hash, adjust compute_bucket_count caller. Create and populate .gnu.hash section if info->emit_gnu_hash. (elf_link_output_extsym): Only populate .hash section if finfo->hash_sec != NULL. (bfd_elf_final_link): Adjust assertion. Handle DT_GNU_HASH. * elfxx-target.h (elf_backend_hash_symbol): Define if not yet defined. (elfNN_bed): Add elf_backend_hash_symbol. * elf64-x86-64.c (elf64_x86_64_hash_symbol): New function. (elf_backend_hash_symbol): Define. * elf32-i386.c (elf_i386_hash_symbol): New function. (elf_backend_hash_symbol): Define. binutils/ * readelf.c (get_dynamic_type): Handle DT_GNU_HASH. (get_section_type_name): Handle SHT_GNU_HASH. (dynamic_info_DT_GNU_HASH): New variable. (process_dynamic_section): Handle DT_GNU_HASH. (process_symbol_table): Print also DT_GNU_HASH histogram. ld/testsuite/ * ld-powerpc/tlsso32.r: Adjust. * ld-powerpc/tlsso32.d: Adjust. * ld-powerpc/tlsso32.g: Adjust. * ld-powerpc/tlsso.r: Adjust. * ld-powerpc/tlsso.g: Adjust. * ld-powerpc/tlstocso.g: Adjust.
* * elf-bfd.h (struct elf_backend_data): AddAlan Modra2006-06-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | elf_backend_modify_program_headers. * elfxx-target.h (elf_backend_modify_program_headers): Define. (elfNN_bed): Init new field. * elf.c (elf_modify_segment_map): Remove comment. (assign_file_positions_for_load_sections): Only call elf_modify_segment_map for objcopy/strip. (assign_file_positions_except_relocs): Call elf_backend_modify_program_headers. * elf32-frv.c (elf32_frvfdpic_always_size_sections): Don't make .stack section. (elf32_frvfdpic_modify_segment_map): Delete. (elf32_frvfdpic_modify_program_headers): New. (elf_backend_modify_segment_map): Don't define. (elf_backend_modify_program_headers): Define. * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Don't make .stack section. (elf32_bfinfdpic_modify_segment_map): Delete. (elf32_bfinfdpic_modify_program_headers): New. (elf_backend_modify_segment_map): Don't define. (elf_backend_modify_program_headers): Define. * elfxx-ia64.c (elfNN_ia64_modify_program_headers): New function. Split out from.. (elfNN_ia64_modify_segment_map): ..here. (elf_backend_modify_program_headers): Define.
* bfd/H.J. Lu2006-05-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-05-30 H.J. Lu <hongjiu.lu@intel.com> * bfd.c (bfd_emul_get_maxpagesize): New. (bfd_elf_set_pagesize): Likewise. (bfd_emul_set_maxpagesize): Likewise. (bfd_emul_get_commonpagesize): Likewise. (bfd_emul_set_commonpagesize): Likewise. * bfd-in2.h: Regenerated. * elf-bfd.h (elf_backend_data): Add commonpagesize. (xvec_get_elf_backend_data): New. (get_elf_backend_data): Use xvec_get_elf_backend_data. * elf32-arm.c (elf32_arm_vxworks_bed): Remove const. * elfxx-target.h (elfNN_bed): Likewise. * elf32-arm.c (ELF_COMMONPAGESIZE): Defined. * elf32-mips.c (ELF_COMMONPAGESIZE): Likewise. * elf32-ppc.c (ELF_COMMONPAGESIZE): Likewise. * elf32-sh.c (ELF_COMMONPAGESIZE): Likewise. * elf32-sh64.c (ELF_COMMONPAGESIZE): Likewise. * elf32-sparc.c (ELF_COMMONPAGESIZE): Likewise. * elf64-alpha.c (ELF_COMMONPAGESIZE): Likewise. * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise. * elf64-sparc.c (ELF_COMMONPAGESIZE): Likewise. * elf64-x86-64.c (ELF_COMMONPAGESIZE): Likewise. * elfn32-mips.c (ELF_COMMONPAGESIZE): Likewise. * elfxx-ia64.c (ELF_COMMONPAGESIZE): Likewise. * elfxx-target.h (ELF_COMMONPAGESIZE): Define if not defined. (elfNN_bed): Initialize commonpagesize with ELF_COMMONPAGESIZE. * targets.c (bfd_find_target): Support NULL abfd. ld/ 2006-05-30 H.J. Lu <hongjiu.lu@intel.com> * emulparams/arcelf.sh (MAXPAGESIZE): Changed to "CONSTANT (MAXPAGESIZE)". * emulparams/armelf_nbsd.sh: Likewise. * emulparams/armelf_vxworks.sh: Likewise. * emulparams/armnto.sh: Likewise. * emulparams/armsymbian.sh: Likewise. * emulparams/crislinux.sh: Likewise. * emulparams/elf32_i860.sh: Likewise. * emulparams/elf32_i960.sh: Likewise. * emulparams/elf32am33lin.sh: Likewise. * emulparams/elf32bfinfd.sh: Likewise. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf32frvfd.sh: Likewise. * emulparams/elf32i370.sh: Likewise. * emulparams/elf32lppcnto.sh: Likewise. * emulparams/elf32mcore.sh: Likewise. * emulparams/elf32openrisc.sh: Likewise. * emulparams/elf32ppcnto.sh: Likewise. * emulparams/elf32ppcwindiss.sh: Likewise. * emulparams/elf32vax.sh: Likewise. * emulparams/elf32xc16x.sh: Likewise. * emulparams/elf32xc16xl.sh: Likewise. * emulparams/elf32xc16xs.sh: Likewise. * emulparams/elf64_aix.sh: Likewise. * emulparams/elf64hppa.sh: Likewise. * emulparams/elf64mmix.sh: Likewise. * emulparams/elf_i386_be.sh: Likewise. * emulparams/elf_i386_chaos.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/hppa64linux.sh: Likewise. * emulparams/hppalinux.sh: Likewise. * emulparams/hppaobsd.sh: Likewise. * emulparams/i386lynx.sh: Likewise. * emulparams/i386moss.sh: Likewise. * emulparams/i386nto.sh: Likewise. * emulparams/i386nw.sh: Likewise. * emulparams/m32relf_linux.sh: Likewise. * emulparams/m68kpsos.sh: Likewise. * emulparams/or32elf.sh: Likewise. * emulparams/pjelf.sh: Likewise. * emulparams/pjlelf.sh: Likewise. * emulparams/ppclynx.sh: Likewise. * emulparams/ppcnw.sh: Likewise. * emulparams/shelf32_nbsd.sh : Likewise. * emulparams/shelf_nbsd.sh: Likewise. * emulparams/shelf_nto.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. * emulparams/xtensa-config.sh: Likewise. * emulparams/armelf_linux.sh (MAXPAGESIZE): Changed to "CONSTANT (MAXPAGESIZE)". (COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)". * emulparams/elf32_sparc.sh: Likewise. * emulparams/elf32bmip.sh: Likewise. * emulparams/elf32ppccommon.sh: Likewise. * emulparams/elf64_ia64.sh: Likewise. * emulparams/elf64_s390.sh: Likewise. * emulparams/elf64_sparc.sh: Likewise. * emulparams/elf64alpha.sh: Likewise. * emulparams/elf64ppc.sh: Likewise. * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_vxworks.sh: Likewise. * emulparams/elf_s390.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/shlelf32_linux.sh: Likewise. * emulparams/shlelf_linux.sh: Likewise. * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)". * emulparams/elf32btsmipn32.sh: Likewise. * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add "-z max-page-size=" and "-z common-page-size=". (gld${EMULATION_NAME}_list_options): Likewise. * ld.h (ld_config_type): Add maxpagesize and commonpagesize. * ld.texinfo: Document "-z max-page-size=" and "-z common-page-size=". * ldexp.c (exp_print_token): Handle CONSTANT. (fold_name): Likewise. * ldgram.y: Likewise. * ldlex.l: Likewise. * ldmain.c (main): Initiliaze config.maxpagesize and config.commonpagesize. Call bfd_emul_set_maxpagesize if config.maxpagesize isn't 0. Call bfd_emul_set_commonpagesize if config.commonpagesize config.maxpagesize isn't 0. ld/testsuite/ 2006-05-30 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/binutils.exp: New file. * ld-elf/commonpage1.d: Likewise. * ld-elf/maxpage1.d: Likewise. * ld-elf/maxpage1.s: Likewise.
* 2006-05-24 Paul Brook <paul@codesourcery.com>Paul Brook2006-05-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | bfd/ * elf-bfd.h (elf_backend_data): Add elf_backend_output_arch_local_syms * elf32-arm.c (output_arch_syminfo): Define. (elf32_arm_ouput_plt_map_sym, elf32_arm_output_plt_map, elf32_arm_output_arch_local_syms): New functions. (elf_backend_output_arch_local_syms): Define. * elflink.c (bfd_elf_final_link): Call elf_backend_output_arch_local_syms. * elfxx-target.h (elf_backend_output_arch_local_syms): Provide default definition. (elfNN_bed): Add elf_backend_output_arch_local_syms. ld/testsuite/ * ld-arm/arm-app-abs32.d: Update expected output. * ld-arm/arm-app.d: Ditto. * ld-arm/arm-lib-plt32.d: Ditto. * ld-arm/arm-lib.d: Ditto. * ld-arm/mixed-app-v5.d: Ditto. * ld-arm/mixed-app.d: Ditto. * ld-arm/mixed-lib.d: Ditto.
* 2006-04-25 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2006-04-251-1/+3
| | | | | | | | | | | | | | | | | | | | PR binutils/2467 * elf.c (_bfd_elf_close_and_cleanup): Check elf_tdata (abfd) is NULL first. * elf32-arm.c (elf32_arm_close_and_cleanup): Check if abfd->sections is NULL. (elf32_arm_bfd_free_cached_info): New. (bfd_elf32_bfd_free_cached_info): Defined. * elfxx-target.h (bfd_elfNN_bfd_free_cached_info): Default it to _bfd_free_cached_info. * libbfd-in.h (_bfd_free_cached_info): New. * libbfd: Regenerated. * opncls.c (_bfd_delete_bfd): Check if abfd->memory is NULL. (_bfd_free_cached_info): New.
* 2006-02-24 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2006-02-241-0/+4
| | | | | | | | | | | | | | | PR ld/2218 * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol. (_bfd_elf_link_hash_fixup_symbol): New. * elflink.c (_bfd_elf_link_hash_fixup_symbol): New. (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if it isn't NULL. * elfxx-ia64.c (elf_backend_fixup_symbol): Defined. * elfxx-target.h (elf_backend_fixup_symbol): New. (elfNN_bed): Initialize elf_backend_fixup_symbol.
* * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.Alan Modra2006-01-171-1/+5
| | | | | | | | | | | (bfd_elf_gc_mark_dynamic_ref_symbol): Declare. * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from elf_gc_mark_dynamic_ref_symbol. Make global. (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref. * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define. (elfNN_bed): Init new field. * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define. (ppc64_elf_gc_mark_dynamic_ref): New function.
* PR 1150Nick Clifton2005-12-231-0/+4
| | | | | | | | | | | * elf-bfd.h (struct elf_backend_data): New field 'elf_backend_ignore_undef_symbol'. * elfxx-target.h (elf_backend_ignore_undef_symbol): Define to NULL if not already defined. (elfNN_bed): Initialise the elf_backend_ignore_undef_symbol field. * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): New function. * elfxx-mips.h (elf_backend_ignore_undef_symbol): Define and prototype. * elflink.c (elf_link_output_extsym): Check elf_backend_ignore_undef_symbol before reporting an undefined symbol in a shared library.
* PR 1147Nick Clifton2005-08-081-0/+2
| | | | | | | | | | | | elf32-arm.c (bfd_elf32_close_and_cleanup): Define. (elf32_arm_close_and_cleanup): New function - walk over the sections in the bfd that is being closed removing them from the list of recorded sections. (unrecord_section_via_map_over_sections): New helper function. (record_section_with_arm_elf_section_data): Call bfd_malloc instead of bfd_alloc. Remove unneeded abfd parameter. (elf32_arm_new_section_hook): Do not pass bfd to record_section_with_arm_elf_section_data. elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not already defined by the target.
* * elf-bfd.h (struct elf_backend_data): Add action_discarded.Alan Modra2005-07-291-0/+4
| | | | | | | | | | | | | | | | | (enum action_discarded): Move from.. * elflink.c (enum action_discarded): ..here. (_bfd_elf_default_action_discarded): Rename from elf_action_discarded. Remove target specific section checks. (elf_link_input_bfd): Adjust. * elfxx-target.h (elf_backend_action_discarded): Define. (elfNN_bed): Init new field. * bfd-in.h (_bfd_elf_default_action_discarded): Declare. * bfd-in2.h: Regenerate. * elf-hppa.h (elf_hppa_action_discarded): New function. * elf32-hppa.c (elf_backend_action_discarded): Define. * elf64-hppa.c (elf_backend_action_discarded): Define. * elf32-ppc.c (ppc_elf_action_discarded): New function. (elf_backend_action_discarded): Define.
* 2005-07-25 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-07-251-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (elf_backend_data): Add common_definition, common_section_index, common_section, and merge_symbol. (_bfd_elf_common_definition): New. (_bfd_elf_common_section_index): New. (_bfd_elf_common_section): New. * elf.c (elf_fake_sections): Don't clear sh_flags. * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol if it is available. (is_global_data_symbol_definition): Call backend common_definition instead of checking SHN_COMMON. (elf_link_add_object_symbols): Likewise. (elf_link_output_extsym): Call backend common_section_index for common section index. (_bfd_elf_common_definition): New. (_bfd_elf_common_section_index): New. (_bfd_elf_common_section): New. * elfxx-target.h (elf_backend_common_definition): New. (elf_backend_common_section_index): New. (elf_backend_common_section): New. (elf_backend_merge_symbol): New. (elfNN_bed): Initialize common_definition, common_section_index, common_section, and merge_symbol. * section.c (BFD_FAKE_SECTION): New. (STD_SECTION): Use it. * bfd-in2.h: Regenerated.
* 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-07-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (elf_backend_data): Add special_sections. * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections first. * elf32-arm.c (elf_backend_get_sec_type_attr): Removed. (elf_backend_special_sections): New. Defined. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-mcore.c: Likewise. * elf32-sh64.c: Likewise. * elf32-v850.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-mips.h: Likewise. * elfxx-target.h (elf_backend_special_sections): New. (elfNN_bed): Initialize special_sections.
* PR 1004Alan Modra2005-07-041-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete special_sections. (_bfd_elf_get_special_section): Declare. (bfd_elf_special_section): Update prototype. * elf.c (special_sections): Remove unused outer entries. (get_special_section): Delete. (_bfd_elf_get_special_section): New function. (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update special_sections indexing. (_bfd_elf_new_section_hook): Call backend get_sec_type_attr. * elf32-arm.c (symbian_special_sections_d): Delete. (symbian_special_sections_g, symbian_special_sections_h): Delete. (symbian_special_sections_i, symbian_special_sections_f): Delete. (symbian_special_sections_p): Delete. (elf32_arm_symbian_special_sections): Merge above to here. (elf32_arm_symbian_get_sec_type_attr): New function. (elf_backend_special_sections): Don't define. (elf_backend_get_sec_type_attr): Define. * elf32-m32r.c: Similarly to elf32-arm.c. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-mcore.c: Likewise. * elf32-sh64.c: Likewise. * elf32-v850.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elf32-ppc.c: Likewise. (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable. * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare. (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete. (elf_backend_get_sec_type_attr): Define. * elfxx-target.h (elf_backend_get_sec_type_attr): Define. (elf_backend_special_sections): Don't define. (elfNN_bed): Update. binutils/ * objcopy.c (copy_object): Use bfd_make_section_with_flags. (write_debugging_info): Likewise. (setup_section): Use bfd_make_section_anyway_with_flags. gas/ * config/obj-elf.c (obj_elf_change_section): Use backend get_sec_type_attr.
* Approved by nickc@redhat.comFred Fish2005-05-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-05-23 Fred Fish <fnf@specifixinc.com> * dwarf2.c (struct dwarf2_debug): Add inliner_chain member. (struct funcinfo): Add caller_func, caller_file, caller_line. tag, and nesting_level members. (lookup_address_in_function_table): Change first passed parameter from "struct funcinfo *" to "struct comp_unit *". (lookup_address_in_function_table): Dereference unit to find function table. (lookup_address_in_function_table): Traverse the function list to create a chain of inlined functions back to the first non inlined function. (scan_unit_for_functions): Remember tag and nesting level. Handle DW_AT_call_file and DW_AT_call_line. (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table call to pass unit pointer instead of function table pointer. For inlined functions, save pointer to the inliner chain. (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL. (_bfd_dwarf2_find_inliner_info): New function that returns information from the inliner chain after a call to bfd_find_nearest_line. * bfd.c (bfd_find_inliner_info): Define using BFD_SEND. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for NAME##_find_inliner_info. (bfd_target): Add _bfd_find_inliner_info. * bfd-in2.h: Regenerate. * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as macro that always returns bfd_false. (_bfd_dwarf2_find_inliner_info): Declare. * libbfd.h: Regenerate. * elf32-arm.c (elf32_arm_find_inliner_info): New function that calls _bfd_dwarf2_find_inliner_info. (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info. * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function that calls _bfd_dwarf2_find_inliner_info. * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare. * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to _bfd_mips_elf_find_inliner_info. * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto. * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto. * elf.c (_bfd_elf_find_inliner_info): New function that calls _bfd_dwarf2_find_inliner_info. * elf-bfd.h (_bfd_elf_find_inliner_info): Declare. * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to _bfd_elf_find_inliner_info. * coffgen.c (coff_find_inliner_info): New function that calls _bfd_dwarf2_find_inliner_info. * libcoff-in.h (coff_find_inliner_info): Declare. * libcoff.h: Regenerate. * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info. (pmac_xcoff_vec) Ditto. * coff64-rs6000.c (rs6000coff64_vec): Ditto. (aix5coff64_vec): Ditto. * aout-target.h (MY_find_inliner_info): Define as _bfd_nosymbols_find_inliner_info. * aout-tic30.c (MY_find_inliner_info): Ditto. * binary.c (binary_find_inliner_info): Ditto. * i386msdos.c (msdos_find_inliner_info): Ditto. * ihex.c (ihex_find_inliner_info): Ditto. * libaout.h (aout_32_find_inliner_info): Ditto. * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto. * mach-o.c (bfd_mach_o_find_inliner_info): Ditto. * mmo.c (mmo_find_inliner_info): Ditto. * nlm-target.h (nlm_find_inliner_info): Ditto. * pef.c (bfd_pef_find_inliner_info): Ditto. * ppcboot.c (ppcboot_find_inliner_info): Ditto. * srec.c (srec_find_inliner_info): Ditto. * tekhex.c (tekhex_find_inliner_info): Ditto. * versados.c (versados_find_inliner_info): Ditto. * xsym.c (bfd_sym_find_inliner_info): Ditto. * ieee.c (ieee_find_inliner_info): New function that always returns FALSE. * oasys.c (oasys_find_inliner_info): Ditto. * vms.c (vms_find_inliner_info): Ditto.
* bfd/Alan Modra2005-05-071-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset. * elfxx-target.h (elf_backend_got_symbol_offset): Delete. * elflink.c (_bfd_elf_create_got_section): Use zero in place of got_symbol_offset. * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise. * elf32-frv.c (_frv_create_got_section): Likewise. * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code. (elf_backend_got_symbol_offset): Don't define. * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define. * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size and got_gap. (ppc_elf_create_got): Tidy. (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt. (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot. (ppc_elf_gc_sweep_hook): Likewise. (ppc_elf_relocate_section): Likewise. (ppc_elf_finish_dynamic_symbol): Likewise. (allocate_got): New function. (allocate_dynrelocs): Use allocate_got. (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation so that local got can refcount it. Set got_header_size. (ppc_elf_relocate_section): Use value of elf.hgot rather than hard- coded 4. (ppc_elf_finish_dynamic_sections): Likewise. (elf_backend_got_symbol_offset): Don't define. (elf_backend_got_header_size): Ditto. ld/testsuite/ * ld-powerpc/tlsexe32.d: Update for changed got layout. * ld-powerpc/tlsexe32.g: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsso32.d: Likewise. * ld-powerpc/tlsso32.g: Likewise. * ld-powerpc/tlsso32.r: Likewise.
* 2005-05-05 Paul Brook <paul@codesourcery.com>Paul Brook2005-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks. * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need elf-vxworks.lo. * configure: Regenerate. * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo. (BFD32_BACKENDS_CFILES): Add elf-vxworks.c. (elf32-i386.lo): Depend on elf-vxworks.h. (elf-vxworks.lo): New rule. * Makefile.in: Regenerate. * elf-bfd.h (elf_backend_data): Update type of elf_backend_emit_relocs. (_bfd_elf_link_output_relocs): Update prototype. * elflink.c (_bfd_elf_link_output_relocs): Always use bed->elf_backend_emit_relocs when outputting relocations. * elfxx-target.h (elf_backend_emit_relocs): Default to _bfd_elf_link_output_relocs. * targets.c (bfd_elf32_i386_vxworks_vec): Declare. (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec. * elf32-i386.c: Add elf32-i386-vxworks target BFD. (elf_i386_plt0_entry): Remove padding. (elf_i386_pic_plt0_entry): Ditto. (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define. (PLT_NON_JUMP_SLOT_RELOCS): Define. (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and plt0_pad_byte fields. (elf_i386_link_hash_table_create): Zero them. (elf_i386_create_dynamic_sections): Create static relocation section. (allocate_dynrelocs): Allocate space for static PLT relocations. (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT symbols. Give PLT symbols function type. Don't strip PLT sections if we have exported symbols from them. (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on VxWorks. (elf_i386_finish_dynamic_sections): Allow different pad bytes. Add relocation for GOT location. Fill in PLT static relocations. (elf_i386_vxworks_link_hash_table_create): New function. (elf_i386_vxworks_link_output_symbol_hook): New function. * elf-vxworks.h: New file. gas/ * config/tc-i386.h (ELF_TARGET_FORMAT): Define for TE_VXWORKS. gas/testsuite/ * gas/i386/i386.exp: Don't run divide test on vxworks. ld/ * Makefile.am: Add eelf_i386_vxworks. * Makefile.in: Regenerate. * configure.tgt: Make i?86-*-vxworks use targ_emul=elf_i386_vxworks. * emulparams/elf_i386_vxworks.sh: New file. * emulparams/vxworks.sh: New file. * scripttempl/elf.sc: Add DATA_END_SYMBOLS and ETEXT_NAME.
* Update the address and phone number of the FSF organization in the GPL noticesNick Clifton2005-05-041-1/+1
|
* Update the FSF address in the copyright/GPL noticeNick Clifton2005-05-041-1/+1
|
* * elf.c (bfd_section_from_shdr <default case>): CallZack Weinberg2005-03-021-2/+2
| | | | | | | | | | elf_backend_section_from_shdr hook unconditionally, and return what it returns. (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr. * elfxx-target.h (elf_backend_section_from_shdr) (elf_backend_section_from_phdr): Default to _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr respectively.
* bfd/H.J. Lu2005-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK. Replace SEC_SHARED with SEC_COFF_SHARED. (styp_to_sec_flags): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0. (TARGET_LITTLE_SYM): Likewise. * section.c (SEC_ARCH_BIT_0): Removed. (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE. (SEC_SHARED): Renamed to ... (SEC_COFF_SHARED): This. (SEC_BLOCK): Renamed to ... (SEC_TIC54X_BLOCK): This. (SEC_CLINK): Renamed to ... (SEC_TIC54X_CLINK): This. (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY, SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the end. * bfd-in2.h: Regenerated. binutils/ 2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * objcopy.c (parse_flags): Replace SEC_SHARED with SEC_COFF_SHARED. * objdump.c (dump_section_header): Dump SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK for TI c54x only. Remove SEC_ARCH_BIT_0. Dump SEC_COFF_SHARED for COFF only. gas/ 2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * config/obj-coff.c (obj_coff_section): Replace SEC_SHARED with SEC_COFF_SHARED. * config/tc-tic54x.c (tic54x_bss): Replace SEC_BLOCK with SEC_TIC54X_BLOCK. (demand_empty_rest_of_line): Likewise. (tic54x_sblock): Likewise. (tic54x_clink): Replace with SEC_CLINK with SEC_TIC54X_CLINK. ld/ 2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI tic54x input only. (lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF and ECOFF output only.
* * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.Ben Elliston2005-01-311-0/+4
|
* * elf-bfd.h (bfd_elf_discard_group): Remove.Ben Elliston2005-01-311-4/+0
| | | | | * elf.c (bfd_elf_discard_group): Likewise. * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
* * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.Richard Sandiford2005-01-311-0/+4
| | | | | | | | | | | | | (_bfd_elf_eh_frame_address_size): Declare. * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default. (elfNN_bed): Initialize elf_backend_eh_frame_address_size. * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare. (elf_backend_eh_frame_address_size): Define. * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address size from the new backend hook. (_bfd_elf_write_section_eh_frame): Likewise. (_bfd_elf_eh_frame_address_size): New function.
* * elf-bfd.h (struct elf_backend_data): Add minpagesize.Daniel Jacobowitz2005-01-281-1/+6
| | | | | | | | | * elf32-arm.c (ELF_MINPAGESIZE): Define. * elf32-ppc.c (ELF_MINPAGESIZE): Define. * elfcode.h (elf_object_p): Use minpagesize instead of maxpagesize. * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE. (elfNN_bed): Include ELF_MINPAGESIZE.
* Implement a new BFD API function: bfd_is_target_special_symbol. Use this in nmNick Clifton2004-10-081-0/+4
| | | | | and objdump to skip the displaying of ARM Mapping symbols unless specifically requested.
* * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.Mark Mitchell2004-09-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in (bfd_elf32_bigarm_symbian_vec): Add it. (bfd_elf32_littlearm_symbian_vec): Likewise. * configure: Regenerated. * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags. * elf32-arm.h (PLT_HEADER_SIZE): Do not define. (PLT_ENTRY_SIZE): Likewise. (bfd_vma_elf32_arm_symbian_plt_entry): New variable. (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size, and symbian_p. (create_got_section): Don't create sections when generating BPABI objects. (elf32_arm_create_dynamic_sections): Tidy. (elf32_arm_link_hash_table_create): Set plt_header_size, plt_entry_size, and symbian_p. (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when generating BPABI objects. (allocate_dynrelocs): Use htab->plt_header_size, not PLT_HEADER_SIZE. Do not add to .got.plt when generating BPABI objects. (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs. * elfarm-nabi.c: Add SymbianOS target vectors. * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags. (_bfd_elf_link_create_dynamic_sections): Likewise. * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro. (elfNN_bed): Use it. * targets.c (bfd_elf32_bigarm_symbian_vec): New variable. (bfd_elf32_littlearm_symbian_vec): Likewise. (_bfd_target_vector): Add them. * Makefile.am (TARG_ENV_HFILES): Add te-symbian.h. * Makefile.in: Regenerated. * configure.in: Set em for arm*-*-symbianelf*. * configure: Regenerated. * config/tc-arm.c (elf32_arm_target_format): Use Symbian target vectors when appropriate. * config/te-symbian.h: New file. * Makefile.am (ALL_EMULATIONS): Add earmsymbian.o. (earmsymbian.c): New target. * configure.tgt: Use armsymbian emulation for arm*-*-symbianelf*. * Makefile.in: Regenerated. * aclocal.m4: Likewise. * configure: Likewise. * emulparams/armsymbian.sh: New file.
* bfd/Jakub Jelinek2004-08-171-0/+2
| | | | | | | | | | | | | | | | | * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define if not yet defined. * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define. (synthetic_opd, synthetic_relocatable): New variables. (compare_symbols, compare_relocs): New helper routines. (ppc64_elf_get_synthetic_symtab): New function. * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument to relsyms. * bfd-in2.h: Regenerated. * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument to relsyms. Return 0 if abfd is relocatable. binutils/ * objdump.c (dump_bfd): For relocatable objects, pass syms instead of dynsyms to bfd_get_synthetic_symtab.
* * elf-bfd.h (struct elf_backend_data): AddAlan Modra2004-08-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | elf_backend_archive_symbol_lookup. (_bfd_elf_archive_symbol_lookup): Declare. * elflink.c (_bfd_elf_archive_symbol_lookup): New function.. (elf_link_add_archive_symbols): ..extracted from here. Call the backend version. * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default. (elfNN_bed): Init new field. * elf64-ppc.c (elf_backend_check_directives): Define. (elf_backend_archive_symbol_lookup): Define. (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add a ppc_link_hash_entry pointer. (get_fdh): Move. (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions. (add_symbol_adjust, ppc64_elf_check_directives): New functions. (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust, ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup, ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub, ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section, ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function descriptor symbols.
* 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2004-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Nick Clifton <nickc@redhat.com> PR 290 * bfd.c (_bfd_default_error_handler): Make it global. * elf-bfd.h (elf_backend_data): Add link_order_error_handler. * elf.c (assign_section_numbers): Cope gracefully with sections which have SHF_LINK_ORDER set but no sh_link set up. * elflink.c (elf_get_linked_section_vma): Likewise. * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set it to NULL. * elfxx-target.h (elf_backend_link_order_error_handler): New. Set it to _bfd_default_error_handler. (elfNN_bed): Add elf_backend_link_order_error_handler. * libbfd-in.h (_bfd_default_error_handler): New. * libbfd.h: Regenerated.
* bfd/H.J. Lu2004-07-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add support for sh-symbian-elf targetNick Clifton2004-07-061-0/+4
|
* bfd/ChangeLog:Alexandre Oliva2004-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf-bfd.h (struct elf_backend_data): Added elf_backend_omit_section_dynsym. (_bfd_elf_link_omit_section_dynsym): Declare. * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New. (elf_backend_omit_section_dynsym): Use it for frvfdpic. * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of... (_bfd_elf_link_renumber_dynsyms): ... this function. * elfxx-target.h (elf_backend_omit_section_dynsym): Default to _bfd_elf_link_omit_section_dynsym). (elfNN_bed): Added elf_backend_omit_section_dynsym. ld/ChangeLog: * emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes. ld/testsuite/ChangeLog: * ld-frv/fdpic-pie-1.d: Adjust for pie-specific link script. * ld-frv/fdpic-pie-2.d: Likewise. * ld-frv/fdpic-pie-6.d: Likewise. * ld-frv/fdpic-pie-7.d: Likewise. * ld-frv/fdpic-pie-8.d: Likewise. * ld-frv/fdpic-shared-1.d: Likewise. * ld-frv/fdpic-shared-2.d: Likewise. * ld-frv/fdpic-shared-3.d: Likewise. * ld-frv/fdpic-shared-4.d: Likewise. * ld-frv/fdpic-shared-5.d: Likewise. * ld-frv/fdpic-shared-6.d: Likewise. * ld-frv/fdpic-shared-7.d: Likewise. * ld-frv/fdpic-shared-8.d: Likewise. * ld-frv/fdpic-shared-local-2.d: Likewise. * ld-frv/fdpic-shared-local-8.d: Likewise.
* binutils ChangeLog:Bob Wilson2004-05-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
OpenPOWER on IntegriCloud