]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-11-14 David O'Brien <obrien@FreeBSD.org>
authorDavid O'Brien <obrien@FreeBSD.org>
Thu, 14 Nov 2002 16:23:07 +0000 (16:23 +0000)
committerDavid O'Brien <obrien@FreeBSD.org>
Thu, 14 Nov 2002 16:23:07 +0000 (16:23 +0000)
Merge from mainline:
2002-11-12  Thomas Moestl <tmm@FreeBSD.org>
* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
references to large plt symbols.

Approved by:  Daniel Jacobowitz <drow@mvista.com>
              Message-ID: <20021114003410.GA15753@nevyn.them.org>

bfd/ChangeLog
bfd/elf64-sparc.c

index c263c9df6a594eb517150de19f3e454c36a9720a..21a4ef9c7c834fdf437c74eaa50ecb41c1122988 100644 (file)
@@ -1,3 +1,10 @@
+2002-11-14  David O'Brien  <obrien@FreeBSD.org>
+
+       Merge from mainline:
+       2002-11-12  Thomas Moestl <tmm@FreeBSD.org>
+       * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
+       references to large plt symbols.
+
 2002-11-13  Alan Modra  <amodra@bigpond.net.au>
 
        Merge from mainline.
index 1ca03dcb85443586ac0fce8dd801f33499434828..88d02544c1c2b11bdf276ad58821e833b01f84ab 100644 (file)
@@ -1563,6 +1563,9 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
       if (s->_raw_size == 0)
        s->_raw_size = PLT_HEADER_SIZE;
 
+      /* To simplify matters later, just store the plt index here.  */
+      h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
+
       /* If this symbol is not defined in a regular file, and we are
         not generating a shared library, then set the symbol to this
         location in the .plt.  This is required to make function
@@ -1572,12 +1575,9 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
          && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
        {
          h->root.u.def.section = s;
-         h->root.u.def.value = s->_raw_size;
+         h->root.u.def.value = sparc64_elf_plt_entry_offset (h->plt.offset);
        }
 
-      /* To simplify matters later, just store the plt index here.  */
-      h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
-
       /* Make room for this entry.  */
       s->_raw_size += PLT_ENTRY_SIZE;