Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain/bfd backout this change. we aren't yet re...



details:   https://anonhg.NetBSD.org/src/rev/aa1f2f7a2cbe
branches:  trunk
changeset: 513817:aa1f2f7a2cbe
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Aug 14 11:37:10 2001 +0000

description:
backout this change. we aren't yet ready for it.


2000-08-16  Andrew Macleod  <amacleod%cygnus.com@localhost>

        * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
        four extra entries at the beginning of the .rela.plt section.
        (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
        section to account for the four reserved entries in the .plt section.

diffstat:

 gnu/dist/toolchain/bfd/elf64-sparc.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r eb57d2bab3fa -r aa1f2f7a2cbe gnu/dist/toolchain/bfd/elf64-sparc.c
--- a/gnu/dist/toolchain/bfd/elf64-sparc.c      Tue Aug 14 11:01:55 2001 +0000
+++ b/gnu/dist/toolchain/bfd/elf64-sparc.c      Tue Aug 14 11:37:10 2001 +0000
@@ -1556,6 +1556,12 @@
       s = bfd_get_section_by_name (dynobj, ".rela.plt");
       BFD_ASSERT (s != NULL);
 
+      /* The first plt entries are reserved, and the relocations must
+        pair up exactly.  */
+      if (s->_raw_size == 0)
+       s->_raw_size += (PLT_HEADER_SIZE/PLT_ENTRY_SIZE
+                        * sizeof (Elf64_External_Rela));
+
       s->_raw_size += sizeof (Elf64_External_Rela);
 
       /* The procedure linkage table size is bounded by the magnitude
@@ -2694,14 +2700,9 @@
       rela.r_offset += (splt->output_section->vma + splt->output_offset);
       rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_JMP_SLOT);
 
-      /* Adjust for the first 4 reserved elements in the .plt section
-        when setting the offset in the .rela.plt section.
-        Sun forgot to read their own ABI and copied elf32-sparc behaviour,
-        thus .plt[4] has corresponding .rela.plt[0] and so on.  */
-
       bfd_elf64_swap_reloca_out (output_bfd, &rela,
                                 ((Elf64_External_Rela *) srela->contents
-                                 + (h->plt.offset - 4)));
+                                 + h->plt.offset));
 
       if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
        {



Home | Main Index | Thread Index | Old Index