aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
1994-08-03LynxOS changesDavid Henkel-Wallace1-0/+6
1994-08-02 * hp300hpux.c (BMAGIC): Define as HPUX_DOT_O_MAGIC, to make testJean Marie Diaz1-0/+3
in aoutx.h work correctly.
1994-08-02 * coff-i960.c (coff_i960_relocate): New function.Jean Marie Diaz2-5/+35
(howto_rellong, howto_iprmed): Use it as special_function.
1994-08-02 * libbfd-in.h: Move declarations of bfd_read, bfd_write, bfd_seek,Jean Marie Diaz1-0/+8
bfd_tell, bfd_flush, and bfd_stat from here... * bfd-in.h: ...to here, to make them visible to programs which know more about the object file format than BFD does. * libbfd.h, bfd-in2.h: Rebuilt.
1994-08-01Forgot to check this in.Jean Marie Diaz1-0/+2
1994-08-01 * elfcode.h (map_program_segments): Check DYNAMIC as well as EXEC_P.Jean Marie Diaz1-2/+2
(assign_file_positions_except_relocs): Likewise.
1994-08-01 * elf64-sparc.c (ELF_MAXPAGESIZE): Define.Jean Marie Diaz1-0/+2
1994-08-01 ELF linker patches from Eric Youngdale <ericy@cais.cais.com>.Jean Marie Diaz2-10/+21
* elfcode.h (elf_link_create_dynamic_sections): Set type of _DYNAMIC to STT_OBJECT. (NAME(bfd_elf,record_link_assignment)): Always create hash table entry. Set type to STT_OBJECT. (elf_link_output_extsym): Don't set type of weak defined symbol to STB_WEAK if symbol was referenced. * elf32-i386.c (elf_i386_create_dynamic_sections): Set type of _GLOBAL_OFFSET_TABLE to STT_OBJECT. (elf_i386_check_relocs): Ignore local PLT32 relocs. (elf_i386_relocate_section): Treat local PLT32 relocs as PC32.
1994-08-01Mon Aug 1 17:55:53 1994 Fred Fish (fnf@cygnus.com)Jean Marie Diaz1-0/+5
* ptrace-core.c (ptrace_unix_core_file_p): Convert zalloc usage to bfd_zalloc.
1994-08-01 * elfcode.h (elf_adjust_dynamic_symbol): Correct weak symbolIan Lance Taylor2-5/+7
handling again.
1994-08-01 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.Ian Lance Taylor1-1/+0
* hosts/solaris2.h: Remove. * config/solaris2.mh: Remove.
1994-08-01 * elfcode.h (elf_slurp_reloc_table): Don't try to read the relocsIan Lance Taylor2-2/+7
if there aren't any.
1994-08-01 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.Ian Lance Taylor2-10/+6
* hosts/solaris2.h: Remove. * config/solaris2.mh: Remove.
1994-07-31 * elf32-hppa.c, elf32-hppa.h: Update comment reflecting whichJeff Law1-0/+5
HPPA ELF spec the code implements.
1994-07-27i960xl changes (sanitized)Ken Raeburn3-27/+59
1994-07-27(howto_rellong, howto_iprmed, howto_optcall): Use HOWTO macro.Ken Raeburn1-9/+9
1994-07-27i960xl sanitization; keep some more ns32k related filesKen Raeburn1-0/+24
1994-07-26 * elfcode.h (elf_adjust_dynamic_symbol): When handling a weakIan Lance Taylor1-0/+4
symbol, correct check to see whether the equivalent normal symbol was referenced.
1994-07-26 Add support for creating shared libraries under i386 ELF and SPARCIan Lance Taylor5-141/+412
ELF. Based on patches by Eric Youngdale <ericy@cais.cais.com>. * libelf.h (struct elf_link_hash_entry): Remove copy_offset field. Add got_offset and plt_offset fields. (ELF_LINK_HASH_REF_DYNAMIC_MULTIPLE): Don't define. (ELF_LINK_HASH_DEF_DYNAMIC_MULTIPLE): Don't define. (ELF_LINK_HASH_NEEDS_COPY): Define. (struct elf_backend_data): Add check_relocs field. (struct bfd_elf_section_data): Change relocs from PTR to Elf_Internal_Rela *. (struct elf_obj_tdata): Add local_got_offsets field. (elf_local_got_offsets): Define accessor macro. (bfd_elf32_link_create_dynamic_sections): Declare. (bfd_elf32_link_record_dynamic_symbol): Declare. (bfd_elf64_link_create_dynamic_sections): Declare. (bfd_elf64_link_record_dynamic_symbol): Declare. * elfcode.h (elf_slurp_reloc_table): Don't use the section data relocs field. (elf_link_record_dynamic_symbol): Make globally visible. Use macro to rename to NAME(bfd_elf,link_record_dynamic_symbol). (elf_link_add_object_symbols): If creating a shared library, put make all local symbols dynamic. Don't bother with the DYNAMIC_MULTIPLE flags. Call the check_relocs backend function if it is defined. (elf_link_create_dynamic_sections): Make globally visible. Use macro to rename to NAME(bfd_elf,link_create_dynamic_sections). If creating a shared library, make sure that _DYNAMIC is added as a dynamic symbol. (elf_link_read_relocs): New function. (NAME(bfd_elf,record_link_assignment)): If creating a shared library, always create symbols, and always make them dynamic. (elf_bfd_final_link): Permit creation of shared libraries. (elf_link_input_bfd): Use elf_link_read_relocs to get the relocs. * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize copy_offset. Initialize got_offset and plt_offset. * elf32-target.h (elf_backend_check_relocs): Define as 0 if not defined. (elf32_bed): Initialize check_relocs field. * elf64-target.h (elf_backend_check_relocs): Define as 0 if not defined. (elf64_bed): Initialize check_relocs field. * elf32-i386.c (elf_howto_table): Change R_386_PLT32 and R_386_GOTPC to be pc_relative and pcrel_offset. (elf_i386_pic_plt0_entry): Define. (elf_i386_pic_plt_entry): Define. (elf_i386_create_dynamic_sections): Create a .got.plt section, and define _GLOBAL_OFFSET_TABLE_ at the start of it. If creating a shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a dynamic symbol. Don't create .rel.bss if creating a shared library. (elf_i386_check_relocs): New function. (elf_i386_adjust_dynamic_symbol): Don't make a PLT entry if the symbol already has one. When making a PLT entry, set plt_offset. Don't create a copy reloc when creating a shared library. Don't set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY. (elf_i386_allocate_dynamic_section): Remove. (elf_i386_size_dynamic_sections): Look through all the sections rather than assuming we know their names. Remove any empty reloc or plt sections. Only add a DT_DEBUG entry if not creating a shared library. Only add a DT_PLTGOT entry if there is a PLT. Add a DT_TEXTREL entry if required. (elf_i386_relocate_section): Permit undefined symbols when creating a shared library. Handle the special relocation types specially. (elf_i386_finish_dynamic_symbol): Create a PLT entry if plt_offset is set. If creating a shared library, produce a PIC PLT entry. Only mark a PLT symbol as undefined if it was not defined by a regular object file. Create a GOT entry if got_offset is set. Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set. (elf_i386_finish_dynamic_sections): Change the handling of DT_RELSZ to simply subtract out the size of .rel.plt. If creating a shared library, produce PIC PLT code. (elf_backend_check_relocs): Define. * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT10, R_SPARC_GOT22, and R_SPARC_PC10 to not warn about reloc overflow. (elf32_sparc_create_dynamic_sections): If creating a shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a dynamic symbol, and set the type to STT_OBJECT. Likewise for _PROCEDURE_LINKAGE_TABLE_. Don't create .rel.bss if creating a shared library. (elf32_sparc_check_relocs): New function. (elf32_sparc_adjust_dynamic_symbol): Don't make a PLT entry if the symbol already has one. When making a PLT entry, set plt_offset. Don't create a copy reloc when creating a shared library. Don't set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY. (elf32_sparc_allocate_dynamic_section): Remove. (elf32_sparc_size_dynamic_sections): Look through all the sections rather than assuming we know their names. Only add a DT_DEBUG entry if not creating a shared library. Add a DT_TEXTREL entry if required. (elf32_sparc_relocate_section): Permit undefined symbols when creating a shared library. Handle the special relocation types specially. (elf32_sparc_finish_dynamic_symbol): Create a PLT entry if plt_offset is set. Only mark a PLT symbol as undefined if it was not defined by a regular object file. Create a GOT entry if got_offset is set. Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set. (elf32_sparc_finish_dynamic_sections): Store dynobj in a local variable. (elf_backend_check_relocs): Define.
1994-07-25Update to reflect comings and goings of ns32k and mach-related filesStan Shebs2-0/+6
1994-07-25 * configure.in (pc532mach_vec): Change to pc532machaout_vec.Stan Shebs2-5/+25
* config.bfd (ns32k-*-netbsd*): Use ns32k-nbsd as bfd_name. * Makefile.in (ALL_MACHINES): Add cpu-ns32k.o. (BFD32_BACKENDS): Add aout-ns32k.o, netbsd532.o, m88kmach3.o, pc532-mach.o. * targets.c (pc532machaout_vec): Use instead of pc532mach_vec. * config/pc532-mach.mt (DEFAULT_VECTOR): Ditto. (SELECT_VECS): Remove. * config/ns32k-nbsd.mt: New file, was ns32k-netbsd.mt. * config/ns32k-netbsd.mt: Remove, name too long.
1994-07-22Forgot to save my buffer before last check in.Ian Lance Taylor1-0/+23
1994-07-22 * aoutx.h (aout_link_check_ar_symbols): When changing a symbol toIan Lance Taylor5-100/+55
common, set the alignment. (aout_link_add_symbols): Restrict the alignment of a common symbol to the alignment power given by the architecture. * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align. Do initialize copy_offset. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset field rather than align field. Get alignment using bfd_log2 rather than switch. * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset, not align. * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
1994-07-22 * aoutx.h (NAME(aout,some_aout_object_p)): Just checkIan Lance Taylor2-3/+12
STAT_FOR_EXEC, don't check MACH. * m88kmach3.c (MACH): Don't define. * config/i386-mach3.mt (TDEFINES): Define STAT_FOR_EXEC. * config/m88k-mach3.mt (TDEFINES): Likewise. * config/mips-mach3.mt (TDEFINES): Likewise.
1994-07-22 * i386mach3.c: Reverted to version from before Jul 5 1994 changes.Stan Shebs1-0/+4
Un-break gas/binutils/ld for FSF.
1994-07-21 * reloc.c (struct reloc_howto_struct): Remove special_function1.Ian Lance Taylor2-19/+80
It's the wrong way to do things. (HOWTO): Change accordingly. (HOWTO2): Remove. (_bfd_final_link_relocate): Remove references to special_function1. * bfd-in2.h: Rebuilt. * aoutx.h (aout_link_input_section_std): Remove references to special_function1. (aout_link_reloc_link_order): Likewise.
1994-07-20 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add rpathIan Lance Taylor2-4/+21
argument. If it is not NULL, use it to set DT_RPATH. * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype. (bfd_elf64_size_dynamic_sections): Likewise. * bfd-in2.h: Rebuilt.
1994-07-17 * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Define.Ian Lance Taylor3-2/+25
* elfcode.h (elf_link_add_object_symbols): If symbol is defined as weak, set ELF_LINK_HASH_DEFINED_WEAK. (elf_link_output_extsym): If symbol is defined as weak, mark it STB_WEAK.
1994-07-17 * libelf.h (struct bfd_elf_section_data): Add relocs field.Ian Lance Taylor3-220/+141
(shdr_name): Remove; unused. * elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL and RELA relocs. Free up the unswapped relocs. Permit the relocs to be cached in the section_data. Correct the reloc address. (elf_slurp_reloca_table): Remove. (elf_canonicalize_reloc): Rewrote. (elf_link_input_bfd): Permit the relocs to be cached in the section data.
1994-07-16 * config.bfd (m88*-harris-cxux*): Recognize.Stan Shebs2-0/+8
* hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
1994-07-16 * configure.host (m68*-atari-sysv4*): New host.Stan Shebs3-4/+12
(m68*-cbm-sysv4*): Use m68kv4 instead of amix. * hosts/amix.h: Remove. * hosts/m68kv4.h: New file, was amix.h.
1994-07-14NS32K changes from Ian Dall.Ken Raeburn9-77/+609
Note: Some of the ns32k-specific files do require gcc to compile at present. This will be fixed.
1994-07-14 * coff-sparc.c (sparccoff_vec): Have leading underscores.Stan Shebs1-0/+4
1994-07-12 * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,Peter Schauer2-5/+18
hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c, rs6000-core.c, trad-core.c: Remove SEC_ALLOC flag from .reg sections, .reg sections are not allocated and contain debug information only. * osf-core.c (make_bfd_asection, osf_core_core_file_p): Use bfd_make_section_anyway instead of building unique section names.
1994-07-12 * libelf.h (bfd_elf32_swap_symbol_in): Declare.Ian Lance Taylor2-0/+13
(bfd_elf32_swap_symbol_out): Declare. (bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare. * elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
1994-07-12 * aout-encap.c (ARCH): Don't define. Obsolete.Ian Lance Taylor5-4/+8
* aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise. * i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise. * i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise. * newsos3.c, sparclynx.c, sunos.c: Likewise.
1994-07-12 * section.c (STD_SECTION): Make the sixth argument boolean, notIan Lance Taylor1-0/+5
the seventh. From gary@tuva.pacsemi.oz.au (gary kopff).
1994-07-10Sun Jul 10 09:12:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com)David Henkel-Wallace2-7/+18
* aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE in order not to collide with LynxOS's definition of FREE in /usr/include/sys/proc.h
1994-07-07 * aoutx.h (howto_table_std): Add entry for GOT relocationsPeter Schauer1-0/+6
which are present in sun3 shared libraries, to avoid assertions when reading the dynamic relocations.
1994-07-07 * som.h (R_HPPA_COMPLEX): Fix dumb typo.Jeff Law1-0/+4
1994-07-06 * elfcode.h (elf_link_output_sym): Don't call output_symbol_hookIan Lance Taylor1-0/+10
if it is NULL.
1994-07-06 * hosts/sysv4.h (qsort, strtol): Don't declare.Ian Lance Taylor1-2/+0
1994-07-06 * coff-alpha.c (alpha_ecoff_mkobject_hook): New hook toPeter Schauer1-0/+9
additionally copy object type information from the alpha file header to the BFD flags. (alpha_ecoff_backend_data): Use it. (ecoffalpha_little_vec): Add DYNAMIC to object_flags. * aout64.c: Fix typo in conditional QMAGIC definition.
1994-07-06 * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check theJeff Law1-0/+5
value of clicksz to help weed out non HPPA BSD core files.
1994-07-05 Mach 3 support.Stan Shebs5-5/+111
* config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New targets. * configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize "mach3" instead of "mach". (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts. * targets.c (m88kmach3_vec): New target vector. (bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but inside #if 0. * aoutx.h (some_aout_object_p) [MACH]: Recognize executables by checking for execute permission, instead of looking at entry point. * i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR, N_SHARED_LIB, don't include aout/*.h files, etc. * m88kmach3.c: New file, m88k Mach 3 target. * config/m88k-mach3.mt, config/mips-mach3.mt: New files, target makefile fragments. * config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh: New files, host makefile fragments. * hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
1994-07-05 * elfcode.h (swap_out_syms): Get alignment of common symbol fromIan Lance Taylor2-28/+61
st_value field of saved ELF symbol information, if there is any.
1994-07-05 * som.h (R_HPPA_COMPLEX): Define.Jeff Law2-0/+86
* elf32-hppa.h (R_HPPA_COMPLEX): Define. (elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
1994-07-01 * Support code for enabling the new style linker for PA ELF.Jeff Law4-57/+35
* elfcode.h (swap_symbol_in, swap_symbol_out): Externalize. (elf_compute_section_file_positions): Pass link_info to the begin_write_processing hook. (bfd_elf_write_object_contents): Pass NULL for new link_info argument to final_write_processing hook. (elf_link_output_sym): Accept new "input_section" argument for the symbols's input section. All callers changed. Call the link_output_symbol_hook if it's defined. (elf_bfd_final_link): Call the final_write_processing hook if it's defined. * libelf.h (elf_backend_link_output_symbol_hook): Declare. (elf_backend_begin_write_processing): Add new "info" argument. (elf_backend_final_write_processing): Likewise. * elf32-target.h (elf_backend_link_output_symbol_hook): Provide a default definition. (elf32_bed): Add elf_backend_link_output_symbol_hook. * elf64-target.h: Likewise. * Major rework of the PA ELF code. Uses the new style BFD linker, major cleanups. * hppa_stubs.h: Rewrite from scratch. Much smaller and simpler. * elf32-hppa.h: Delete all symbol extension related code. (hppa_look_for_stubs_in_section): Delete decl. (elf32_hppa_size_stubs, elf32_hppa_build_stubs): New decls. * elf32-hppa.c: Symbol extension stuff moved form elf32-hppa.h into elf32-hppa.c. Do not include aout64.h. (typdef hppa_stub_type): Delete. (elf32_hppa_stub_name_list_struct): Delete. (elf32_hppa_stub_description_struct): Delete. (arg_reloc_type): Use simpler enumerations. All references changed. (arg_location, arg_reloc_relocation): Likewise. (elf32_hppa_symextn_map_struct): Delete. (get_symbol_value): Delete. (elf32_hppa_get_sym_extn): Delete. (find_stubs, new_stubs, type_of_mismatch): Delete. (find_stub_by_name, add_stub_by_name): Delete. (hppa_elf_stub_finish, hppa_elf_stub_reloc): Delete. (hppa_elf_arg_reloc_needed): Renamed. Simplify. (hppa_elf_build_linker_stub, hppa_elf_create_stub_sec): Delete. (hppa_elf_long_branch_needed_p): Delete. (hppa_look_for_stubs_in_section): Delete. (hppa_elf_get_section_contents): Delete. (elf32_hppa_backend_symbol_processing): Delete. (elf32_hppa_backend_section_processing): Delete. (elf32_hppa_backend_section_from_shdr): Delete. (elf32_hppa_backend_fake_sections): Delete. (elf32_hppa_backend_section_from_bfd_section): Delete. (NEW_INSTRUCTION): Delete. (CURRENT_STUB_OFFSET): Delete. (elf32_hppa_relocate_section): New function. (elf32_hppa_bfd_final_link_relocate): New function. (elf32_hppa_size_symext): New function. (elf32_hppa_link_output_symbol_hook): New function. (elf32_hppa_read_symext_info): New function. (elf32_hppa_add_symbol_hook): New function. (elf32_hppa_name_of_stub): New function. (elf32_hppa_size_of_stub): New function. (elf32_hppa_build_one_sub): New function. (elf32_hppa_build_stubs): New function. (elf32_hppa_size_stubs): New function. (linker, stub and argument hash tables): Add appropriate structures, definitions and functions to implement all three hash tables. (hppa_elf_relocate_insn): Don't need argument location information in this function. (add_entry_to_symext_chain): Accept a symbol's argument location information rather than the symbol itself. All callers changed. (hppa_elf_gen_reloc_type): Simplify. (hppa_elf_set_section_contents): Stub section is no longer special. (hppa_elf_reloc): Greatly simplify. (elf32_hppa_begin_write_processing): Accept link_info argument. Handle being called from the BFD backend linker. (elf32_hppa_final_write_processing): Likewise. (elf_hppa_tc_make_sections): No longer call stub_finish.
1994-06-30 * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_in) [MPW_C]:Stan Shebs1-0/+5
Alternate versions without ECOFF_64 that chokes MPW C.
1994-06-28Remove more GM-specific stuff.Stan Shebs2-21/+4