summaryrefslogtreecommitdiffstats
path: root/bfd/elf32-sparc.c
Commit message (Collapse)AuthorAgeFilesLines
* Touches most files in bfd/, so likely will be blamed for everything..Alan Modra2001-09-181-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix bug emitting R_SPARC_UA32 relocs into shared objectsNick Clifton2001-09-141-1/+1
|
* Add missing prototypesNick Clifton2001-08-251-0/+6
|
* * elf-bfd.h (enum elf_reloc_type_class): New.Jakub Jelinek2001-08-231-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support forJakub Jelinek2001-07-111-13/+28
| | | | | | | | | | | | | | R_SPARC_UA64. (elf32_sparc_check_relocs): Likewise. Only create .rela section for alloced sections in shared libraries. (elf32_sparc_relocate_section): Likewise. Remove redundant check. Optimize unaligned reloc usage. * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant check. * testsuite/gas/sparc/unalign.s: Remove .uaxword test. * testsuite/gas/sparc/unalign.d: Adjust accordingly.
* Add support for .uahword, .uaword and .uaxword pseudo opsNick Clifton2001-05-281-23/+30
|
* Update copyright noticesNick Clifton2001-03-081-1/+1
|
* * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLTJakub Jelinek2001-02-191-0/+7
| | | | | entries that could serve as a definition for a weak symbol. * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
* * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32Mark Kettenis2001-02-091-2/+2
| | | | | similar to R_SPARC_32. * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
* 2000-12-08 Kazu Hirata <kazu@hxi.com>Kazu Hirata2000-12-081-7/+3
| | | | | | | | | | | | | | * coffgen.c: Fix formatting. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-sparc.c: Likewise. * elf32-v850.c: Likewise. * elf64-sparc.c: Likewise. * elf-m10300.c: Likewise.
* gas/Jakub Jelinek2000-10-201-29/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p instructions to loose any special insn->architecture mask. * config/tc-sparc.c (v9a_asr_table): Add v9b ASRs. (sparc_md_end, sparc_arch_types, sparc_arch, sparc_elf_final_processing): Handle v8plusb and v9b architectures. (sparc_ip): Handle siam mode operands. Support v9b ASRs (and request v9b architecture if they are used). bfd/ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p, elf32_sparc_final_write_processing): Support v8plusb. * elf64-sparc.c (sparc64_elf_merge_private_bfd_data, sparc64_elf_object_p): Support v9b. * archures.c: Declare v8plusb and v9b machines. * bfd-in2.h: Ditto. * cpu-sparc.c: Ditto. include/opcode/ * sparc.h (enum sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_V9B. Note that '3' is used for siam operand. opcodes/ * sparc-dis.c (v9a_asr_reg_names): Add v9b ASRs. (compute_arch_mask): Add v8plusb and v9b machines. (print_insn_sparc): siam mode decoding, accept ASRs up to 25. * opcodes/sparc-opc.c: Support for Cheetah instruction set. (prefetch_table): Add #invalidate.
* Zero out the dynamic allocated content space. Add a comment to remind us thatNick Clifton2000-08-211-1/+6
| | | | one day this ought to be fixed.
* 2000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu2000-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set DF_TEXTREL if DT_TEXTREL is set. * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise. * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise. * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. * bfd/elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if DT_RPATH is set. Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
* * elf64-sparc.c (sparc64_elf_relax_section): New.Jakub Jelinek2000-05-261-1/+113
| | | | | | | (sparc64_elf_relocate_section): Optimize tail call into branch always if possible. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. (elf32_sparc_relax_section): New.
* 2000-05-23 H.J. Lu <hjl@gnu.org>H.J. Lu2000-05-231-2/+5
| | | | | | | | | | | | | | | | * elf32-i386.c (elf_i386_relocate_section): Don't allow the undefined symbol with the non-default visibility attributes. * elf-hppa.h (elf_hppa_relocate_section): Likewise. * elf32-arm.h (elf32_arm_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mips.c (mips_elf_calculate_relocation): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ia64.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* 2000-03-01 H.J. Lu <hjl@gnu.org>H.J. Lu2000-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aoutx.h (aout_link_input_section_std): Pass "true" to the undefined_symbol callback. (aout_link_input_section_ext): Likewise. * bout.c (get_value): Likewise. * coff-a29k.c (coff_a29k_relocate_section): Likewise. * coff-alpha.c (alpha_ecoff_get_relocated_section_conten): Likewise. (alpha_relocate_section): Likewise. * coff-arm.c (coff_arm_relocate_section): Likewise. * coff-i960.c (coff_i960_relocate_section): Likewise. * coff-mcore.c (coff_mcore_relocate_section): Likewise. * coff-mips.c (mips_relocate_section): Likewise. * coff-ppc.c (coff_ppc_relocate_section): Likewise. * coff-sh.c (sh_relocate_section): Likewise. * coff-tic80.c (coff_tic80_relocate_section): Likewise. * cofflink.c (_bfd_coff_generic_relocate_section): Likewise. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise. * elflink.h (elf_link_output_extsym): Likewise. * pe-mips.c (coff_pe_mips_relocate_section): Likewise. * reloc.c (bfd_generic_get_relocated_section_conten): Likewise. * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise. * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the undefined_symbol callback when building shared library with -Bsymbolic and undefined symbols are allowed. Otherwise, pass "true". * elf32-arm.h (elf32_arm_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mips.c (mips_elf_calculate_relocation): Likewise. (elf32_mips_get_relocated_section_content): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* 2000-02-27 Jakub Jelinek <jakub@redhat.com>Ian Lance Taylor2000-02-281-3/+7
| | | | | | | | * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump architecture if the object causing the bump is dynamic. * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise, and also don't it for memory ordering. (sparc64_elf_write_relocs): Take src_rela out of the loop.
* * section.c (_bfd_strip_section_from_output): Add info parameter.Ian Lance Taylor2000-02-131-1/+1
| | | | | | | | | | | | If it passed as non-NULL, use it to check whether any input BFD has an input section which uses this output section. Change all callers. * bfd-in2.h: Rebuild. * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of 1999-11-29. * bfd-in2.h: Rebuild.
* * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.Ian Lance Taylor1999-09-041-0/+14
| | | | | | | | | | | * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK and NON_GOT_REF from weak defined symbol to real symbol. * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF. (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't create a COPY reloc. * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF. (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't create a COPY reloc.
* 1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>Ian Lance Taylor1999-08-091-9/+1
| | | | | | | * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of the Sep. 4th, 1998 change. glibc 2.0.x dynamic linker had bug, not binutils. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* * elf-bfd.h (struct elf_link_local_dynamic_entry): New.Richard Henderson1999-07-131-91/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct elf_link_hash_table): Add dynlocal. (_bfd_elf_link_lookup_local_dynindx): Prototype. (_bfd_elf_link_adjust_dynindx): Delete. (_bfd_elf_link_renumber_dynsyms): Prototype. (_bfd_elf,link_record_local_dynamic_symbol): Prototype. * elfcode.h (elf_link_record_local_dynamic_symbol): New alias. * elflink.c (_bfd_elf_link_adjust_dynindx): Delete. (_bfd_elf_link_lookup_local_dynindx): New function. (elf_link_renumber_hash_table_dynsyms): New function. (_bfd_elf_link_renumber_dynsyms): New function. * elflink.h (elf_link_record_local_dynamic_symbol): New function. (struct elf_assign_sym_version_info): Delete removed_dynamic. (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output instead of elf_link_remove_section_and_adjust_dynindices. Remove removed_dynamic code. Use _bfd_elf_link_renumber_dynsyms. (elf_link_assign_sym_version): Remove removed_dynamic code. (elf_link_renumber_dynsyms): Delete. (elf_bfd_final_link): Install section and local symbols into .dynsym. * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete. (elf_m68k_size_dynamic_sections): Don't set section dynindicies. (elf_m68k_finish_dynamic_sections): Don't write section dynsyms. * elf32-mips.c: Similarly. * elf32-ppc.c: Similarly. * elf32-sparc.c: Similarly. * elf64-alpha.c: Similarly. * elf64-sparc.c: Similarly.
* * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1999-07-121-15/+16
| | | | | | | | | | | | | | | | | | | | | as appropriate. Use EMPTY_HOWTO as appropriate. Fill in structure initializations. Add casts. * reloc.c (EMPTY_HOWTO): Define. * bfd-in2.h: Rebuild. * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless comparisons against 0. * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change previous_ibfd_e_flags to unsigned long. * vms.h (struct vms_private_data_struct): Change section_count to unsigned. * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned. (_bfd_vms_write_gsd): Change symnum to unsigned. * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned. * vms-tir.c (etir_sta): Change psect to unsigned. (alloc_section): Change idx to unsigned. (tir_sta, tir_ctl): Change psect to unsigned. (_bfd_vms_write_tir): Change len and before to bfd_size_type. * vms.c (priv_section_count): Change to unsigned.
* * Many files: Changes to avoid gcc warnings: Remove unused localIan Lance Taylor1999-07-121-0/+3
| | | | | | | | | | | | | | | | | | | variables. Add default case to enum switches. * coff-arm.c (bfd_arm_allocate_interworking_sections): Only compile if not COFF_IMAGE_WITH_PE. (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise. (bfd_arm_get_bfd_for_interworking): Likewise. (bfd_arm_process_before_allocation): Likewise. * epoc-pei-arm.c: Don't rename bfd_arm functions. * pei-arm.c: Likewise. * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare. (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change. (mips_elf_got16_entry): Put parens around & in body of ==. (mips_elf_calculate_relocation): Correct test for empty string. * vms-gsd.c: Use _bfd_error_handler rather than fprintf to stderr. * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf format.
* Jakub Jelinek <jj@ultra.linux.cz>Richard Henderson1999-06-101-3/+15
| | | | | | | | * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std instead of R_SPARC_max. (sparc64_elf_info_to_howto): Likewise. * elf32_sparc.c (elf32_sparc_relocate_section): Likewise. (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
* 19990502 sourceware importRichard Henderson1999-05-031-0/+2059
OpenPOWER on IntegriCloud