public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27072] static pie ifunc resolvers run before hwcap is setup Date: Thu, 21 Jan 2021 15:59:46 +0000 [thread overview] Message-ID: <bug-27072-131-JIRpBm1jfZ@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-27072-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=27072 --- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Szabolcs Nagy <nsz@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=47618209d05a0e77932038f21c6bba2425bd75c6 commit 47618209d05a0e77932038f21c6bba2425bd75c6 Author: Szabolcs Nagy <szabolcs.nagy@arm.com> Date: Fri Jan 15 12:49:24 2021 +0000 Use hidden visibility for early static PIE code Extern symbol access in position independent code usually involves GOT indirection which needs RELATIVE reloc in a static linked PIE. (On some targets this is avoided e.g. because the linker can relax a GOT access to a pc-relative access, but this is not generally true.) Code that runs before static PIE self relocation must avoid relying on dynamic relocations which can be ensured by using hidden visibility. However we cannot just make all symbols hidden: On i386, all calls to IFUNC functions must go through PLT and calls to hidden functions CANNOT go through PLT in PIE since EBX used in PIE PLT may not be set up for local calls to hidden IFUNC functions. This patch aims to make symbol references hidden in code that is used before and by _dl_relocate_static_pie when building a static PIE libc. Note: for an object that is used in the startup code, its references and definition may not have consistent visibility: it is only forced hidden in the startup code. This is needed for fixing bug 27072. Co-authored-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-01-21 15:59 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-15 11:01 [Bug dynamic-link/27072] New: " nsz at gcc dot gnu.org 2020-12-15 11:38 ` [Bug dynamic-link/27072] " fweimer at redhat dot com 2021-01-07 12:42 ` hjl.tools at gmail dot com 2021-01-07 14:00 ` nsz at gcc dot gnu.org 2021-01-07 17:10 ` hjl.tools at gmail dot com 2021-01-07 20:33 ` hjl.tools at gmail dot com 2021-01-13 19:20 ` i at maskray dot me 2021-01-19 14:39 ` cvs-commit at gcc dot gnu.org 2021-01-21 15:59 ` cvs-commit at gcc dot gnu.org [this message] 2021-01-21 15:59 ` cvs-commit at gcc dot gnu.org 2021-01-21 17:06 ` adhemerval.zanella at linaro dot org 2021-01-21 18:23 ` hjl.tools at gmail dot com
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=bug-27072-131-JIRpBm1jfZ@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@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).