From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 964083851C3D; Thu, 7 Jan 2021 14:00:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 964083851C3D From: "nsz at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27072] static pie ifunc resolvers run before hwcap is setup Date: Thu, 07 Jan 2021 14:00:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.32 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nsz at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 14:00:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27072 --- Comment #3 from Szabolcs Nagy --- (In reply to H.J. Lu from comment #2) > Did you run into >=20 > https://sourceware.org/bugzilla/show_bug.cgi?id=3D13302 first of all IRELATIVE relocs are in a separate section (.rela.plt where DT_JUMPREL points to) that is processed later than RELATIVE relocs (which are in .rela.dyn where DT_RELA points to) see the two 'ranges' in _ELF_DYNAMIC_DO_RELOC. with static pie 'ELF_DURING_STARTUP' is set, so the two ranges are not processed separately, but in one go, but because of the different section, IRELATIVE is necessarily after RELATIVE in the binary. of course glibc may choose to process relocs in different order than they appear in the binary. see elf_dynamic_do_Rela, but that's not a linker issue anymore. (within DT_JUMPREL i'd expect ld to order IRELATIVE after JUMP_SLOT relocs, but before TLSDESC relocs, but such relocs cannot appear in static pie so this is not relevant here anyway.) also note that currently in glibc the aarch64 ifunc resolvers don't depend on RELATIVE relocs so even if there was no ordering the reloc processing would work for now (assuming no user ifuncs). in short 13302 is not relevant to this bug. --=20 You are receiving this mail because: You are on the CC list for the bug.=