public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Szabolcs Nagy <nsz@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] cheri: elf: fix pointer provenance of l_tls_initimage Date: Fri, 5 Aug 2022 19:36:36 +0000 (GMT) [thread overview] Message-ID: <20220805193636.299D43856DF8@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2b1192cae03642b2cb16f918322f5cddfc54eae2 commit 2b1192cae03642b2cb16f918322f5cddfc54eae2 Author: Szabolcs Nagy <szabolcs.nagy@arm.com> Date: Thu Apr 7 17:04:59 2022 +0100 cheri: elf: fix pointer provenance of l_tls_initimage Diff: --- elf/dl-load.c | 2 +- elf/rtld.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/dl-load.c b/elf/dl-load.c index 1ad0868dad..367b8cdab1 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1369,7 +1369,7 @@ cannot enable executable stack as shared object requires"); /* Adjust the address of the TLS initialization image. */ if (l->l_tls_initimage != NULL) - l->l_tls_initimage = (char *) l->l_tls_initimage + l->l_addr; + l->l_tls_initimage = (ElfW(Addr)) l->l_tls_initimage + (char *) l->l_addr; /* Process program headers again after load segments are mapped in case processing requires accessing those segments. Scan program diff --git a/elf/rtld.c b/elf/rtld.c index 2c61935a21..6ba7b94761 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1274,7 +1274,7 @@ rtld_setup_main_map (struct link_map *main_map) the executable is actually an ET_DYN object. */ if (main_map->l_tls_initimage != NULL) main_map->l_tls_initimage - = (char *) main_map->l_tls_initimage + main_map->l_addr; + = (ElfW(Addr)) main_map->l_tls_initimage + (char *) main_map->l_addr; if (! main_map->l_map_end) main_map->l_map_end = ~0; if (! main_map->l_text_end)
reply other threads:[~2022-08-05 19:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220805193636.299D43856DF8@sourceware.org \ --to=nsz@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).