2003-02-27 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index 2033f639575040c20e0c07dffbb968b9a72be6ac..62018eef1f53ed5c6c7ad53af0e2bc5624755fed 100644 (file)
@@ -1,3 +1,314 @@
+2003-02-27  Andrew Cagney  <cagney@redhat.com>
+
+       * bfd.c (struct bfd): Rename "struct _bfd".
+       * bfd-in.h: Update copyright.
+       (struct bfd): Rename "struct _bfd".
+       (_bfd): Define for backward compatibility.
+       * bfd-in2.h: Regenerate.
+
+2003-02-25  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
+       and rel_hdr2 when initially counting input relocs rather than after
+       creating output reloc sections.
+       (elf_link_read_relocs_from_section): Don't abort with wrong reloc
+       sizes.
+
+       * Makefile.am: Run "make dep-am".
+       * Makefile.in: Regenerate.
+
+2003-02-24  Kris Warkentin  <kewarken@qnx.com>
+
+       * elf.c (elfcore_read_notes): Add check for QNX style core file.
+       (elfcore_grog_nto_note): New function.
+       (elfcore_grog_nto_gregs): New function.
+       (elfcore_grog_nto_status): New function.
+
+2003-02-24  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (_bfd_elf_create_got_section): Check existing .got
+       section flags before concluding that we've already been called.
+       Don't use register keyword.
+       (_bfd_elf_create_dynamic_sections): Don't use register keyword.
+       (_bfd_elf_create_linker_section): Formatting.
+
+2003-02-20  jmc  <jmc@prioris.mini.pw.edu.pl>
+
+       * coff-h8300.c: Fix typo: intial -> initial.
+       * coff-ppc.c: Likewise.
+
+2003-02-20  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c: Formatting.
+       (allocate_dynrelocs): LD and GD relocs against the same sym need
+       separate GOT entries.
+       (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
+       entries per symbol.
+
+2003-02-19  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
+       removal.  Localize vars.  Remove unnecessary dynobj test.
+       * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
+       of INFO.
+       (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
+       and optimize.
+       (elf_i386_relocate_section): Likewise.
+       (elf_i386_gc_sweep_hook): Simplify dyn reloc removal.  Localize vars.
+       * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
+       * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
+       * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
+       * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.  Remove
+       local_dynrel for section too.  Don't touch HIPLT22, LOPLT10, PCPLT32
+       or PCPLT10 relocs.  Don't subtract twice on PLT32 relocs.
+       Formatting.
+
+       * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
+       (ppc64_elf_check_relocs): Use it.  Correct comment.  Move SEC_ALLOC
+       test.
+       (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
+       (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
+       (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
+       and optimize.  Use ELIMINATE_COPY_RELOCS.
+       (ppc64_elf_relocate_section): Likewise.
+
+       * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
+       (ppc_elf_copy_indirect_symbol): Copy pc_count field.
+       (ELIMINATE_COPY_RELOCS): Define.
+       (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
+       (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
+       (MUST_BE_DYN_RELOC): Define.
+       (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
+       and optimize.  Trim dyn_relocs.
+       (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
+       not be used.  Do generate dyn_relocs for copy reloc avoidance.  Keep
+       track of pc_rel dyn relocs.
+       (ppc_elf_relocate_section): Remove "will_become_local".  Adjust
+       WILL_CALL_FINISH_DYNAMIC_SYMBOL use.  Trim dyn relocs as per
+       allocate_dynrelocs.  Don't recalculate "sec".
+
+2003-02-18  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
+       * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
+       on invalid LD relocs.
+       (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
+       (ppc64_elf_relocate_section): Unify new handling of LD relocs and
+       tlsld_got entry.  Use IS_PPC64_TLS_RELOC.
+
+       * elf32-ppc.h: New file.
+       * elf32-ppc.c: Include elf32-ppc.h.
+       (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
+       (struct ppc_elf_link_hash_entry): Rename "root" to "elf".  Adjust uses.
+       Add "tls_mask" field.
+       (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
+       (struct ppc_elf_link_hash_table): Rename "root" to "elf".  Adjust uses.
+       Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
+       sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
+       Make use of htab shortcuts throughout file.
+       (ppc_elf_link_hash_newfunc): Init tls_mask field.
+       (ppc_elf_link_hash_table_create): Init new fields.
+       (ppc_elf_copy_indirect_symbol): Copy tls_mask.
+       (ppc_elf_howto_raw): Add tls relocs.
+       (ppc_elf_reloc_type_lookup): Handle them.
+       (ppc_elf_unhandled_reloc): New function.
+       (ppc_elf_create_got): Stash got section pointer in hash table,
+       return status.  Make .rela.got too.
+       (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
+       (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
+       NON_GOT_REF set.  Don't allocate space in .plt here..
+       (allocate_dynrelocs): ..do so here instead, properly ref-counting and
+       not allocating plt entries unnecessarily.  Allocate got entries here.
+       (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
+       (ppc_elf_size_dynamic_sections): Allocate local got entries.  Pass
+       "info" during allocate_dynrelocs hash traversal.  Use htab section
+       shortcuts rather than searching for named sections.  Get rid of
+       "plt" and "strip" booleans.
+       (update_local_sym_info, bad_shared_reloc): New functions.
+       (ppc_elf_check_relocs): Handle TLS relocs.  Move .rela.got creation to
+       ppc_elf_create_got.  Don't mark got or plt reloc syms dynamic, do so
+       in allocate_dynreloc.  Use update_local_sym_info and bad_shared_reloc.
+       Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
+       R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
+       in shared libs.  R_PPC_PLTREL32 is a plt reloc too.  Refcount all
+       relocs that might use a plt entry.  Set NON_GOT_REF too.
+       Enumerate all do-nothing relocs.
+       (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs.  Handle
+       tls relocs and all plt relocs.
+       (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
+       (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
+       (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
+       shortcuts.
+       (ppc_elf_relocate_section): Tidy.  Handle TLS relocs.  Use
+       bfd_elf_local_sym_name.  Simplify unresolved reloc code.  Build got
+       entries and got relocs here.  Warn on non-zero got reloc addend.
+       Split out branch taken/not taken reloc code into a separate switch
+       and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
+       Split out HA reloc adjustments to separate switch statement.  Don't
+       warn on reloc overflow if we've already warned about undefined.
+       Don't rebuild sym name when reporting errors.  Report all possible
+       errors from _bfd_final_link_relocate.
+       (bfd_elf32_bfd_final_link): Don't define.
+
+2003-02-18  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r".  Don't
+       rebuild sym name when reporting errors.
+
+2003-02-17  Nick Clifton  <nickc@redhat.com>
+
+       * elflink.h (elf_link_output_extsym): Only check
+       allow_shlib_undefined for shared libraries.
+       * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
+       of allow_shlib_undefined.
+       * elf32-cris.c (cris_elf_relocate_section): Likewise.
+       * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+       * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+       * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+       * elf32-s390.c (elf_s390_relocate_section): Likewise.
+       * elf32-sh.c (sh_elf_relocate_section): Likewise.
+       * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+       * elf32-vax.c (elf_vax_relocate_section): Likewise.
+       * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+       * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
+       * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+       * elf64-s390.c (elf_s390_relocate_section): Likewise.
+       * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+       * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
+
+2003-02-17  Nick Clifton  <nickc@redhat.com>
+
+       * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
+       address field to use in the comparison.
+       (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
+
+2003-02-14  Bob Wilson  <bob.wilson@acm.org>
+
+       * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
+       backends when checking if the generic ELF target should be used.
+
+       * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
+       outside of functions, treat values as absolute addresses.
+
+       * bfd.c: Change embedded documentation to use consistent indentation
+       and to split up long lines.  Change informal style of description
+       for functions lacking real documentation.
+       * coffcode.h: Break up long lines in embedded documentation.
+       * format.c: Likewise.
+       * targets.c: Likewise.
+       * libcoff.h: Regenerate.
+       * bfd-in2.h: Regenerate.
+
+2003-02-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
+       (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
+       (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
+       (allocate_dynrelocs): Don't treat undefined and undefweak specially.
+       (ppc_size_one_stub): Fix warning, and tighten plt entry check.
+       (group_sections): Don't share a stub section if stubs are for a large
+       section.  Adjust comment.
+       (ppc64_elf_size_stubs): Roughly double the size left for stubs if
+       !stubs_always_before_branch.
+       (ppc64_elf_relocate_section): Initialize tlsld GOT entry once.  Don't
+       treat undefined and undefweak specially when processing dyn relocs.
+
+2003-02-13  Jakub Jelinek  <jakub@redhat.com>
+
+       * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
+
+2003-02-13  Nick Clifton  <nickc@redhat.com>
+
+       * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
+       in computation of offset to insert into BL instruction.
+
+2003-02-11  Uwe Stieber  <uwe@wwws.de>
+
+       * config.bfd: Add support for kaOS as cross build target system.
+
+2003-02-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
+       .__tls_get_addr too.
+       (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
+
+2003-02-10  Kaz kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
+       (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
+       (sh_elf_link_hash_newfunc): Remove the initialization of
+       tls_tpoff32 field.
+       (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
+       for which tls_tpoff32 flag is set.
+       (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
+       of the symbol includes the entry matched with the input_section
+       and having tls_tpoff32 flag on.  When linking statically, set
+       symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
+       is defined in this executable.
+       (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
+
+2003-02-10  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
+       even if there is just non-empty .rela.plt.
+
+2003-02-10  Nick Clifton  <nickc@redhat.com>
+
+       * archures.c (bfd_mach_arm_ep9312): Define.
+       * bfd-in2.h: Regenerate.
+       * cpu-arm.c (processors[]): Add ep9312.
+       (bfd_arm_arch): Add ep9312.
+       * elf32-arm.h (elf32_arm_merge_private_data): Update error
+       messages and add test for Maverick floating point support.
+       (elf32_arm_print_private_bfd_data): Handle
+       EF_ARM_MAVERICK_FLOAT flag.
+       (elf32_arm_object_p): New function.
+       (elf_backend_object_p): Define.
+
+2003-02-10  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
+       variables, structure fields or function params to tls_mask or
+       similar to better reflect usage.
+       (struct got_entry): Comment.
+       (struct ppc_link_hash_entry):  Expand comment, and renumber TLS_*.
+       (get_tls_mask): Rename from get_tls_type.
+
+2003-02-09  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (TLS_GD_LD): Don't define..
+       (TLS_GD): ..define this instead and update all uses.
+       (TLS_TPRELGD): Define.
+       (ppc64_elf_link_hash_table_create): Tweak initialization of
+       init_refcount and init_offset.
+       (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
+       Mark second slot of GD or LD toc entries.
+       (get_tls_type): Return an int.  Distinguish toc GD and LD entries
+       from other tls types.
+       (ppc64_elf_tls_setup): New function, split out from..
+       (ppc64_elf_tls_optimize): ..here.  Don't optimize when symbols are
+       defined in a dynamic object.  Fix LD optimization.  Don't set TLS_TPREL
+       on GD->IE optimization, use TLS_TPRELGD instead.  Use get_tls_type
+       return value to properly decide whether toc GD and LD entries can
+       optimize away __tls_get_addr call.  Check next reloc after DTPMOD64
+       to determine GD or LD rather than looking at TLS_LD flag.  Don't
+       attempt to adjust got entry tls_type here..
+       (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
+       look for possible merges.
+       (ppc64_elf_size_dynamic_sections): Adjust local got entries for
+       optimization.
+       (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
+       (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
+       Make use of return value from get_tls_type to properly detect GD and
+       LD optimizations.  Split tlsld/gd hi/ha from lo/ds case.  Don't
+       handle tls_get_addr removal when looking at REL24 relocs, do it when
+       looking at the previous reloc.  Check reloc after DTPMOD64 to determine
+       GD or LD.
+       * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
+
 2003-02-08  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-hppa.c (group_sections): Don't share a stub section if
        TLS_EXPLICIT): Define.
        (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
        (link_hash_newfunc): Init new fields.
-       (ppc64_elf_link_hash_table_create): Likewise.  Set init_relcount and
+       (ppc64_elf_link_hash_table_create): Likewise.  Set init_refcount and
        init_offset to NULL.
        (ppc64_elf_copy_indirect_symbol): Copy got and plt info.  Don't call
        _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
This page took 0.033101 seconds and 4 git commands to generate.