Honor addend for R_AARCH64_TLS_TPREL relocation.
This commit is contained in:
parent
5cbb56529f
commit
41844ca786
|
@ -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.
|
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -296,8 +296,9 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj)
|
||||||
_rtld_tls_offset_allocate(obj))
|
_rtld_tls_offset_allocate(obj))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
*where = (Elf_Addr)def->st_value + defobj->tlsoffset +
|
*where = (Elf_Addr)(def->st_value + defobj->tlsoffset +
|
||||||
sizeof(struct tls_tcb);
|
rela->r_addend + sizeof(struct tls_tcb));
|
||||||
|
|
||||||
rdbg(("TLS_TPREL %s in %s --> %p in %s",
|
rdbg(("TLS_TPREL %s in %s --> %p in %s",
|
||||||
obj->strtab + obj->symtab[symnum].st_name,
|
obj->strtab + obj->symtab[symnum].st_name,
|
||||||
obj->path, (void *)*where, defobj->path));
|
obj->path, (void *)*where, defobj->path));
|
||||||
|
|
Loading…
Reference in New Issue