aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
AgeCommit message (Collapse)AuthorFilesLines
2001-09-29 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.Alan Modra1-28/+26
(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-21 * Makefile.am: Run "make dep-am".Alan Modra1-1/+1
* Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * aoutx.h: Formatting fixes. * merge.c (_bfd_merged_section_offset): Break line at 80 chars. * linker.c: Replace bfd_get_filename with bfd_archive_filename in error message.
2001-09-18Touches most files in bfd/, so likely will be blamed for everything..Alan Modra1-47/+56
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-112001-09-11 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* inker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2001-08-24Apply H.J.'s patch to revert change to elfxx-target.hNick Clifton1-0/+2
Apply my patch to allow SREC as output format.
2001-08-24 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()Thiemo Seufer1-1/+5
by bfd_malloc().
2001-08-17 * linker.c (default_fill_link_order): Handle four byte fill value.Alan Modra1-11/+18
2001-08-022001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>Charles Wilson1-3/+13
* cofflink.c (coff_link_check_ar_symbols): also search for __imp__symbol as well as _symbol. * linker.c (_bfd_generic_link_add_archive_symbols): also search for __imp__symbol as well as _symbol.
2001-07-05Fix ia64-linux fortran common linking problem.Jim Wilson1-1/+20
* linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use the section of the bigger symbol.
2001-05-102001-05-10 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+9
* linker.c (_bfd_generic_link_add_one_symbol): Check loop on indirect symbols.
2001-04-13bfd/Jakub Jelinek1-0/+6
* libbfd-in.h (_bfd_merge_section): New. (_bfd_write_merged_section): New. (_bfd_merged_section_offset): New. * libbfd.h: Rebuilt. * linker.c (_bfd_generic_link_output_symbols): Handle discard_sec_merge. * aoutx.h (aout_link_write_symbols): Likewise. * pdp11.c (aout_link_write_symbols): Likewise. * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section. (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE sections. (elf_link_sec_merge_syms): New. (elf_link_input_bfd): Call _bfd_merged_section_offset and _bfd_write_merged_section. Handle discard_sec_merge. * elf-bfd.h (struct elf_link_hash_table): Add merge_info field. (struct bfd_elf_section_data): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and SEC_STRINGS section flags and entsize from their ELF counterparts. (_bfd_elf_link_hash_table_init): Initialize merge_info. (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize from their BFD counterparts. * merge.c: New file. * Makefile.am: Add strtab.lo. * Makefile.in: Rebuilt. include/ * bfdlink.h (bfd_link_discard): Add discard_sec_merge. gas/ * config/obj-elf.c (obj_elf_change_section): Add entsize argument, handle SHF_MERGE and SHF_STRINGS. (obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS. (obj_elf_section): Allow additional argument specifying entity size. * write.c (adjust_reloc_syms): Keep relocations against local symbols in SEC_MERGE sections. ld/ * ldmain.c (main): Default to discard_sec_merge. * lexsup.c (OPTION_DISCARD_NONE): Define. (ld_options): Add --discard-none. (parse_args): Handle OPTION_DISCARD_NONE. * ldlang.c (wild_doit): SEC_MERGE should be set in the output section only if SEC_MERGE and SEC_STRINGS flags and entsize of all its input sections match.
2001-03-08Update copyright noticesNick Clifton1-1/+1
2001-01-032001-01-03 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-16/+13
* libbfd.c: Fix formatting. * linker.c: Likewise. * lynx-core.c: Likewise.
2000-01-14fix mis-applied patchNick Clifton1-1/+4
2000-01-13Apply Tim walls octest vs bytes patchNick Clifton1-3/+9
1999-07-11 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1-6/+7
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.
1999-06-04Franz Sirl <Franz.Sirl-kernel@lauterbach.com>Richard Henderson1-1/+1
* elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of range undefweak symbols. * hash.c: Add missing comma after @xref{} * linker.c: Likewise.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+2804