* coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
[binutils-gdb.git] / bfd / ChangeLog
index 61f28db1ce36a73a8214a3b56942f4dfc2cc91c8..c080c0b9d3e682e583fbf5cf05384a8f64f305ec 100644 (file)
@@ -1,3 +1,177 @@
+Tue Jun  7 13:25:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
+       set SEC_DEBUGGING for STYP_INFO sections.
+       (coff_compute_section_file_positions): If COFF_PAGE_SIZE is
+       defined, and D_PAGED is set, set the file position equal to the
+       section VMA modulo COFF_PAGE_SIZE.
+       * coffgen.c (coff_real_object_p): If F_EXEC is set, set D_PAGED.
+       * coff-i386.c: Set D_PAGED in BFD target.
+       (COFF_PAGE_SIZE): Define.
+       * coff-m68k.c, coff-sparc.c: Likewise.
+
+Mon Jun  6 10:57:28 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
+       into a BFD section just because SHF_ALLOC is set; require that it
+       not use the normal symbol table.
+       (elf_section_from_bfd_section): Corresponding change.
+
+       Better indirect and warning symbol handling inspired by Stuart
+       Quick <stuck@cs.man.ac.uk>.
+       * linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
+       (link_action): Change UNDEF_ROW/def and UNDEFW_ROW/def from NOACT
+       to REF.  Change UNDEF_ROW/indr and UNDEFW_ROW/indr from CYCLE to
+       REFC.  Change DEF_ROW/indr and COMMON_ROW/indr from CYCLE to MDEF.
+       Change DEFW_ROW/indr from CYCLE to NOACT.  Change INDR_ROW/indr
+       from MDEF to MIND.  Change INDR_ROW/warn from WARNC to CYCLE.
+       Change WARN_ROW/def and WARN_ROW/indr from MWARN to CWARN.  Change
+       WARN_ROW/com from MWARN to WARN.  Change WARN_ROW/warn from NOACT
+       to CYCLE.  Change SET_ROW/warn from WARNC to CYCLE>
+       (_bfd_generic_link_add_one_symbol): Handle REF, MIND, CWARN and
+       REFC.  If a new indirect symbol has been referenced, push the
+       reference down to the symbol it points to.  FIx handling of WARN.
+       * aoutx.h (translate_from_native_sym_flags): If N_WARNING, don't
+       clobber e_type of next symbol.
+       (translate_to_native_sym_flags): Likewise.
+       (aout_link_write_symbols): Loop on bfd_link_hash_warning as well
+       as bfd_link_hash_indirect.
+
+       * libaout.h (struct aout_link_hash_entry): New field written.
+       * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
+       (aout_link_write_symbols): Use written, not root.written.
+       (aout_link_write_other_symbol): Likewise.
+       * sunos.c (sunos_scan_dynamic_symbol): Likewise.
+       * libecoff.h (struct ecoff_link_hash_entry): New field written.
+       * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
+       (ecoff_link_write_external): use written, not root.written.
+       * genlink.h (struct generic_link_hash_entry): New field written.
+       * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
+       (generic_link_hash_newfunc): Initialize written.
+       (_bfd_generic_link_output_symbols): Use written, not root.written.
+       (_bfd_generic_link_write_global_symbol): Likewise.
+       (_bfd_generic_reloc_link_order): Likewise.
+
+       * libecoff.h (ecoff_data_type): Add linker field.
+       * ecoff.c (ecoff_write_object_contents): Check new tdata linker
+       field, rather than outsymbols being non-NULL, to decide whether to
+       output the symbols and relocs.
+       (ecoff_bfd_final_link): Set new tdata linker field to true.
+
+       * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy
+       data to a non-ECOFF file.
+
+       * libbfd-in.h: Add warning that libbfd.h is a generated file.
+       * libbfd.h: Rebuilt.
+
+Sun Jun  5 15:02:30 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       Changes to support ELF strip and objcopy on dynamically linked
+       files.
+       * elfcode.h (elf_fake_sections): Add prototype.
+       (bfd_section_from_shdr): Make a BFD section from an SHT_HASH
+       section, and from an SHT_DYNSYM section, and from the dynamic
+       string table section.
+       (elf_object_p): Set D_PAGED if there is a program header.
+       (elf_make_sections): Remove.
+       (fix_up_strtabs): Remove.
+       (elf_fake_sections): Rewrite.  Now sets sh_entsize.
+       (assign_section_numbers): Rewrite.  Now sets sh_link and sh_info
+       for all sections.
+       (elf_compute_section_file_positions):  Don't call obsolete
+       functions elf_make_sections or fix_up_strtabs.
+       (swap_out_syms): Set sh_addralign to FILE_ALIGN rather than 4.
+       (NAME(bfd_elf,write_object_contents)): Permit writing DYNAMIC
+       objects.
+       (elf_section_from_bfd_section): Treat SHT_DYNSYM like other normal
+       sections.  If an SHT_REL or SHT_RELA section is allocated or uses
+       an unusual symbol table, permit a BFD section to map to it.
+       Permit most SHT_STRTAB sections to have a BFD section mapped to
+       them.
+       (elf_bfd_final_link): Don't set sh_link, sh_info or sh_entsize
+       fields of dynamic sections here; do it in assign_section_numbers.
+       * elf32-target.h, elf64-target.h: Add D_PAGED to permitted object
+       flags.
+
+       * elf.c (_bfd_elf_make_section_from_shdr): Only set SEC_DATA if
+       SEC_LOAD is set, rather than checking SEC_ALLOC.
+
+       * libbfd-in.h (bfd_realloc): Change last arg to "size_t size".
+
+Fri Jun  3 10:58:02 1994  Jeff Law  (law@snake.cs.utah.edu)
+
+       * som.c (som_write_object_contents): Don't compute the file header's
+       checksum here.
+       (som_write_headers): Instead do it here.
+
+       * libbfd.h (bfd_realloc): Change last arg to "size_t size".
+
+Thu Jun  2 17:39:22 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * hosts/sun3.h: Include <stdlib.h>.  Don't declare free, exit or
+       getenv.
+
+       Add linker support for SunOS shared libraries.
+       * 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.
+
+       * aoutx.h (NAME(aout,slurp_symbol_table)): Don't zero out cached
+       until we know it is non-NULL.
+       (aout_link_write_symbols): Don't skip a warning symbol even if it
+       has already been written out.  If skipping an indirect symbol,
+       skip the next symbol as well.
+
+Wed Jun  1 14:37:50 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * hosts/sun3.h: Don't declare qsort, malloc or realloc.
+
 Thu May 26 13:56:03 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
 
        * nlmcode.h (nlm_swap_auxiliary_headers_in): Cast bfd_byte pointer
@@ -383,20 +557,6 @@ Fri May  6 11:48:55 1994  Steve Chamberlain  (sac@cygnus.com)
        * Makefile.in: Build sysdep.h without causing worrying but
        harmless error message.
 
-Fri May  6 13:34:14 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
-
-       * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
-       handling for latest suggested format.
-       (nlm_swap_auxiliary_headers_out): Likewise.
-       (nlm_compute_section_file_positions): Likewise.
-
-Thu May  5 15:40:47 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
-
-       Patches from Ralph Campbell:
-       * mipsbsd.c (mips_fix_jmp_addr): New function.
-       (mips_fix_hi16_s): Use bfd_is_com_section.
-       (mips_howto_table_ext): Call mips_fix_jmp_addr for MIPS_RELOC_JMP.
-
 Wed May  4 11:09:53 1994  Ian Lance Taylor  (ian@cygnus.com)
 
        Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.