summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
Commit message (Collapse)AuthorAgeFilesLines
* * elflink.c (_bfd_elf_link_create_dynamic_sections): Move fromAlan Modra2003-05-091-18/+2017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align. (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align. (bfd_elf_record_link_assignment): Move from elflink.h. (_bfd_elf_merge_symbol): Likewise. (_bfd_elf_add_default_symbol): Likewise. (_bfd_elf_export_symbol): Likewise. (_bfd_elf_link_find_version_dependencies): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. (_bfd_elf_link_read_relocs): Likewise. (_bfd_elf_link_size_reloc_section): Likewise. (_bfd_elf_fix_symbol_flags): Likewise. (_bfd_elf_adjust_dynamic_symbol): Likewise. (_bfd_elf_link_sec_merge_syms): Likewise. (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel and bed->s->sizeof_rela. (_bfd_elf_link_output_relocs): Likewise. * elf-bfd.h (struct elf_size_info): Rename file_align to log_file_align. (struct elf_info_failed): Move from elflink.h. (struct elf_assign_sym_version_info): Likewise. (struct elf_find_verdep_info): Likewise. (_bfd_elf_create_dynamic_sections): Delete duplicate declaration. (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol, _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies, _bfd_elf_link_assign_sym_version, _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs, _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs, _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol, _bfd_elf_link_sec_merge_syms): Declare. (bfd_elf32_link_create_dynamic_sections): Don't declare. (_bfd_elf32_link_read_relocs): Likewise. (bfd_elf64_link_create_dynamic_sections): Likewise. (_bfd_elf64_link_read_relocs): Likewise. * elflink.h: Move lots o' stuff elsewhere. * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare. (bfd_elf64_record_link_assignment): Likewise. (bfd_elf_record_link_assignment): Declare. * bfd-in2.h: Regenerate. * elfcode.h (elf_link_create_dynamic_sections): Don't declare. (NAME(_bfd_elf,size_info)): Adjust for log_file_align. * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align. (assign_file_positions_for_segments): Likewise. (assign_file_positions_except_relocs): Likewise. (swap_out_syms, elfcore_write_note): Likewise. * elf-m10200.c: Adjust for changed function names. * elf-m10300.c: Likewise. * elf32-arm.h: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mips.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-v850.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align. * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align. * elf64-hppa.c (hppa64_elf_size_info): Likewise. * elf64-mips.c (mips_elf64_size_info): Likewise. * elf64-s390.c (s390_elf64_size_info): Likewise. * elf64-sparc.c (sparc64_elf_size_info): Likewise.
* * elflink.c (_bfd_elf_create_got_section): Check existing .gotAlan Modra2003-02-241-11/+13
| | | | | | | section flags before concluding that we've already been called. Don't use register keyword. (_bfd_elf_create_dynamic_sections): Don't use register keyword. (_bfd_elf_create_linker_section): Formatting.
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-40/+40
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* Fix numerous occurrences ofAlan Modra2002-10-111-24/+26
| | | | warning: dereferencing type-punned pointer will break strict-aliasing rules
* * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): DefineAlan Modra2002-07-251-0/+92
| | | | | | | | | | as elf_link_record_local_dynamic_symbol. (_bfd_elf64_link_record_local_dynamic_symbol): Likewise. (elf_link_record_local_dynamic_symbol): Declare. Now returns int. * elflink.h (elf_link_record_local_dynamic_symbol): Move to.. * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an attempt is made to record a symbol in a discarded section, and return `2' in that case.
* * section.c (_bfd_strip_section_from_output): Remove unnecessaryAlan Modra2002-07-041-1/+2
| | | | | | | link order code. Don't actually remove the output section here; Just set a flag for the linker to do so. * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed sections when setting up output section dynsyms.
* * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.Alan Modra2002-06-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf32-hppa.c (hppa_add_stub): Likewise. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise. * elflink.h (elf_add_default_symbol): Fix comment typo. (elf_add_default_symbol): Replace strcpy and strncpy with memcpy. (elf_link_add_object_symbols): Likewise. (elf_link_assign_sym_version): Likewise. * hash.c (bfd_hash_lookup): Likewise. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. * section.c (bfd_get_unique_section_name): Likewise. * syms.c (_bfd_stab_section_find_nearest_line): Likewise. * elf.c (_bfd_elf_make_section_from_phdr): Likewise. (assign_section_numbers): Likewise. (_bfd_elfcore_make_pseudosection): Likewise. (elfcore_grok_lwpstatus): Likewise. (elfcore_grok_win32pstatus): Likewise. (elfcore_write_note): Constify input params. Use PTR instead of void *. Include terminating NUL in namesz. Correct padding. Support NULL "name" param. Use memcpy instead of strcpy. (elfcore_write_prpsinfo): Constify input params. (elfcore_write_prstatus): Likewise. Use PTR instead of void *. (elfcore_write_lwpstatus): Likewise. (elfcore_write_pstatus): Likewise. (elfcore_write_prfpreg): Likewise. (elfcore_write_prxfpreg): Likewise. * elf-bfd.h (elfcore_write_note): Update declaration. (elfcore_write_prpsinfo): Likewise. (elfcore_write_prstatus): Likewise. (elfcore_write_pstatus): Likewise. (elfcore_write_prfpreg): Likewise. (elfcore_write_prxfpreg): Likewise. (elfcore_write_lwpstatus): Likewise.
* * linker.c (link_action): Ignore duplicate warning syms.Alan Modra2002-03-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (_bfd_generic_link_write_global_symbol): Follow warning symbol link. * elflink.h (elf_adjust_dynstr_offsets): Likewise. (elf_adjust_dynamic_symbol): Likewise. (elf_export_symbol): Likewise. (elf_link_find_version_dependencies): Likewise. (elf_link_assign_sym_version): Likewise. (elf_link_sec_merge_syms): Likewise. (elf_link_output_extsym): Likewise. (elf_gc_sweep_symbol): Likewise. (elf_gc_propagate_vtable_entries_used): Likewise. (elf_gc_smash_unused_vtentry_relocs): Likewise. (elf_gc_allocate_got_offsets): Likewise. (elf_collect_hash_codes): Likewise. * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise. * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise. (elf_hppa_remark_useless_dynamic_symbols): Likewise. * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise. * elf32-arm.h (elf32_arm_discard_copies): Likewise. * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise. (elf_cris_discard_excess_dso_dynamics): Likewise. * elf32-hppa.c (clobber_millicode_symbols): Likewise. (mark_PIC_calls): Likewise. (allocate_plt_static): Likewise. (allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. * elf32-i386.c (allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. * elf32-i370.c (i370_elf_adjust_dynindx): Likewise. * elf32-m68k.c (elf_m68k_discard_copies): Likewise. * elf32-mips.c (mips_elf_output_extsym): Likewise. (mips_elf_sort_hash_table_f): Likewise. (mips_elf_check_mips16_stubs): Likewise. * elf32-s390.c (allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. * elf32-sh.c (sh_elf_discard_copies): Likewise. * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise. (xstormy16_relax_plt_realloc): Likewise. * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise. (elf64_alpha_output_extsym): Likewise. * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise. * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise. (mips_elf64_check_mips16_stubs): Likewise. (mips_elf64_output_extsym): Likewise. * elf64-ppc.c (func_desc_adjust): Likewise. (allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. * elf64-s390.c (allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. * elf64-sh64.c (sh64_elf64_discard_copies): Likewise. * elf64-x86-64.c (allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise. * aoutx.h (aout_link_write_other_symbol): Likewise. * cofflink.c (_bfd_coff_write_task_globals): Likewise. (_bfd_coff_write_global_sym): Likewise. * i386linux.c (linux_tally_symbols): Likewise. * m68klinux.c (linux_tally_symbols): Likewise. * sparclinux.c (linux_tally_symbols): Likewise. * pdp11.c (aout_link_write_other_symbol): Likewise. * sunos.c (sunos_scan_dynamic_symbol): Likewise. * xcofflink.c (xcoff_build_ldsyms): Likewise. (xcoff_write_global_symbol): Likewise. * cofflink.c (_bfd_coff_final_link): Formatting. * cpu-mips.c (mips_compatible): Make static, prototype. * elf32-i386.c (elf_i386_check_relocs): Formatting. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_output_extsym): Likewise. * elf64-mips.c (mips_elf64_sort_hash_table): Likewise. (mips_elf64_final_link): Likewise. * elflink.h (elf_link_find_version_dependencies): Remove duplicate prototype.
* * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODEAlan Modra2002-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when plt_not_loaded. * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to clear .plt SEC_CODE here. Create .stub and correct .glink flags. (PLT_INITIAL_ENTRY_SIZE): Set to 24. (ppc64_elf_glink_code): Delete. (PPC64_ELF_GLINK_SIZE): Delete. (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11, BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0, ORI_R0_R0_0): Define. (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define. (struct ppc_link_hash_table): Add sstub and plt_overflow. (ppc64_elf_link_hash_table_create): Init them. (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry. Don't copy to shared lib. (ppc64_elf_check_relocs): Call bfd_set_error on errors. (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount. (allocate_dynrelocs <plt>): Don't change function sym here. Make room for .stub and .glink code. (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for DT_PPC64_GLINK. (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call bfd_elf64_bfd_final_link. (bfd_elf64_bfd_final_link): Don't define. (ppc64_elf_size_stubs): New. (build_plt_stub): New. (build_one_stub): New. (ppc64_elf_build_stubs): New. (ppc64_elf_relocate_section <toc relocs>): Remove assert. (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs. (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in case output sections not separate. Adjust DT_RELASZ to not include plt relocs. Set reserved got entry. Set got and plt entry size. (elf_backend_got_header_size): Set to 8. * elf64-ppc.h: New file.
* * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.Jakub Jelinek2001-11-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * bfd.c (bfd_archive_filename): New function.Alan Modra2001-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Touches most files in bfd/, so likely will be blamed for everything..Alan Modra2001-09-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* * elf-bfd.h (struct elf_backend_data): Add want_got_sym.Alan Modra2001-08-081-16/+19
| | | | | | | * 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.
* * ecoff.c (bfd_debug_section): Fix initialization.Alan Modra2001-05-071-2/+2
| | | | | | | | | | | * 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.
* Update copyright noticesNick Clifton2001-03-081-1/+2
|
* 2001-01-23 Kazu Hirata <kazu@hxi.com>Kazu Hirata2001-01-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * coff64-rs6000.c: Fix formatting. * coff-arm.c: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-pmac.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * elf32.c: Likewise. * elf32-fr30.c: Likewise. * elf32-i370.c: Likewise. * elf32-i860.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-v850.c: Likewise. * elf64-alpha.c: Likewise. * elf64-sparc.c: Likewise. * elflink.c: Likewise. * elflink.h: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elfxx-ia64.c: Likewise.
* 2001-01-03 Kazu Hirata <kazu@hxi.com>Kazu Hirata2001-01-031-4/+4
| | | | | | | | | | | | | * 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.
* * elflink.c (_bfd_elf_create_got_section): Don't abort().Alexandre Oliva2000-08-161-6/+22
| | | | | Formatting fixes. (_bfd_elf_create_dynamic_sections): Likewise.
* 2000-06-05 H.J. Lu <hjl@gnu.org>H.J. Lu2000-06-051-15/+2
| | | | | | * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag an error when seeing an undefined symbol with hidden/internal attribute. It is handled in *_relocate_section ().
* 2000-05-30 H.J. Lu <hjl@gnu.org>H.J. Lu2000-05-301-3/+9
| | | | | | | | | * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the visibility bits if the symbol is undefined. Correctly handle weak undefined symbols with hidden and internal attributes. * elflink.h (elf_link_add_object_symbols): Always turn the symbol into local if it has the hidden or internal attribute.
* 2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>H.J. Lu2000-05-041-2/+2
| | | | | | | | | | * elflink.h (elf_link_add_object_symbols): Reset dynindx for hidden and internal symbols. (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with visibility. * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not assign a PLT or GOT entry to symbols with hidden and internal visibility.
* 2000-03-01 H.J. Lu <hjl@gnu.org>H.J. Lu2000-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Most of these changes are really only cosmetic. The readelf.c patchAlan Modra2000-01-261-2/+2
| | | | | | fixes a thinko in get_dynamic_flags. I found at least one message string that included a `%' being passed to printf in the format argument.
* ELF visibility patch from Martin Loewis.Nick Clifton2000-01-031-0/+26
|
* * elf-bfd.h (struct elf_backend_data): Add want_dynbss.Richard Henderson1999-07-131-20/+23
| | | | | | * 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.
* * elf-bfd.h (struct elf_link_local_dynamic_entry): New.Richard Henderson1999-07-131-9/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-111-2/+2
| | | | | | | as appropriate. Fill in structure initializations. Add variable initializations. Add casts. * dwarf1.c (parse_line_table): Change eachLine to unsigned long. (dwarf1_unit_find_nearest_line): Change i to unsigned long.
* * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.Mark Mitchell1999-06-131-0/+15
| | | | | | | * elflink.c (_bfd_elf_link_adjust_dynindx): Define it. * elflink.h (elf_link_remove_section_and_adjust_dynindices): New function. (bfd_elf_size_dynamic_sections): Use it.
* Update copyright dates.Mark Mitchell1999-06-021-1/+1
|
* * elf-bfd.h (elf_backend_data): Remove use_rela_p. AddMark Mitchell1999-06-021-2/+5
| | | | | | | | | | | | | | | | | | 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.
* Initial revisionRichard Henderson1999-05-031-0/+433