aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
1994-06-03 * som.c (som_write_object_contents): Don't compute the file header'sJeff Law1-0/+4
checksum here. (som_write_headers): Instead do it here.
1994-06-03 * libbfd.h (bfd_realloc): Change last arg to "size_t size".Jeff Law2-2/+20
1994-06-02Get the address of Sun3 dynamic relocs right.Ian Lance Taylor1-3/+5
1994-06-02Add casts to pacify SunOS linker.Ian Lance Taylor1-7/+7
1994-06-02 * hosts/sun3.h: Include <stdlib.h>. Don't declare free, exit orIan Lance Taylor2-8/+4
getenv.
1994-06-02 Add linker support for SunOS shared libraries.Ian Lance Taylor4-109/+2103
* sunos.c: Include bfdlink.h. Add many new functions and definitions for SunOS shared library support. * bfd-in.h (bfd_sunos_record_link_assignment): Declare. (bfd_sunos_size_dynamic_sections): Declare. * bfd-in2.h: Rebuilt. * aoutx.h (struct aout_link_hash_entry): Move to libaout.h. (struct aout_link_hash_table): Likewise. (aout_link_hash_lookup, aout_link_hash_traverse): Likewise. (aout_hash_table): Likewise. (NAME(aout,link_hash_newfunc)): Rename from aout_link_hash_newfunc and make externally visible. (NAME(aout,link_hash_table_init)): New function. (NAME(aout,link_hash_table_create)): Call NAME(aout,link_hash_table_init), not _bfd_link_hash_table_init. (aout_link_add_symbols): Don't fail if no symbols. If it exists, call add_dynamic_symbols backend entry point for dynamic objects. Use add_one_symbol backend entry point if it exists. (NAME(aout,final_link)): Call finish_dynamic_link backend entry point, if it exists. (aout_link_input_bfd): For a dynamic object, call link_dynamic_object backend entry point, if it exists. (aout_link_write_other_symbol): Call write_dynamic_symbol backend entry point, if it exists. (aout_link_input_section): Don't read the relocs if they have already been read. (aout_link_input_section_std): When doing a final link, for a reloc against an external symbol, call check_dynamic_reloc backend entry point, if it exists. (aout_link_input_section_ext): Likewise. * libaout.h: Protect against multiple inclusion. Include bfdlink.h. (struct aout_link_hash_entry): Move in from aoutx.h. (struct aout_link_hash_table): Likewise. (aout_link_hash_lookup, aout_link_hash_traverse): Likewise. (aout_hash_table): Likewise. (struct aout_backend_data): Add fields add_dynamic_symbols, add_one_symbol, link_dynamic_object, write_dynamic_symbol, check_dynamic_reloc, and finish_dynamic_link. (struct aout_section_data_struct): Define new structure. (aout_section_data): Define new accessor macro. (NAME(aout,link_hash_newfunc)): Declare. (NAME(aout,link_hash_table_init)): Declare. * aoutf1.h (sunos4_aout_backend): Initialize new aout_backend_data fields. * aout-target.h (MY(backend_data)): Likewise. * i386aout.c (MY(backend_data)): Likewise. * i386mach3.c (MY(backend_data)): Likewise. * mipsbsd.c (MY(backend_data)): Likewise. * sparclynx.c (sparclynx_aout_backend): Likewise.
1994-06-01 * hosts/sun3.h: Don't declare qsort, malloc or realloc.Ian Lance Taylor2-5/+4
1994-05-27changes from gas-2.3/binutils-2.4 dist (details in branch log msgs, changelogs)Ken Raeburn7-142/+366
1994-05-26 * som.c (som_prep_headers): Do not set the system_id here, privateJeff Law2-7/+16
bfd data has not been copied yet. (som_write_headers): Instead do it here.
1994-05-24 Make MIPS ELF use new ELF backend linker. No shared libraryIan Lance Taylor4-39/+160
support yet. * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function. (bfd_mips_elf32_swap_gptab_out): New function. (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab. (mips_elf_final_write_processing): Set sh_info field for .gptab.* sections. (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections. (mips_elf_read_ecoff_info): Read and free external symbols last, not first, for clarity. (struct mips_elf_link_hash_entry): Define new structure. (struct mips_elf_link_hash_table): Define new structure. (mips_elf_link_hash_lookup): Define new macro. (mips_elf_link_hash_traverse): Define new macro. (mips_elf_hash_table): Define new macro. (mips_elf_link_hash_newfunc): New static function. (mips_elf_link_hash_table_create): New static function. (mips_elf_add_symbol_hook): New static function. (struct extsym_info): Define new structure. (mips_elf_get_extr, mips_elf_set_index): Remove. (mips_elf_output_extsym): New static function. (gptab_compare): New static function. (mips_elf_final_link): Rewrite to use ELF backend linker, and to merge gptab information in input files. (mips_elf_relocate_hi16): New static function. (mips_elf_relocate_section): New static function. (bfd_elf32_bfd_link_hash_table_create): Define as macro before including elf32-target.h. (elf_backend_relocate_section): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf.c (_bfd_elf_link_hash_newfunc): Rename from elf_link_hash_newfunc and make globally visible. Change caller. (_bfd_elf_link_hash_table_init): New function, broken out of _bfd_elf_link_hash_table_create. (_bfd_elf_link_hash_table_create): Use _bfd_elf_link_hash_table_init. * libelf.h (struct elf_obj_tdata): Add new field bad_symtab. (elf_bad_symtab): Define new accessor macro. (_bfd_elf_link_hash_newfunc): Declare. (_bew_elf_link_hash_table_init): Declare. * elfcode.h (elf_object_p): Call backend object_p hook after swapping in all the section headers. (map_program_segments): Correct typo: Internal for External. (elf_link_add_object_symbols): If elf_bad_symtab is set, read all the symbols. Skip STB_LOCAL symbols rather than giving an error. (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for all symbols, not just locals. (elf_link_output_extsym): Only skip a symbol not mentioned by a regular file if it is mentioned by a dynamic object. (elf_link_input_bfd): If elf_bad_symtab is set, read all the symbols.
1994-05-20 * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflowIan Lance Taylor1-0/+3
checking.
1994-05-20 * som.c (som_set_reloc_info): Do not set any relocation infoJeff Law2-2/+9
for SOM fixups which are never passed to BFD.
1994-05-20Removed sanitization of PowerPC NetWare. Also rebuilt MakefileIan Lance Taylor4-164/+138
dependencies.
1994-05-20 * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG toIan Lance Taylor1-0/+5
the dynamic linking information for the benefit of the debugger. From Peter Schauer. * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1994-05-20 * elf.c (_bfd_elf_make_section_from_shdr): New function, based onIan Lance Taylor5-177/+137
code repeated three times in bfd_section_from_shdr in elfcode.h. * libelf.h (_bfd_elf_make_section_from_shdr): Declare. * elfcode.h (bfd_section_from_shdr): Use new function _bfd_elf_make_section_from_shdr to create BFD sections. If a reloc section does not use the main symbol table, or it is part of the process image, treat it as a normal section, not relocs. * elf32-mips.c (mips_elf_section_from_shdr): Use new function _bfd_elf_make_section_from_shdr.
1994-05-19Make map_program_segments tend to call abort rather than trash theIan Lance Taylor1-5/+3
stack in unhandled cases. Still covered by previous ChangeLog entry.
1994-05-19 * elf32-target.h, elf64-target.h: Change ar_max_namelen value fromIan Lance Taylor3-4/+7
15 to 14 to match SVR4 ar.
1994-05-19 Add support for ELF shared libraries. Loosely based on work byIan Lance Taylor10-489/+3373
Eric Youngdale <ericy@cais.com>. * libelf.h (struct elf_backend_data): Add new fields for dynamic linking: elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol, elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol, elf_backend_finish_dynamic_sections. (struct elf_link_hash_entry): Change type of align field to bfd_size_type. Add fields dynindx, dynstr_index, weakdef, elf_link_hash_flags. (struct elf_link_hash_table): Add fields dynobj, dynsymcount, dynstr, bucketcount. (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare. (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare. (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare. (bfd_elf32_add_dynamic_entry): Declare. (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare. (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare. (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare. (bfd_elf64_add_dynamic_entry): Declare. * elfcode.h (Elf_External_Dyn): Define. (elf_swap_reloc_in): Define as macro using NAME. Make externally visible. (elf_swap_reloc_out): Likewise. (elf_swap_reloca_in, elf_swap_reloca_out): Likewise. (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME and as new externally visible function. (elf_fake_sections): Set section type of dynamic sections based on section names. (elf_write_phdrs): Remove. (assign_file_position_for_section): Add new align argument. Change all callers. (get_program_header_size): New static function. (struct seg_info): Remove. (map_program_segments): Completely rewrite. (assign_file_positions_except_relocs): Completely rewrite. (assign_file_positions_for_relocs): Don't set a file position for sections which already have one. Don't bother to align the file position here. (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC section types. (elf_section_from_bfd_section): Likewise. (elf_slurp_symbol_table): If section_from_elf_index fails, just use bfd_abs_section rather than returning an error. (elf_sizeof_headers): Make useful. (elf_link_record_dynamic_symbol): New static function. (elf_link_add_object_symbols): Handle dynamic objects. (elf_link_create_dynamic_sections): New static function. (elf_add_dynamic_entry): Define as macro using NAME and as new externally visible function. (NAME(bfd_elf,record_link_assignment)): New function. (elf_buckets): New static variable. (NAME(bfd_elf,size_dynamic_sections)): New function. (struct elf_final_link_info): Add dynsym_sec and hash_sec fields. (elf_bfd_final_link): Handle dynamic linking. Create a section symbol for all ELF sections, not all BFD sections. Store section symbol index in target_index field, not index field. Traverse over global symbols even if stripping. (elf_link_output_extsym): Output dynamic symbols. Mark symbols defined by dynamic objects as undefined. (elf_link_input_bfd): Ignore dynamic objects. Use target_index field for section relocs, and make sure it is set. (elf_reloc_link_order): Use target_index field for section relocs, and make sure it is set. * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index, weakdef and elf_link_hash_flags fields. (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount, dynstr and bucketcount fields. * elf32-target.h: Initialize new dynamic linking fields. * elf64-target.h: Likewise. * elf32-i386.c: New functions for dynamic linking support. * elf32-sparc.c: Likewise. * bfd-in.h (bfd_elf32_record_link_assignment): Declare. (bfd_elf64_record_link_assignment): Declare. (bfd_elf32_size_dynamic_sections): Declare. (bfd_elf64_size_dynamic_sections): Declare. * bfd-in2.h: Rebuilt.
1994-05-18 * som.c: Don't include <sys/dir.h> or <sys/user.h>.Ian Lance Taylor2-18/+34
(som_reloc_queue_find): Call memcmp instead of bcmp. (som_bfd_reloc_type_lookup): Change first argument to bfd *. (compare_syms): Change types of arguments to const void *. (bfd_section_from_som_symbol): Removed unused local found. (som_write_armap): Add elength, map, orl_count and int arguments. (som_write_armap): Use %ld and cast to long for getuid result.
1994-05-18 * elf32-hppa.h (R_HPPA_ABS_CALL): Define.Jeff Law2-5/+10
* elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls. * som.h (R_HPPA_ABS_CALL): Define. * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
1994-05-17* coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading underscore,Ken Raeburn1-0/+5
for compatibility with Intel tool chain (gnu960v2).
1994-05-16 * bfd-in2.h: Rebuilt.Jeff Law6-1305/+552
* elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs, likewise for other PA specific sections. (hppa_elf_relocate_unwind_table): Delete unused function. (elf_hppa_howto_table): Completely new table based on 94-02-02 draft PA ELF spec. Change relocation tags appropriately throughout elf32-hppa.c (hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02 spec. (hppa_elf_reloc): Likewise. (hppa_look_for_stubs_in_section): Likewise (ELF_MACHINE_CODE): Change to EM_PARISC. * elf32-hppa.h: Include "elf/hppa.h". Change relocation tags appropriately throughout elf32-hppa.h. (elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF spec. (R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions. * elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA. * reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations. * som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions. * libhppa.h (hppa_field_adjust): Avoid adding constant_value into the final value twice for LR and RR field selectors.
1994-05-16Fix typo in last check-in.Jeff Law1-2/+2
1994-05-16 * libhppa.h (hppa_field_adjust): Avoid adding constant_value intoJeff Law1-0/+5
the final value twice for LR and RR field selectors.
1994-05-14 * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert. ThisJim Kingdon2-16/+39
avoids __eprintf troubles.
1994-05-14 * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR.Ian Lance Taylor1-0/+2
1994-05-13Rewrite history.Ian Lance Taylor1-10/+0
1994-05-13Fix typo in last entryJim Kingdon1-1/+1
1994-05-13 * Makefile.in (sysdep.h): Copy Ian's version of this fromBill Cox2-2/+6
progressive/bfd/Makefile.in.
1994-05-13 * Makefile.in (stmp-bfd.h): Add an 'if' to mask a harmlessBill Cox2-1/+7
grep error. Already in progressive/bfd/Makefile.in.
1994-05-13 * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec andIan Lance Taylor1-0/+5
ecoff_little_vec since Irix 5 supports ECOFF executables.
1994-05-12Remove CVS conflict markers from fileJim Kingdon1-1/+0
1994-05-11 * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adrIan Lance Taylor2-2/+8
correctly.
1994-05-11 * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOSIan Lance Taylor2-5/+14
make to invoke the shell.
1994-05-10 * section.c (SEC_COFF_SHARED_LIBRARY): Renamed fromIan Lance Taylor5-32/+76
SEC_SHARED_LIBRARY for clarity. Changed all uses. * bfd-in2.h: Rebuilt. * coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is set, set STYP_NOLOAD. * coffgen.c (coff_section_from_bfd_index): Don't get an assertion failure because of a bad shared library.
1994-05-10Typo.Ian Lance Taylor1-1/+1
1994-05-10 * linker.c: Add missing comment terminator.Bill Cox2-1/+5
1994-05-09 * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashpIan Lance Taylor3-185/+191
are not NULL, assume the caller has already looked up the symbol in the hash table and has stored the entry in *hashp. (generic_link_add_symbol_list): Set h to NULL before calling _bfd_generic_link_add_one_symbol. * ecoff.c (ecoff_link_add_externals): Likewise.
1994-05-09 * elfcode.h: Include bfdlink.h. Added several new functions to doIan Lance Taylor5-133/+1961
linking. (ELF_R_TYPE): Define. (bfd_add_to_strtab): Return unsigned long. Change check for realloc failure. (elf_fake_sections): Check return value of bfd_add_to_strtab. (elf_compute_section_file_positions): Add link_info argument. Call elf_backend_begin_write_processing hook and prep_headers here. Only call swap_out_syms if link_info is NULL. Set up .shstrtab section here. Pass dosyms argument to assign_file_positions_except_relocs. Set output_has_begun flag. (assign_file_positions_for_symtab_and_strtabs): Add dosyms argument, and use it to control setting .symtab and .strtab file positions. (assign_file_positions_except_relocs): Add dosyms argument, and pass it on. (prep_headers): Check return value of bfd_add_to_strtab. (swap_out_syms): Likewise. Also, don't set up .shstrtab here. (NAME(bfd_elf,write_object_contents)): Some calls moved into elf_compute_section_file_positions. (elf_set_section_contents): Likewise. (elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE. * libelf.h: Include bfdlink.h. (struct elf_backend_data): Add fields collect, elf_add_symbol_hook, elf_backend_relocate_section. (struct bfd_elf_section_data): Add field rel_hashes. (struct elf_obj_tdata): Remove fields internal_syms and symbols. Add field sym_hashes. (obj_symbols, obj_internal_syms): Remove definitions. (elf_sym_hashes): Define. (struct elf_link_hash_entry): Define. (struct elf_link_hash_table): Define. (elf_link_hash_lookup): Define. (elf_link_hash_traverse): Define. (elf_hash_table): Define. (_bfd_elf_link_hash_table_create): Declare. (bfd_elf32_bfd_link_add_symbols): Declare. (bfd_elf32_bfd_final_link): Declare. (bfd_elf64_bfd_link_add_symbols): Declare. (bfd_elf64_bfd_final_link): Declare. * elf.c: Include bfdlink.h. (elf_link_hash_newfunc): New function. (_bfd_elf_link_hash_table_create): New function. * elf32-target.h (elf_backend_relocate_section): If not defined, define as 0 and use generic linker. Otherwise, use ELF backend linker. (elf_backend_collect): If not defined, define as false. (elf_backend_add_symbol_hook): If not defined, define as 0. (elf32_bed): Initialize new fields. * elf64-target.h: Same changes as elf32-target.h. * elf32-i386.c: Include bfdlink.h. (elf_i386_relocate_section): New function. (elf_backend_relocate_section): Define. * elf32-sparc.c: Include bfdlink.h. (elf_info_to_howto): Change type of dst from Elf32_Internal_Rela to Elf_Internal_Rela (they're the same type anyhow). (elf_sparc_relocate_section): New function. (elf_backend_relocate_section): Define. * elf32-mips.c (elf_backend_collect): Define.
1994-05-06 * config/go32.mh: XX support.Steve Chamberlain1-0/+8
From bill * Makefile.in: Build sysdep.h without causing worrying but harmless error message.
1994-05-06 * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom headerIan Lance Taylor1-3/+15
handling for latest suggested format. (nlm_swap_auxiliary_headers_out): Likewise. (nlm_compute_section_file_positions): Likewise.
1994-05-04For PR 1927.Ian Lance Taylor5-2/+72
Changed m68k-aout to set flags to 0; m68k-sunos still uses 1. * aout0.c: New file. * targets.c (aout0_big_vec): Declare. (bfd_target_vector): Add aout0_big_vec. * config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout. * config/m68k-aout.mt (SELECT_VECS): Removed. * config/m68k-0aout.mt: New file. * configure.in (aout0_big_vec): New target vector: use aout0.o, aout32.o and stab-syms.o. * Makefile.in: Rebuilt dependencies. (BFD32_BACKENDS): Add aout0.o. (CFILES): Add aout0.c. * libaout.h (struct aout_backend_data): Add field exec_hdr_flags. * aout-target.h (MY_exec_hdr_flags): If not defined, define as 0. MY(backend_data): Initialize exec_hdr_flags field. * aoutf1.h (sunos_32_set_arch_mach): Make static. (aout32_sunos4_write_object_contents): Set flags from backend info. (MY_exec_hdr_flags): If not defined, define as 1. (sunos4_aout_backend): Initialize exec_hdr_flags field. * aout-encap.c (encap_write_object_contents): Set flags from backend info. (MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE. * hp300hpux.c (MY_exec_hdr_flags): Define as 0x2. (MY(write_object_contents)): Set flags from backend info. * i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field. * i386mach3.c (MY(backend_data)): Likewise. * mipsbsd.c (MY(backend_data)): Likewise. * sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set flags from backend info. (sparclynx_aout_backend): Initialize exec_hdr_flags field.
1994-05-04* config.bfd (i386-*-gnu*): Treat like i386-*-mach*.Ken Raeburn2-1/+8
(m68*-apollo-*): Treat all Apollo configs the same, don't handle BSD specially.
1994-05-03 * cache.c: Rewrote to work correctly.Ian Lance Taylor1-0/+7
* libbfd.h: Rebuilt. * opncls.c (bfd_cache_init, bfd_open_file): Don't declare. (bfd_fdopenr): Check return value of bfd_cache_init.
1994-04-29 * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs byIan Lance Taylor2-1/+9
enumerating them, since the reloc type can not serve as an index into the m68k COFF howto_table.
1994-04-29 * config.bfd (*-go32): Changed to coff.Steve Chamberlain2-1/+5
* coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches. * srec.c (srec_write_symbols): Write out the correct number of symbols and don't stick in extra nulls.
1994-04-29 * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.Steve Chamberlain1-0/+4
1994-04-26Tue Apr 26 15:07:24 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs2-0/+13
* cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define. * coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC. (COFF_SPARC): Define. * coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment power of data and bss sections to 3. * hosts/lynx.h (__LYNXOS): Define. Brought over from 94Q1.
1994-04-26 * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocationsJeff Law1-0/+19
against section symbols to avoid losing during ld -r.
1994-04-25 * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris.Ian Lance Taylor2-11/+2