From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 7416A385152B; Wed, 26 Oct 2022 15:16:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7416A385152B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666797419; bh=pN9g6Qwi8qELw5V77CtLTdLfmq3XFhpxNeHj3sLx1wU=; h=From:To:Subject:Date:From; b=wl/fQf9I1Yefa4sD5Tad95CzAwEULBAyZAMG8UCpX7fUQPlCXHye3lNQ0JzLUPJW4 ZEyh7rBmSjMSicN1TnLQEirpxNtngSvX65NQRFZ8p8wO2cI9iOaplKA8H3Kx9FaieT 21vzm9fnJmwHUREmt8QQ11Os6gbLxkvxkomBKCwc= 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: 0fd1c9d51bc67c23f184eb6a39848e53c0847e92 X-Git-Newrev: 497faad9679fd7c6a45f301891946e61b3042347 Message-Id: <20221026151659.7416A385152B@sourceware.org> Date: Wed, 26 Oct 2022 15:16:59 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=497faad9679fd7c6a45f301891946e61b3042347 commit 497faad9679fd7c6a45f301891946e61b3042347 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;