Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so/arch/aarch64 Honor addend for R_AARCH64_TL...
details: https://anonhg.NetBSD.org/src/rev/6b9dbd2303a5
branches: trunk
changeset: 934699:6b9dbd2303a5
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jun 16 21:01:30 2020 +0000
description:
Honor addend for R_AARCH64_TLS_TPREL relocation.
diffstat:
libexec/ld.elf_so/arch/aarch64/mdreloc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r e719a36804c3 -r 6b9dbd2303a5 libexec/ld.elf_so/arch/aarch64/mdreloc.c
--- a/libexec/ld.elf_so/arch/aarch64/mdreloc.c Tue Jun 16 17:25:56 2020 +0000
+++ b/libexec/ld.elf_so/arch/aarch64/mdreloc.c Tue Jun 16 21:01:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $ */
+/* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -296,8 +296,9 @@
_rtld_tls_offset_allocate(obj))
return -1;
- *where = (Elf_Addr)def->st_value + defobj->tlsoffset +
- sizeof(struct tls_tcb);
+ *where = (Elf_Addr)(def->st_value + defobj->tlsoffset +
+ rela->r_addend + sizeof(struct tls_tcb));
+
rdbg(("TLS_TPREL %s in %s --> %p in %s",
obj->strtab + obj->symtab[symnum].st_name,
obj->path, (void *)*where, defobj->path));
Home |
Main Index |
Thread Index |
Old Index