aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-07 22:14:40 +0000
committerRoland McGrath <roland@gnu.org>2002-08-07 22:14:40 +0000
commit534feaab4b1ab715764bc25f652ccaff28ac0571 (patch)
tree3ef3747ecc212a5226cf55faee44142fc928a99c
parent0be405c239d30aeb1c822740e844fb856ec3639e (diff)
downloadglibc-534feaab4b1ab715764bc25f652ccaff28ac0571.tar
glibc-534feaab4b1ab715764bc25f652ccaff28ac0571.tar.gz
glibc-534feaab4b1ab715764bc25f652ccaff28ac0571.tar.bz2
glibc-534feaab4b1ab715764bc25f652ccaff28ac0571.zip
* sysdeps/i386/dl-machine.h (elf_machine_rel): Add to, don't clobber,
unrelocated initial value for DTPOFF32 and TPOFF32 relocs. Reported by Jakub Jelinek <jakub@redhat.com>.
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/i386/dl-machine.h6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cf5e3394d8..33423416e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-08-07 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/i386/dl-machine.h (elf_machine_rel): Add to, don't clobber,
+ unrelocated initial value for DTPOFF32 and TPOFF32 relocs.
+ Reported by Jakub Jelinek <jakub@redhat.com>.
+
2002-08-07 Jakub Jelinek <jakub@redhat.com>
* malloc/malloc.c (public_cALLOc): Check ELEM_SIZE != 0 before
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index f8b2a3cbd1..8092e889b0 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -393,20 +393,20 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
/* During relocation all TLS symbols are defined and used.
Therefore the offset is already correct. */
if (sym != NULL)
- *reloc_addr = sym->st_value;
+ *reloc_addr += sym->st_value;
# endif
break;
case R_386_TLS_TPOFF32:
/* The offset is positive, backward from the thread pointer. */
# ifdef RTLD_BOOTSTRAP
- *reloc_addr = map->l_tls_offset - sym->st_value;
+ *reloc_addr += map->l_tls_offset - sym->st_value;
# else
/* We know the offset of object the symbol is contained in.
It is a positive value which will be subtracted from the
thread pointer. To get the variable position in the TLS
block we subtract the offset from that of the TLS block. */
if (sym_map != NULL && sym != NULL)
- *reloc_addr = sym_map->l_tls_offset - sym->st_value;
+ *reloc_addr += sym_map->l_tls_offset - sym->st_value;
# endif
break;
#endif /* use TLS */