public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dave.anglin at bell dot net" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/28857] FAIL: elf/tst-audit24a
Date: Thu, 03 Feb 2022 20:49:35 +0000	[thread overview]
Message-ID: <bug-28857-131-C5xaoIhO0g@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28857-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28857

--- Comment #2 from dave.anglin at bell dot net ---
Is it DL_FIXUP_ADDR_VALUE that's problematic?  Maybe it should be defined to
_dl_lookup_address()?

On 32-bit hppa, a pointer to a function descriptor has the plabel bit set (bit
30).  This must be cleared to
get the actual address of the descriptor ((unsigned int)addr & ~2).  If the
descriptor has been bound,
the first word of the descriptor is the physical address of the function.  If
it hasn't been bound, the first
word of the descriptor points to a trampoline in the PLT.  It will fixup the
descriptor on the first call to
the function.

_dl_lookup_address() in dl-fptr.c resolves the descriptor and returns the
actual function address.

If that's not required, maybe DL_FIXUP_ADDR_VALUE(addr) should be:
#define DL_FIXUP_ADDR_VALUE(addr) (*(struct fdesc *) ((unsigned int)addr & ~2))
DL_FIXUP_BINDNOW_RELOC looks questionable as well.

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

  parent reply	other threads:[~2022-02-03 20:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 14:25 [Bug libc/28857] New: " danglin at gcc dot gnu.org
2022-02-03 20:17 ` [Bug libc/28857] " adhemerval.zanella at linaro dot org
2022-02-03 20:49 ` dave.anglin at bell dot net [this message]
2022-02-04 18:53 ` adhemerval.zanella at linaro dot org
2022-02-05  0:33 ` dave.anglin at bell dot net
2022-02-05 23:29 ` dave.anglin at bell dot net
2022-02-07 12:11 ` adhemerval.zanella at linaro dot org
2022-02-07 12:50 ` adhemerval.zanella at linaro dot org
2022-02-07 15:16 ` dave.anglin at bell dot net
2022-02-09 12:13 ` adhemerval.zanella at linaro dot org
2023-01-17 18:57 ` sam at gentoo dot org

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-28857-131-C5xaoIhO0g@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).