public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nsz 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, 07 Jan 2021 14:00:57 +0000	[thread overview]
Message-ID: <bug-27072-131-ZcaMJdJfG5@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 #3 from Szabolcs Nagy <nsz at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #2)
> Did you run into
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=13302

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-01-07 14:00 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 [this message]
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
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-ZcaMJdJfG5@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: link
Be 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).