aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-target.h
AgeCommit message (Collapse)AuthorFilesLines
2001-09-29 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.Alan Modra1-0/+4
(struct elf_backend_data): Add can_refcount. * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set got.refcount and plt.refcount from init_refcount. (_bfd_elf_link_hash_table_init): Set up init_refcount. (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount rather than got/plt.offset, and test for <= 0 rather than -1. * elflink.h (size_dynamic_sections): Set init_refcount to -1. * elfxx-target.h (elf_backend_can_refcount): Define. (elfNN_bed): Init can_refcount. * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts. (_bfd_generic_link_hash_newfunc): Likewise. * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts starting from zero. (elf32_hppa_copy_indirect_symbol): Make static to agree with prototype. (elf_backend_can_refcount): Define. * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts starting from zero. (allocate_dynrelocs): Set plt/got.offset rather than *.refcount. (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment. (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars. (elf_backend_can_refcount): Define. (elf_i386_copy_indirect_symbol): Make static to agree with prototype. Formatting fix. * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define.
2001-09-28 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,Richard Henderson1-8/+10
SEC_MERGE, SEC_STRINGS.
2001-09-18Touches most files in bfd/, so likely will be blamed for everything..Alan Modra1-2/+3
o bfd_read and bfd_write lose an unnecessary param and become bfd_bread and bfd_bwrite. o bfd_*alloc now all take a bfd_size_type arg, and will error if size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files or bugs in linker scripts etc. o file_ptr becomes a bfd_signed_vma. Besides matching sizes with various other types involved in handling sections, this should make it easier for bfd to support a 64 bit off_t on 32 bit hosts that provide it. o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*) generally available. They now cast their args to bfd_vma and bfd_byte * as appropriate, which removes a swag of casts from the source. o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and aout-encap.c. o Zillions of formatting and -Wconversion fixes.
2001-08-24Apply H.J.'s patch to revert change to elfxx-target.hNick Clifton1-2/+11
Apply my patch to allow SREC as output format.
2001-08-23 * elf-bfd.h (enum elf_reloc_type_class): New.Jakub Jelinek1-0/+4
(struct elf_backend_data): Add elf_backend_reloc_type_class. (_bfd_elf_reloc_type_class): New. * elfxx-target.h (elf_backend_reloc_type_class): Define. (elfNN_bed): Add elf_backend_reloc_type_class. * elf.c (_bfd_elf_reloc_type_class): New. * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf_i386_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf32_sparc_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (sparc64_elf_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field. (elfNN_ia64_hash_table_create): Clear ia64_info. (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only section. (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag instead of looking up section names for DT_TEXTREL. (elfNN_ia64_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elflink.h (size_dynamic_sections): Add spare DT_NULL tags. (struct elf_link_sort_rela): New. (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New. (elf_bfd_final_link): Call elf_link_sort_relocs. Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if necessary. * bfdlink.h (struct bfd_link_info): Add combreloc and spare_dynamic_tags fields. * emultempl/elf32.em (place_orphan): Place orphan .rel* sections into .rel.dyn resp. .rela.dyn if combreloc. (get_script): If .x linker script is equal to .xn, only put it once into the binary. Add .xc and .xsc scripts. (parse_args): Handle -z combreloc and -z nocombreloc. * scripttempl/elf.sc (.rela.sbss): Fix a typo. For .xc and .xsc scripts put all .rel* or .rela* input sections but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn. * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME is elf. Strip trailing whitespace from script. Generate .xc and .xsc scripts if requested. * ldmain.c (main): Initialize link_info.combreloc and link_info.spare_dynamic_tags. * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define. (ld_options): Add --spare-dynamic-tags option. (parse_args): Likewise. * ld.texinfo: Document -z combreloc and -z nocombreloc. * ldint.texinfo: Document .xc and .xsc linker scripts. * NEWS: Add notes about -z combreloc and SHF_MERGE.
2001-08-20Never select the generic has table creator. All elf backends need elf specificNick Clifton1-6/+1
fields in the hash table.
2001-08-11replace direct invocation og elf vma print functions with indirect invocationNick Clifton1-0/+8
2001-08-08 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.Alan Modra1-1/+5
* elfxx-target.h (elf_backend_want_got_sym): Define. (elfNN_bed): Add elf_backend_want_got_sym. * elflink.c (_bfd_elf_create_got_section): Define _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2001-06-30 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosectionAlan Modra1-0/+8
and _bfd_elfcore_strndup. (struct elf_backend_data): Add elf_backend_grok_prstatus and elf_backend_grok_psinfo. * elf.c (_bfd_elfcore_make_pseudosection): New function. (elfcore_grok_prstatus): Use it. (elfcore_make_note_pseudosection): Likewise. (elfcore_strndup): Rename to... (_bfd_elfcore_strndup): Here, and make global. (elfcore_grok_psinfo): Use _bfd_elfcore_strndup. (elfcore_grok_note): Call elf_backend_grok_prstatus and elf_backend_grok_psinfo if available. * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function. (_bfd_elf32_mips_grok_psinfo): New function. (elf_backend_grok_prstatus): Define. (elf_backend_grok_psinfo): Define. * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL. (elf_backend_grok_psinfo): Likewise. (elfNN_bed): Include elf_backend_grok_prstatus and elf_backend_grok_psinfo.
2001-06-20 * elf-bfd.h (struct elf_backend_data):Catherine Moore1-0/+8
elf_backend_emit_relocs: New field: Function for emitting relocs. elf_backend_count_relocs: New field: Function for determining the number of relocs to be emitted. * elfxx-target.h: Provide default (NULL) values for elf_backend_emit_relocs and elf_backend_count_relocs. * elflink.h (elf_link_size_reloc_section): Make the hash table big enough to hold the relocs counted by either reloc_count or o->reloc_count. (elf_bfd_final_link) emit_relocs: New boolean, set if relocs should be emitted, either because of a command line option stored in the info structure or because the target provides a special reloc emitting function. If the target provides a reloc counting function use it, unless performing a relocatable link or emitting all relocs. Also set the SEC_RELOC flag on any output section which will contain relocs. (elf_link_input_bfd): emit_relocs: New boolean, set if relocs should be emitted, either because of a command line option stored in the info structure or because the target provides a special reloc emitting function. If the target provides a reloc emitting function, use it, unless performing a relocatable link or emitting all relocs.
2001-05-23Add MIPS r12k supportNick Clifton1-0/+2
2001-05-11 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffixJakub Jelinek1-0/+5
fields, change sec into secinfo. (struct sec_merge_info): Add chain, remove last fields. (struct sec_merge_sec_info): Add next, sec, psecinfo fields. (sec_merge_hash_lookup): If lookup could not use a string only because it has bad alignment, mark the old string for deletion. (sec_merge_add): Add secinfo argument. Don't compute entry's position, instead record the section. (sec_merge_emit): Update for the sec into secinfo change in struct sec_merge_hash_entry. (_bfd_merge_section): Only record the section for merging, defer putting strings into the hash table. (cmplengthentry, last4_eq, last_eq, record_section, merge_strings, _bfd_merge_sections): New functions. (_bfd_merged_section_offset): Update for the sec_merge_hash_entry changes. * libbfd-in.h (_bfd_merge_sections): Add prototype. (_bfd_nolink_bfd_merge_sections): Define. * libbfd.h: Likewise. (bfd_generic_merge_sections): Add prototype. * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections. (struct bfd_target): Likewise. * bfd.c (bfd_merge_sections): Define. * bfd-in2.h: Rebuilt. * elf.c (_bfd_elf_merge_sections): New function. * elf-bfd.h (_bfd_elf_merge_sections): Add prototype. * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define. * reloc.c (bfd_generic_merge_sections): New function. * vms.c (vms_bfd_merge_sections): New function. * aout-adobe.c (aout_32_bfd_merge_sections): Define. * aout-target.h (MY_bfd_merge_sections): Define. * aout-tic30.c (MY_bfd_merge_sections): Define. * binary.c (binary_bfd_merge_sections): Define. * bout.c (b_out_bfd_merge_sections): Define. * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define. * coffcode.c (coff_bfd_merge_sections): Define. * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define. * i386msdos.c (msdos_bfd_merge_sections): Define. * i386os9k.c (os9k_bfd_merge_sections): Define. * ieee.c (ieee_bfd_merge_sections): Define. * ihex.c (ihex_bfd_merge_sections): Define. * nlm-target.h (nlm_bfd_merge_sections): Define. * oasys.c (oasys_bfd_merge_sections): Define. * ppcboot.c (ppcboot_bfd_merge_sections): Define. * som.c (som_bfd_merge_sections): Define. * srec.c (srec_bfd_merge_sections): Define. * tekhex.c (tekhex_bfd_merge_sections): Define. * versados.c (versados_bfd_merge_sections): Define. * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define. * ldlang.c (lang_process): Call bfd_merge_sections.
2001-03-08Update copyright noticesNick Clifton1-1/+2
2001-01-032001-01-03 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-5/+5
* ecoffswap.h: Fix formatting. * elf-bfd.h: Likewise. * elfarm-nabi.c: Likewise. * elfarm-oabi.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elflink.h: Likewise. * elfxx-ia64.c: Likewise. * elfxx-target.h: Likewise.
2000-10-05Preserve machine dependent section header flags when reading ELF object file.Jim Wilson1-0/+4
* elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags field. * elf.c (_bfd_elf_make_section_from_shdr): Call the elf_backend_section_flags function. * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion code. (elf64_ia64_section_flags): New function containing flag conversion code. (elf_backend_section_flags): Define to elf64_ia64_section_flags. * elfxx-target.h (elf_backend_section_flags): Define. (elfNN_bed): Initialize elf_backend_section_flags field.
2000-07-022000-07-01 Koundinya K <kk@ddeorg.soft.net>Ulf Carlsson1-0/+2
* config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4* to add a new target for traditional mips i.e bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec. * configure.in: Likewise. * configure: Rebuild. * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in bfd_target_vector. (bfd_elf32_tradlittlemips_vec): Likewise. * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test to see that elfNN_bed does not get redefined even if the target file is included twice for a chip. See elf32-mips.c.
2000-06-19Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add supportNick Clifton1-1/+0
for m68hc11 and m68hc12 processors.
2000-02-18 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirectRichard Henderson1-0/+9
and hide_symbol members. (elf_link_hash_copy_indirect): Remove. (elf_link_hash_hide_symbol): Remove. (struct elf_backend_data): Add elf_backend_copy_indirect_symbol and elf_backend_hide_symbol. (_bfd_elf_link_hash_copy_indirect): Declare. (_bfd_elf_link_hash_hide_symbol): Declare. * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument. (_bfd_elf_link_hash_hide_symbol): Likewise. (_bfd_elf_link_hash_table_init): Don't init killed members. * elflink.h (elf_link_add_object_symbols): Use the bed function pointers not elf_link_hash_{copy_indirect,hide_symbol}. (elf_link_assign_sym_version): Likewise. * elfxx-target.h (elf_backend_copy_indirect_symbol): Default. (elf_backend_hide_symbol): Likewise. (elfNN_bed): Update for new members.
1999-12-10Revert previous patch.Nick Clifton1-9/+0
1999-12-10Change AR for ELF so that common symbols are not included in archive map.Nick Clifton1-0/+9
Change LD for ELF so that archive elements whoes archive map contains a reference to a common symbol will get linkled in. Add new field to bfd_target structure and initialise it for all bfd targets.
1999-11-26Add support for target specific processing of ELF segmentsNick Clifton1-0/+4
1999-11-18 * elf-bfd.h (struct elf_backend_data): Reorder collect andRichard Henderson1-2/+7
type_change_ok; add sign_extend_vma. * elf32-mips.c (elf_backend_sign_extend_vma): Define. * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma. (elf_swap_shdr_in, elf_swap_phdr_in): Likewise. * elfxx-target.h (elf_backend_sign_extend_vma): Default. (elfNN_bed): Follow struture changes.
1999-07-30Jakub Jelinek <jj@ultra.linux.cz>Richard Henderson1-0/+8
* elf-bfd.h (struct elf_backend_data): Add print_symbol_all and output_arch_syms backend methods. * elfxx-target.h: Likewise. * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create, sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms, sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New functions. (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER symbols in .dynsym, add their names into .dynstr. Put those symbols into dynlocal. (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER pointers to STT_REGISTER symbols in dynsym section. (sparc64_elf_print_symbol_all): New function. * elf.c (bfd_elf_print_symbol): Allow special backend symbol printing using the print_symbol_all hook.
1999-07-19Add new field to bfd_target structure.Nick Clifton1-2/+21
Initialise this field for all known bfd targets. Add new search function to targets.c
1999-07-14 * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.Richard Henderson1-1/+2
1999-07-13 * elf-bfd.h (struct elf_backend_data): Add want_dynbss.Richard Henderson1-0/+3
* elflink.c (_bfd_elf_create_dynamic_sections): Only create .dynbss and .rel[a].bss if want_dynbss. * elfxx-target.h (elf_backend_want_dynbss): Provide default.
1999-06-04Define ELF_MAXPAGESIZE for all ELF based ports.Nick Clifton1-2/+2
Produce an error message of ELF_MAXPAGESIZE is not defined.
1999-06-04(ELF_MAXPAGESIZE): Default to 0x1000 not 1Nick Clifton1-1/+2
1999-06-02 * elf-bfd.h (elf_backend_data): Remove use_rela_p. AddMark Mitchell1-5/+25
may_use_rel_p, may_use_rela_p, default_use_rela_p. (bfd_elf_section_data): Add use_rela_p. * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately. (_bfd_elf_new_section_hook): Likewise. (elf_fake_sections): Use may_use_rela_p, etc., instead of use_rela_p. (_bfd_elf_copy_private_section_data): Copy use_rela_p. * elfcode.h (write_relocs): Determine whether or not use rela relocs based on the relocation section header. * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p instead of use_rela_p. * elfxx-target.h (elf_backend_may_use_relp): New macro. (elf_backend_may_use_rela_p): Likewise. (elf_backend_default_use_rela_p): Likewise. (elfNN_bed): Use them.
1999-05-28Initialise EI_OSABI and EI_ABIVERSION fields of e_ident array.Nick Clifton1-0/+4
Add ability for backends to process program and section headers after they have been created.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+536