From 448a986954f65cc8c41f227bdf171d8e0d0b4c7d Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Wed, 4 Jul 2018 17:55:25 +0200 Subject: TLS: fix relocation computation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ldso/ldso/dl-elf.c (_dl_load_elf_shared_library): Fix l_tls_initimage computation. * ldso/ldso/ldso.c (_dl_get_ready_to_run): Likewise. Signed-off-by: Mickaël Guêné Signed-off-by: Christophe Lyon --- ldso/ldso/ldso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldso/ldso/ldso.c') diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index c62575797..06b0ac874 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -772,7 +772,7 @@ of this helper program; chances are you did not intend to run this program.\n\ char *tmp attribute_unused = (char *) app_tpnt->l_tls_initimage; app_tpnt->l_tls_initimage = - (char *) app_tpnt->l_tls_initimage + app_tpnt->loadaddr; + (char *) DL_RELOC_ADDR(app_tpnt->loadaddr, app_tpnt->l_tls_initimage); _dl_debug_early("Relocated TLS initial image from %x to %x (size = %x)\n", tmp, app_tpnt->l_tls_initimage, app_tpnt->l_tls_initimage_size); } -- cgit v1.2.3