Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/libexec/ld.elf_so/arch/i386 Pull up following revision(s)...
details: https://anonhg.NetBSD.org/src/rev/2920888b87ab
branches: netbsd-6
changeset: 775435:2920888b87ab
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sun Nov 18 18:50:56 2012 +0000
description:
Pull up following revision(s) (requested by apb in ticket #667):
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.35
Add support in ld.elf_so for relocation type R_386_TLS_TPOFF32.
Fixes PR#47061.
diffstat:
libexec/ld.elf_so/arch/i386/mdreloc.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diffs (44 lines):
diff -r b0290964d039 -r 2920888b87ab libexec/ld.elf_so/arch/i386/mdreloc.c
--- a/libexec/ld.elf_so/arch/i386/mdreloc.c Sun Nov 18 18:42:03 2012 +0000
+++ b/libexec/ld.elf_so/arch/i386/mdreloc.c Sun Nov 18 18:50:56 2012 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: mdreloc.c,v 1.34 2011/03/25 18:07:05 joerg Exp $ */
+/* $NetBSD: mdreloc.c,v 1.34.6.1 2012/11/18 18:50:56 msaitoh Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.34 2011/03/25 18:07:05 joerg Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.34.6.1 2012/11/18 18:50:56 msaitoh Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -129,13 +129,28 @@
_rtld_tls_offset_allocate(obj))
return -1;
- *where = (Elf_Addr)(def->st_value - defobj->tlsoffset);
+ *where += (Elf_Addr)(def->st_value - defobj->tlsoffset);
rdbg(("TLS_TPOFF %s in %s --> %p",
obj->strtab + obj->symtab[symnum].st_name,
obj->path, (void *)*where));
break;
+ case R_TYPE(TLS_TPOFF32):
+ def = _rtld_find_symdef(symnum, obj, &defobj, false);
+ if (def == NULL)
+ return -1;
+
+ if (!defobj->tls_done &&
+ _rtld_tls_offset_allocate(obj))
+ return -1;
+
+ *where += (Elf_Addr)(defobj->tlsoffset - def->st_value);
+ rdbg(("TLS_TPOFF32 %s in %s --> %p",
+ obj->strtab + obj->symtab[symnum].st_name,
+ obj->path, (void *)*where));
+ break;
+
case R_TYPE(TLS_DTPMOD32):
def = _rtld_find_symdef(symnum, obj, &defobj, false);
if (def == NULL)
Home |
Main Index |
Thread Index |
Old Index