aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-sparc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-11-11 23:42:29 +0000
committerAlan Modra <amodra@gmail.com>2002-11-11 23:42:29 +0000
commit7c319a271cbd151d6d58905c418664c69d195eff (patch)
tree74523cd9096c5aec8864eee8b02bcfa0f3e2c965 /bfd/elf64-sparc.c
parent636b1a6d8e3582d8797e916f3f07d090ede41943 (diff)
downloadgdb-7c319a271cbd151d6d58905c418664c69d195eff.zip
gdb-7c319a271cbd151d6d58905c418664c69d195eff.tar.gz
gdb-7c319a271cbd151d6d58905c418664c69d195eff.tar.bz2
* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
references to large plt symbols.
Diffstat (limited to 'bfd/elf64-sparc.c')
-rw-r--r--bfd/elf64-sparc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index e3a120b..184179e 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -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;