aboutsummaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
AgeCommit message (Collapse)AuthorFilesLines
1995-11-29 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory ifIan Lance Taylor1-50/+24
obstack_alloc fails. (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish fails. * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails. * Many files: don't set bfd_error_no_memory if one of the above routines fails.
1995-11-07First round ld support for PPC PEKim Knuttila1-1/+3
1995-10-28Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-145/+4
* cofflink.c (_bfd_coff_generic_relocate_section): Make callback decide what goes in .relocs. * pe[i]-i386.c (TARGET_UNDERSCORE): Define. * peicode.h (pe_mkobject_hook): Only copy aouthdr if there is one.
1995-10-10 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename fromIan Lance Taylor1-14/+314
coff_link_hash_newfunc and make non-static. (_bfd_coff_link_hash_table_init): New function, broken out of _bfd_coff_link_hash_table_create. (_bfd_coff_link_hash_table_create): Use it. (process_embedded_commands): Make static. * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare. (_bfd_coff_link_hash_table_init): Declare. * libcoff-in.h (struct xcoff_tdata): Add cputype field. * libcoff.h: Rebuild.
1995-09-14 Convert i960 COFF to use COFF backend linker.Ian Lance Taylor1-3/+8
* coff-i960.c (coff_i960_relocate): Use a coff_section_data structure to store the symbol being used. (coff_i960_start_final_link): New static function. (coff_i960_relocate_section): New static function. (coff_i960_adjust_symndx): New static function. (coff_start_final_link): Define. (coff_relocate_section): Define. (coff_adjust_symndx): Define. * coffcode.h (bfd_coff_backend_data): Add new callback function _bfd_coff_start_final_link. (bfd_coff_start_final_link): Define. (coff_start_final_link): Define if not defined. (bfd_coff_std_swap_table): Add coff_start_final_link. * cofflink.c (_bfd_coff_internal_syment_name): Make globally visible. (_bfd_coff_final_link): Call bfd_coff_start_final_link if the function callback is not NULL. * libcoff-in.h (struct coff_section_tdata): Add tdata field. (_bfd_coff_internal_syment_name): Declare. * libcoff.h: Rebuild. * configure.in (icoff_big_vec): Add cofflink.o. (icoff_little_vec): Likewise. * configure: Rebuild.
1995-09-13 * cofflink.c (coff_link_input_bfd): Fail if a section with noIan Lance Taylor1-1/+14
contents has relocs. PR 7979.
1995-09-12 Extensive minor changes to avoid various gcc warnings. Also:Ian Lance Taylor1-176/+151
* Makefile.in (BFD32_BACKENDS): Remove coff-arm.o. * archures.c (bfd_arch_info_type): Change mach field from long to unsigned long. (bfd_lookup_arch): Change machine parameter from long to unsigned long.
1995-08-29Tue Aug 29 13:50:21 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-10/+11
* libbfd.h, bfd-in2.h: regenerated. * coff-arm.c (aoutarm_std_relo): New entry at 11. (arm_reloc_type_lookup) : Understand type 11. * coff-i386.c (howto_table): fix name of rva type. (coff-i386_rtype_to_howto): Understand R_IMAGEBASE type. * coffcode.h (sec_to_styp_flags): .edata is data. (coff_compute_section_file_positions): Get page size right for PE. (fill_pe_header_info): Fix fields. (coff_write_object_contents): Remove end_of_image calc. (_bfd_coff_generate_reloc_section): Remove orphaned comment. * coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE. (coff_swap_scnhdr_out): Setup PE flags correctly. * reloc.c (BFD_RELOC_RVA): New field.
1995-08-22Mon Aug 21 17:49:28 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-26/+19
* bfd-in.h (bfd_link_subsystem): Turn enum into #defines. (bfd_link_pe_info_dval): New (bfd_link_stack_heap): Renamed and massaged into bfd_link_pe_info. * bfd-in2.h: rebuilt. * bfd.c (NT_subsystem, NT_stack_heap): Deleted. * coffcode.h (pe_value): New function. (fill_pe_header_info): New function. (coff_write_object_contents): Use new function. * cofflink.c (coff_final_link_info): Remove pe randomness. (dores_com): Update info in bfd_link_pe_info_dval. (process_embedded_commands): Use the bfd_link_pe_info_dval. (_bfd_coff_final_link): Remove PE stuff, initialize coff_data->link_info. * coffswap.h (coff_swap_[aout|filehdr]_out): Use indirect PE pointer. (coff_swap_scnhdr_out): Use real imagebase. * libcoff (coff_data_type.link_info): New field.
1995-08-17* coff-sh.c (sh_relax_section): Cast value for used_by_bfd field to PTR, notKen Raeburn1-368/+191
coff_section_tdata pointer, since PTR is the real type of the field. * cofflink.c (_bfd_coff_read_internal_relocs): Ditto.
1995-07-10 * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash tableIan Lance Taylor1-1/+1
using bfd_alloc, not malloc. * cofflink.c (_bfd_coff_link_hash_table_create): Likewise. * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise. * i386linux.c (linux_link_hash_table_create): Likewise. * linker.c (_bfd_generic_link_hash_table_create): Likewise. * sunos.c (sunos_link_hash_table_create): Likewise.
1995-07-07fsf address update, but not in COPYING filesKen Raeburn1-1/+1
1995-07-02 * cofflink.c (_bfd_coff_generic_relocate_section): Cast base_fileIan Lance Taylor1-1/+1
to FILE * before using it. * stab-syms.c: Revert yesterday's patch.
1995-06-30 Fri Jun 30 16:07:18 1995 Steve Chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-17/+14
* cofflink.c (_bfd_coff_generic_relocate_section): Compare the full text of .reloc or .edata section names.
1995-06-30 * cofflink.c (_bfd_coff_generic_relocate_section):Fred Fish1-1/+1
Remove extra '+'.
1995-06-29Wed Jun 28 18:04:42 1995 Steve Chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-2/+28
* Makefile.in: versados.o is now conditionally built. * coffcode.h (add_data_entry): New function. (coff_write_object_contents): Clean up. Calculate data entries. * cofflink.c (_bfd_coff_generic_relocate_section): .reloc and .edata sections are IMAGE_BASED too. If there's a base_file then write out base information. * configure.host (i386-*-pe): New. * syms.c (coff_section_type): Only scan prefixes. * targets.c (bfd_target_vector): Versados is now conditionally built. * config/m68k-coff.mt: Build versados.o * hosts/i386pe.h: New file.
1995-06-14 * cofflink.c (process_embedded_commands): New functionSteve Chamberlain1-17/+351
reads and handles .drectve sections for PE. (coff_link_input_bfd): Call new function if PE.
1994-09-12 * cofflink.c (coff_link_input_bfd): If r_symndx is -1, don'tIan Lance Taylor1-4/+158
change it. (_bfd_coff_generic_relocate_section): If r_symndx is -1, it is an absolute reloc. Don't dump core using r_symndx as an array index. * cf-m68klynx.c (coff_bfd_link_add_symbols): Define. (lynx_link_add_symbols): New static function (copy of function in coff-i386.c). (coff_m68k_lynxrtype_to_howto): sym argument may be NULL. * coff-i386.c (coff_i386_rtype_to_howto): Likewise. * coff-a29k.c (coff_a29k_relocate_section): Handle an r_symndx value of -1, meaning an absolute reloc.
1994-09-06 Add new style linker support to COFF backend. a29k only for now.Ian Lance Taylor1-0/+2006
* cofflink.c: New file. * libcoff-in.h: Include bfdlink.h. (obj_coff_external_syms, obj_coff_strings): Define accessor macro. (obj_coff_sym_hashes): Define accessor macro. (struct coff_tdata): Add fields external_syms, strings, and sym_hashes. (struct coff_link_hash_entry): Define. (struct coff_link_hash_table): Define. (coff_link_hash_lookup, coff_link_hash_traverse): Define. (coff_hash_table): Define. (_bfd_coff_link_hash_table_create): Declare. (_bfd_coff_link_add_symbols, _bfd_coff_final_link): Declare. * coffcode.h (bfd_coff_backend_data): Add fields _bfd_relsz, _bfd_coff_swap_reloc_in, _bfd_coff_sym_is_global, _bfd_coff_compute_section_file_positions, _bfd_coff_relocate_section. (bfd_coff_relsz, bfd_coff_swap_reloc_in): Define. (bfd_coff_sym_is_global): Define. (bfd_coff_compute_section_file_positions): Define. (bfd_coff_relocate_section): Define. (coff_mkobject_hook): Initialize obj_raw_syment_count and obj_conv_table_size. (coff_compute_section_file_positions): Set target_index of all sections. Set output_has_begun field. (coff_write_object_contents): Don't set target_index; now done by coff_compute_section_file_positions. Remove obsolete handling of scn_base and data_base. Don't bother to check that target_index is positive, since it always is. Remove use of pad, which is always zero. Check obj_raw_syment_count, not bfd_get_symcount, for the number of symbols, but only write them out if bfd_get_symcount is non-zero. (coff_slurp_symbol_table): Use obj_raw_syment_count, not bfd_get_symcount for the number of symbols. Don't set obj_conv_table_size. (coff_sym_is_global): New static function or macro. (coff_slurp_reloc_table): Call coff_swap_reloc_in, not bfd_swap_reloc_in. (coff_bfd_link_hash_table_create): If coff_relocate_section is defined, define as _bfd_coff_link_hash_table_create. (coff_bfd_link_add_symbols): Similar change. (coff_bfd_final_link): Similar change. (coff_relocate_section): Define as NULL if not defined. (bfd_coff_std_swap_table): Initialize new fields. * coffgen.c (coff_real_object_p): Don't set obj_raw_syment_count and obj_conv_table_size here. (coff_count_linenumbers): Reindent. If bfd_get_symcount is zero, add up the line numbers from the sections. (coff_write_symbols): Don't set bfd_get_symcount. (coff_pointerize_aux): Don't pointerize a nonpositive x_endndx field. (coff_get_normalized_symtab): Use obj_raw_syment_count, not bfd_get_symcount. (coff_print_symbol): If auxp->fix_end, print x_endndx value. * coffswap.h (coff_swap_reloc_in): Rename from bfd_swap_reloc_in. Reindent. Change argument type to PTR. * coff-a29k.c (coff_a29k_relocate_section): New static function. (coff_relocate_section): Define. * configure.in (a29kcoff_big_vec): Compile cofflink.o. * coff-alpha.c (alpha_ecoff_backend_data): Initialize new fields. * coff-mips.c (mips_ecoff_backend_data): Likewise. * libcoff.h: Rebuilt. * Makefile.in: Rebuilt dependencies. (BFD32_BACKENDS): Add cofflink.o. (CFILES): Add cofflink.c.