From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 0E3573851520; Thu, 27 Oct 2022 13:55:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E3573851520 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666878939; bh=24xSexPppmvQkRm4oTs1hu4uWL9EepH+fOpyoRJPXDI=; h=From:To:Subject:Date:From; b=M1QPRIQBd9pMsE97VM+OS93fG7p9SV1KJZqZZRSUsTTDaGimEgvCLlfV66WR+e+9a 1uWSCa1T+Kb68HcBKIQf1oGd0VFWoesNZ9asriVJ8Q9px3LHtUZsZW5OLi7pQi4fN1 KndWQLTtOYCpjrrdaa3a+pyYavVXJdYJFxaeLrRA= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] cheri: fix static linking TLS setup X-Act-Checkin: glibc X-Git-Author: Carlos Eduardo Seo X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: aec15be8ed6e218532f383dd61398125df061de8 X-Git-Newrev: 3a41a4efd8a2d1cd5f95c0ec85f2f76ca97ae80a Message-Id: <20221027135539.0E3573851520@sourceware.org> Date: Thu, 27 Oct 2022 13:55:36 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3a41a4efd8a2d1cd5f95c0ec85f2f76ca97ae80a commit 3a41a4efd8a2d1cd5f95c0ec85f2f76ca97ae80a Author: Carlos Eduardo Seo Date: Wed Jun 9 15:23:23 2021 -0300 cheri: fix static linking TLS setup Use the per module RW capability to access the TLS initimage. The bounds are not restricted for now. Diff: --- csu/libc-tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csu/libc-tls.c b/csu/libc-tls.c index 0a216c5502..0701ec5acb 100644 --- a/csu/libc-tls.c +++ b/csu/libc-tls.c @@ -125,7 +125,7 @@ __libc_setup_tls (void) /* Remember the values we need. */ memsz = phdr->p_memsz; filesz = phdr->p_filesz; - initimage = (void *) phdr->p_vaddr + main_map->l_addr; + initimage = (void *) dl_rx_ptr (main_map, phdr->p_vaddr); align = phdr->p_align; if (phdr->p_align > max_align) max_align = phdr->p_align;