aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2001-11-23 * elf.c (_bfd_elf_rela_local_sym): New.Jakub Jelinek33-84/+219
* elflink.h (elf_link_input_bfd): Don't consider empty merged sections as removed in relocation tests. * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype. * elf32-i386.c (elf_i386_relocate_section): Handle relocs against STT_SECTION symbol of SHF_MERGE section. * elf32-arm.h (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Call _bfd_elf_rela_local_sym. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_final_link_relocate): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_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. * elf-hppa.h (elf_hppa_relocate_section): Likewise. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise for !partial_inplace relocs. Handle relocs against STT_SECTION symbol of SHF_MERGE for partial_inplace relocs. * config/tc-alpha.c (tc_gen_reloc): Remove SEC_MERGE test. * write.c (adjust_reloc_syms): Don't handle relocs against SEC_MERGE section symbols specially. (fixup_segment): Likewise.
2001-11-22daily updateAlan Modra1-1/+1
2001-11-22Move SRC-POTFILES.in and BLD-POTFILES.in to maintainer-clean target.Nick Clifton2-2/+7
2001-11-21daily updateAlan Modra1-1/+1
2001-11-21 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx ratherAlan Modra2-38/+45
than sym_sec->output_section to detect relocs against discarded sections.
2001-11-21daily updateAlan Modra1-1/+1
2001-11-202001-11-19 H.J. Lu <hjl@gnu.org>H.J. Lu2-0/+7
* elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when discarding relocations.
2001-11-19daily updateAlan Modra1-1/+1
2001-11-19Define and use bfd_is_const_section().Nick Clifton4-7/+42
2001-11-19 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.Alan Modra2-0/+6
2001-11-19 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefinedAlan Modra2-1/+5
millicode syms as candidates for import stubs.
2001-11-19 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.Alan Modra2-59/+63
(allocate_PIC_calls): Rename to allocate_plt_static. (allocate_dynrelocs): Move most of code handling .plt entries to.. (allocate_plt_static): ..here. Don't drop plabel entries.
2001-11-19 * mmo.c: Adjust documentation tags to use texinfo 4 features.Hans-Peter Nilsson2-6/+10
2001-11-18daily updateAlan Modra1-1/+1
2001-11-17daily updateAlan Modra1-1/+1
2001-11-16daily updateAlan Modra1-1/+1
2001-11-16 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs againstDaniel Jacobowitz2-2/+6
local syms from discarded sections. Update comment.
2001-11-15daily updateAlan Modra1-1/+1
2001-11-15 * po/SRC-POTFILES.in: Regenerate.Alan Modra2-30/+36
2001-11-15 * elflink.h (elf_link_input_bfd): Complain about all relocsAlan Modra2-49/+50
against local syms from discarded sections. (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
2001-11-15* elf64-sparc.c (sparc64_elf_relocate_section): DisregardAlexandre Oliva2-0/+15
overflows in the .stab section.
2001-11-152001-11-11 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz11-2/+593
* bfd-in.h (bfd_elf32_discard_info): Add prototype. (bfd_elf64_discard_info): Likewise. * bfd-in2.h: Regenerate. * elf-bfd.h (struct elf_reloc_cookie): New. (struct elf_backend_data): Add elf_backend_discard_info, elf_backend_ignore_discarded_relocs, and elf_backend_write_section. (_bfd_elf32_reloc_symbol_deleted_p): Add prototype. (_bfd_elf64_reloc_symbol_deleted_p): Likewise. * elf32-mips.c (_bfd_elf32_mips_discard_info): New. (_bfd_elf32_mips_ignore_discarded_relocs): New. (_bfd_elf32_mips_write_section): New. (elf_backend_discard_info): Define. (elf_backend_ignore_discarded_relocs): Define. (elf_backend_write_section): Define. * elfcode.h (elf_bfd_discard_info): Define. (elf_reloc_symbol_deleted_p): Define. * elflink.h (elf_link_input_bfd): Check elf_section_ignore_discarded_relocs. Call bed->elf_backend_write_section if available. (elf_reloc_symbol_deleted_p): New. (elf_bfd_discard_info): New. (elf_section_ignore_discarded_relocs): New. * elfxx-target.h (elf_backend_discard_info): Define. (elf_backend_ignore_discarded_relocs): Define. (elf_backend_write_section): Define. (elfNN_bed): Add elf_backend_discard_info, elf_backend_ignore_discarded_relocs, and elf_backend_write_section. * libbfd-in.h (_bfd_discard_section_stabs): Add prototype. * libbfd.h: Regenerate. * stabs.c (_bfd_discard_section_stabs): New. 2001-11-11 Daniel Jacobowitz <drow@mvista.com> * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New. (struct ld_emulation_xfer_struct): Use it.
2001-11-14daily updateAlan Modra1-1/+1
2001-11-14 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"Martin Schwidefsky3-86/+10
scheme to get rid of an ugly complicated test. * elf64-s390.c (elf_s390_relocate_section): Likewise.
2001-11-14 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): UseAndreas Jaeger2-4/+9
x86-64 for display.
2001-11-14 * dwarf2.c (struct line_head) [total_length]: Change type toJakub Jelinek2-22/+121
bfd_vma. (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size. (struct comp_unit): Add stash and offset_size. (read_8_bytes): Return bfd_vma. (read_indirect_string): New. (read_attribute): Handle DW_FORM_strp. (decode_line_info): Support 64-bit DWARF format. (_bfd_dwarf2_find_nearest_line): Likewise. (parse_comp_unit): Set offset_size and stash.
2001-11-13 * dwarf2.c (read_attribute_value): New function to handleRichard Henderson2-8/+34
DW_FORM_indirect. (read_attribute): Use it.
2001-11-13daily updateAlan Modra1-1/+1
2001-11-13Index: bfd/ChangeLogGeoffrey Keating2-14/+30
2001-11-11 Geoffrey Keating <geoffk@redhat.com> * dwarf2.c (decode_line_info): Properly deal with unknown standard opcodes. Index: binutils/ChangeLog 2001-11-11 Geoffrey Keating <geoffk@redhat.com> * readelf.c (display_debug_lines): Deal with unknown standard opcodes. Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin, DW_LNS_set_isa. Index: include/elf/ChangeLog 2001-11-11 Geoffrey Keating <geoffk@redhat.com> * dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes.
2001-11-13 * section.c (bfd_make_section_anyway): Don't increment section_idAlan Modra3-7/+21
and the BFD's section_count if adding the section failed. * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway change.
2001-11-12 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match newHans-Peter Nilsson2-2/+7
core dump format.
2001-11-12daily updateAlan Modra1-1/+1
2001-11-112001-11-11 H.J. Lu <hjl@gnu.org>H.J. Lu3-2/+10
* 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-11daily updateAlan Modra1-1/+1
2001-11-11 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable iHans-Peter Nilsson2-3/+14
size_t. Rename second i to j.
2001-11-10daily updateAlan Modra1-1/+1
2001-11-10 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.Jeff Law2-1/+5
2001-11-10 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEFAlan Modra21-387/+707
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-09daily updateAlan Modra1-1/+1
2001-11-08daily updateAlan Modra1-1/+1
2001-11-08* elf32-s390: Major rework that introduces all recent changes toMartin Schwidefsky3-1742/+2314
the s390 backends. Get a closer match to elf32-i386. (elf_s390_relocate_section): Make use of dynamic section short-cuts. Localise vars, and delay setting. Better error reporting, replace BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the regular object file and tread the weak definition as the normal one. Don't discard relocs for undefweak or undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy relocs. Reinstate fudge for unresolved relocs in debugging sections. (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy reloc processing for weakdefs. Remove redundant casts and aborts. Delay setting of vars until needed. Move creation of dynamic symbols and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace BFD_ASSERT with abort. Discard .plt entries for everything with plt.refcount <= 0. (elf_s390_check_relocs): Don't allocate space for dynamic relocs, .got or .relgot here but do it in allocate_dynrelocs. Reference count possible .plt and .got entries. Don't test input section SEC_READONLY here to try to avoid copy relocs, and keep dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of variables until needed. Remove separate switch stmt for creating .got section. Initialise local_got_refcounts to 0. Cache pointer to "sreloc" section in elf_section_data. Tweak condition under which .got created. Report files with bad relocation section names. (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that have been forced local. Use same test to decide if we can use a relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF comment. Move expressions out of function calls. Replace BFD_ASSERT with abort. (elf_s390_finish_dynamic_sections): Migrate common code out of switch statement. Replace BFD_ASSERT with abort. (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i" to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. Replace BFD_ASSERT with abort. Zero out the dynamic allocated content space. Add a comment to remind us that one day this ought to be fixed. (struct elf_s390_link_hash_entry): Rename "root" to "elf". (struct elf_s390_link_hash_table): Likewise. (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get rid of unnecessary casts. (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields. Remove "section" field. (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel. Reference count possible .plt entries. Don't deallocate .got and .relgot space here. (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs. Update comment. (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to dyn_relocs. (elf_s390_discard_copies): Delete. (elf_s390_link_hash_traverse): Delete. (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link rather than gc variety). (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields. (elf_s390_link_hash_table_create): Init them. (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define. (allocate_dynrelocs): New function. (create_got_section): New function. (elf_backend_can_refcount): Define. (elf_backend_copy_indirect_symbol): Define. (elf_s390_copy_indirect_symbol): New function. (elf_s390_create_dynamic_sections): New function. (readonly_dynrelocs): New function. * elf64-s390x: Likewise.
2001-11-07daily updateAlan Modra1-1/+1
2001-11-07 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.Jakub Jelinek11-73/+788
(BFD32_BACKENDS_CFILES): Add elf-strtab.c. (elf-strtab.lo): Add rule. * Makefile.in: Rebuilt. * configure.in (elf): Add elf-strtab.lo. * configure: Rebuilt. * elf-bfd.h (elf_strtab_hash): Forward declare. (struct elf_link_hash_table): Change dynstr type to struct elf_strtab_hash *. (struct elf_obj_tdata): Change strtab_ptr type to struct elf_strtab_hash *. (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add, _bfd_elf_strtab_addref, _bfd_elf_strtab_delref, _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size, _bfd_elf_strtab_offset, _bfd_elf_strtab_emit, _bfd_elf_strtab_finalize): New prototypes. * elf-strtab.c: New file. * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add and _bfd_elf_strtab_size instead of _bfd_stringtab calls. Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or when forcing dynamic symbol to local. (elf_link_create_dynamic_sections): Call _bfd_elf_strtab_init instead of elf_stringtab_init. (elf_link_record_local_dynamic_symbol): Likewise, change dynstr type. Use _bfd_elf_strtab functions instead of _bfd_stringtab calls. (size_dynamic_sections): Use _bfd_elf_strtab functions instead of _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields, call _bfd_elf_strtab_addref. Call elf_finalize_dynstr. (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions. (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing dynamic symbol to local. (elf_link_assign_sym_version): Likewise. (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of _bfd_stringtab_emit. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr type. Call _bfd_elf_strtab functions instead of _bfd_stringtab functions. * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. * elf.c (_bfd_elf_init_reloc_shdr): Likewise. (elf_fake_sections): Likewise. (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs on shstrtab hash table, call _bfd_elf_strtab_addref on each section name in the output. Call _bfd_elf_strtab_finalize and use _bfd_elf_strtab_offset to finalize sh_name section header fields. (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size instead of _bfd_stringtab_size. (prep_headers): Change shstrtab type. Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
2001-11-07 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): FixAlan Modra2-19/+27
bad symtab segfault. Formatting and warning fixes. Improve error message for internationalisation.
2001-11-06daily updateAlan Modra1-1/+1
2001-11-062001-11-06 H.J. Lu (hjl@gnu.org)H.J. Lu2-20/+92
* elflink.h (elf_link_input_bfd): Complain relocs against discarded sections.
2001-11-05daily updateAlan Modra1-1/+1
2001-11-04daily updateAlan Modra1-1/+1
2001-11-03daily updateAlan Modra1-1/+1
2001-11-03 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.Alan Modra2-2/+6