aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
AgeCommit message (Collapse)AuthorFilesLines
2001-11-112001-11-11 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call _bfd_elf_strtab_size instead of _bfd_stringtab_size. * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change dynstr type to `struct elf_strtab_hash *'.
2001-11-10 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEFAlan Modra1-0/+1
relocs into shared libs. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mips.c (mips_elf_calculate_relocation): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elf.c (bfd_section_from_r_symndx): New function. * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define. (struct sym_sec_cache): New. (bfd_section_from_r_symndx): Declare. (struct bfd_elf_section_data): Change local_dynrel type to PTR. * elflink.h (elf_link_input_bfd): Don't test for removed linkonce relocs when relocatable. Don't zero entire reloc, just zero the addend and sym. * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec. (elf_i386_link_hash_table_create): Init it. (elf_i386_check_relocs): Track dynamic relocs needed for local syms on a per-section basis as we do for globals. (elf_i386_gc_sweep_hook): Update for local_dynrel change. Remove dead code. (allocate_dynrelocs): Warning fix. (elf_i386_size_dynamic_sections): Don't allocate relocs when section has been discarded. (elf_i386_relocate_section): Don't copy STN_UNDEF relocs into shared libs. * elf32-hppa.c: Likewise. * elf32-s390.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise.
2001-11-022001-11-02 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+4
* elf32-mips.c (mips_elf_calculate_relocation): Don't create dynamic relocation for symbols defined in regular objects when creating executables.
2001-11-01[ bfd/ChangeLog ]Chris Demetriou1-0/+2
2001-10-31 Chris Demetriou <cgd@demetriou.com> * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative relocations properly. [ gas/ChangeLog ] 2001-10-31 Chris Demetriou <cgd@broadcom.com> * config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded PIC code, assume pointers the same size as GPRs. (macro): In M_LA_AB handling for embedded PIC code, support "la $treg,foo-bar($breg)". In load/store handling (label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)" which is used by the compiler for switch statements. In load/store double multi-instruction macro handling (label ldd_std) add a comment that no special handling is currently done for embedded PIC. (mips_ip): In 'o' (16-bit offset) case, only accept 16 bit offsets. [ gas/testsuite/ChangeLog ] 2001-10-31 Chris Demetriou <cgd@broadcom.com> * gas/mips/empic.s: Undo damage inflicted on 2000-12-02. * gas/mips/empic.d: Likewise. * gas/mips/elempic.d: Likewise (it was copied into other files). * gas/mips/telempic.d: Likewise. * gas/mips/tempic.d: Likewise. * gas/mips/empic2.s: New test to check new 'la' and 'lw' (and related ops) syntax, test loads with large offsets. * gas/mips/emcic2.d: Likewise. * gas/mips/mips.exp: Run the new test on ELF platforms.
2001-10-232001-10-23 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check m != NULL before accessing it.
2001-10-15 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.typeAlan Modra1-1/+1
rather than ind->weakdef. * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
2001-10-05 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtosThiemo Seufer1-12/+12
according to the MIPS/SGI ELF64 ABI Draft. (mips_elf_sort_hash_table): Typo.
2001-10-04Fix a comment typo in last commit.Alan Modra1-1/+1
2001-10-04 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out afterAlan Modra1-1/+5
copying flags if this is a weakdef.
2001-10-04 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offsetAlan Modra1-5/+6
to 1 rather than 0 to avoid confusing copy_indirect_symbol. (mips_elf_sort_hash_table_f): Compare got.offset against 1.
2001-09-21Fix compile time warningsNick Clifton1-2/+10
2001-09-20 * bfd.c (bfd_archive_filename): New function.Alan Modra1-17/+11
* bfd-in2.h: Regenerate. * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename in error messages where the bfd is an input bfd. * aout-cris.c: Likewise. * coff-arm.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * ecofflink.c: Likewise. * elf-hppa.h: Likewise. * elf.c: Likewise. * elf32-arm.h: Likewise. * elf32-cris.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mips.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-sparc.c: Likewise. * elf32-v850.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.h: Likewise. * elfxx-ia64.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peicode.h: Likewise. * srec.c: Likewise. * xcofflink.c: Likewise. * elf32-arm.h: Make _bfd_error_handler calls K&R compatible. * elflink.c (_bfd_elf_create_linker_section): Better grammar for error message. * coff-mcore.c (coff_mcore_relocate_section): Internalionalise error message. * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types. Consolidate error messages, and split long messages to two lines.
2001-09-20coordinate info->symbolic and info->allow_shlib_undefinedNick Clifton1-1/+3
2001-09-18Touches most files in bfd/, so likely will be blamed for everything..Alan Modra1-193/+189
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-09-07 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handlingThiemo Seufer1-1/+1
of R_MIPS_PC16. * config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL. (macro_build): Use BFD_RELOC_16_PCREL_S2 only for embedded PIC, BFD_RELOC_16_PCREL for the rest. (mips_ip): Likewise. (md_pcrel_from): return the right offset for the differently shifted pcrel relocs. (md_apply_fix): Handle BFD_RELOC_16_PCREL. * gas/mips/beq.d: Check branches to external labels. * gas/mips/beq.s: Likewise. * gas/mips/bge.d: Likewise. * gas/mips/bge.s: Likewise. * gas/mips/bgeu.d: Likewise. * gas/mips/bgeu.s: Likewise. * gas/mips/blt.d: Likewise. * gas/mips/blt.s: Likewise. * gas/mips/bltu.d: Likewise. * gas/mips/bltu.s: Likewise. * gas/mips/elempic.d: Switch from R_MIPS_GNU_REL16_S2 to R_MIPS_PC16. * gas/mips/empic.d: Likewise. * gas/mips/empic.s: Likewise. * gas/mips/telempic.d: Likewise. * gas/mips/tempic.d: Likewise.
2001-08-312001-08-31 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+9
* elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename with bad relocation.
2001-08-312001-08-31 Eric Christopher <echristo@redhat.com>Eric Christopher1-17/+9
Jason Eckhardt <jle@redhat.com> * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32, mips32_4k and mips64. * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k, bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64. * bfd/cpu-mips.c: Ditto. * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto. * bfd/bfd-in2.h: Regenerate.
2001-08-302001-08-30 H.J. Lu <hjl@gnu.org>H.J. Lu1-5/+5
* elf32-mips.c (mips_elf_calculate_relocation): Revert the last 2 changes. (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic relocations for weak definitions.
2001-08-302001-08-30 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+2
* elf32-mips.c (mips_elf_calculate_relocation): Don't create dynamic relocation for undefined weak symbols when creating executables. Check h->root.root.type, instead of h->root.type.
2001-08-272001-08-27 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+5
* elf32-mips.c (mips_elf_create_dynamic_relocation): Add more sanity check. (mips_elf_calculate_relocation): Create dynamic relocation for symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR bit is not set.
2001-08-272001-08-27 H.J. Lu <hjl@gnu.org>H.J. Lu1-5/+17
* elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype. (_bfd_mips_elf_copy_indirect_symbol): Likewise. (_bfd_elf32_mips_grok_prstatus): Likewise. (_bfd_elf32_mips_grok_psinfo): Likewise. (_bfd_mips_elf_hide_symbol): Make it static and cast to `struct mips_elf_link_hash_entry *'. (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2001-08-25 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string forThiemo Seufer1-6/+6
E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2001-07-042001-07-04 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+3
* bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4400, bfd_mach_mips4600 and bfd_mach_mips5000.
2001-06-30 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directlyAlan Modra1-9/+6
instead of _bfd_elfcore_section_from_phdr. * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove. * elf.c (_bfd_elfcore_section_from_phdr): Remove. (_bfd_elfcore_make_pseudosection): Expedite tail-call. (elfcore_grok_prstatus): Likewise. (elfcore_grok_lwpstatus): Likewise. (bfd_get_elf_phdr_upper_bound): Likewise. (elfcore_make_note_pseudosection): Formatting. (_bfd_elfcore_strndup): Formatting. * elf32-mips.c (mips_elf_sym_is_global): Formatting. (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2001-06-30 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosectionAlan Modra1-0/+69
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-172001-06-17 H.J. Lu <hjl@gnu.org>H.J. Lu1-8/+37
* elf32-mips.c (mips_elf_link_hash_entry): Add a new field, readonly_reloc, to record if a relocation in the .rel.dyn section is against a read-only section. (mips_elf_link_hash_newfunc): Initialize the readonly_reloc field to false. (_bfd_mips_elf_check_relocs): Record if there is a relocation in the .rel.dyn section against a read-only section by setting DF_TEXTREL or readonly_reloc. (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if it is true. (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if there is a relocation in the .rel.dyn section against a read-only section. (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if DF_TEXTREL is set.
2001-06-10 * elflink.h: Whitespace changes.Alan Modra1-1/+1
(elf_link_read_relocs_from_section): Use "unsigned int" iterator rather than "unsigned char". (elf_link_output_relocs): Likewise. (elf_link_input_bfd): Likewise. (elf_reloc_link_order): LIkewise. * elf.c: s/CONST/const/. Whitespace changes. * elf32-mips.c: Formatting fix. * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h. * Makefile.in: Regenerate. * po/Make-in: Remove trailing tab.
2001-06-072001-06-07 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+2
* elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab for SGI only. * config.bfd: Remove ecoff from Linux/mips.
2001-05-23Add MIPS r12k supportNick Clifton1-1/+3
2001-05-23Replace sh_size/sh_entsize with NUM_SHDR_ENTRIESNick Clifton1-5/+4
2001-05-08Remove extraneous character in first line.Ian Lance Taylor1-1/+1
2001-05-07 * ecoff.c (bfd_debug_section): Fix initialization.Alan Modra1-5/+5
* elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it is always a positive integer. Cast away sign mismatch. * elf32-mips.c: Fix misleading comment and typo. (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use correct data type. * elflink.c: Fix typo. (_bfd_elf_create_dynamic_sections): Remove superfluous initialization. * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
2001-04-302000-04-27 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+2
* elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1 only for ELF_LINK_FORCED_LOCAL. * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise. * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise. * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL if the symbol has hidden or internal visibility.
2001-04-24Add OpenRISC supportNick Clifton1-2/+9
2001-04-082001-04-05 Steven J. Hill <sjhill@cotw.com>H.J. Lu1-4/+14
* config.bfd (mips*el*-*-linux-gnu*): Use traditional little endian MIPS ELF target. * config.bfd (mips*-*-linux-gnu*): Use traditional big endian MIPS ELF target. * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional 64bit big endian MIPS ELF target. (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little endian MIPS ELF target. * configure: Regenerated. * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and little endian targets. (mips_elf_sym_is_global): Handle traditional targets. * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional 64bit big endian MIPS ELF target. (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little endian MIPS ELF target. * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec and bfd_elf64_tradlittlemips_vec.
2001-03-222001-03-21 Diego Novillo <dnovillo@redhat.com>Diego Novillo1-2/+5
(_bfd_mips_elf_relocate_section): Give a better error message when a relocation is not recognized.
2001-03-08Update copyright noticesNick Clifton1-1/+1
2001-02-11Apply several patches from Maciej W. RozyckiNick Clifton1-36/+77
2000-12-12Fix formatting.Nick Clifton1-21/+40
2000-12-09Pass dwarf2_find_line_info as last parameter to invocation ofNick Clifton1-1/+2
_bfd_dwarf2_find_nearest_line.
2000-12-08Generalize DWARF2 and COFF support.Nick Clifton1-1/+1
2000-12-072000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-0/+23
From Ralf Baechle <ralf@gnu.org> * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit BFDs containing no sections or empty .text, .data or .bss sections to be merged, regardless of their flags.
2000-12-02Add MIPS SB1 machineNick Clifton1-0/+7
2000-12-02Add MIPS V and MIPS 64 machine numbersNick Clifton1-0/+24
2000-12-01Add MIPS32 as a seperate MIPS architectureNick Clifton1-10/+21
2000-11-292000-11-28 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-434/+414
* elf32-mips.c: Fix formatting.
2000-10-142000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-8/+9
From Ralf Baechle <ralf@gnu.org> * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument local_p. Add symbol value only for non-R_MIPS_REL32 relocations against local symbols. (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
2000-10-022000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-1/+1
From Ralf Baechle <ralf@gnu.org> * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld produces binaries with got[1] = 0x80000001 to differenciate them for the dynamic linker from the broken binaries produced by old versions.
2000-09-14Add support for the MIPS32Nick Clifton1-0/+7
2000-07-232000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-2/+2
* elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead of dynobj for SGI_COMPAT checks.