public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rui314 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29651] New: glibc can't handle IRELATIVE in .rel.plt only on ARM32 and PPC
Date: Tue, 04 Oct 2022 02:39:02 +0000	[thread overview]
Message-ID: <bug-29651-131@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29651
           Summary: glibc can't handle IRELATIVE in .rel.plt only on ARM32
                    and PPC
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: rui314 at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

It looks like glibc is inconsistent in terms of whether it accepts IRELATIVE
relocations in .rel.plt or not. The majority of its ports support it, though it
rejects it with the "unexpected PLT reloc type" error on ARM32 and PPC64.

Compare 

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/dl-machine.h;h=005d089501fa78654e16103de9ec901af7be4ff2;hb=HEAD#l530

with

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/arm/dl-machine.h;h=b0521c15496b9967a1c00a0ca7214bad2337be14;hb=HEAD#l498

as an example. ARM doesn't handle R_ARM_IRELATIVE in .rel.plt.

Among the targets that support GNU IFUNC, the following implementations accept
IRELATIVE relocations in .rel.plt:

  sysdeps/aarch64/dl-machine.h
  sysdeps/i386/dl-machine.h
  sysdeps/s390/s390-32/dl-machine.h
  sysdeps/s390/s390-64/dl-machine.h
  sysdeps/sparc/sparc32/dl-machine.h
  sysdeps/sparc/sparc64/dl-machine.h
  sysdeps/x86_64/dl-machine.h

The following don't:

  sysdeps/arm/dl-machine.h
  sysdeps/powerpc/powerpc64/dl-machine.h

So I guess this is a bug in ARM32 and PPC64 ports of glibc?

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

             reply	other threads:[~2022-10-04  2:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04  2:39 rui314 at gmail dot com [this message]
2022-10-04  2:43 ` [Bug libc/29651] " rui314 at gmail dot com
2022-10-13 17:41 ` adhemerval.zanella at linaro dot org
2022-10-14  1:48 ` rui314 at gmail dot com
2022-10-14 12:16 ` adhemerval.zanella at linaro dot org
2022-10-14 13:40 ` adhemerval.zanella at linaro dot org
2022-10-15  2:06 ` rui314 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-29651-131@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).