From: Vincent Chen <vincent.chen@sifive.com>
To: GNU C Library <libc-alpha@sourceware.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Darius Rad <darius@bluespec.com>, DJ Delorie <dj@redhat.com>
Cc: Nelson Chu <nelson.chu@sifive.com>, Jim Wilson <jimw@sifive.com>,
Paul Walmsley <paul.walmsley@sifive.com>
Subject: Re: [PATCH v2 0/2] riscv: add support for GNU indirect function
Date: Mon, 4 Jan 2021 09:38:34 +0800 [thread overview]
Message-ID: <CABvJ_xh2F+f_cS_sZ10by5_VQYXB3SQ8Mf27UrhmBUnUKUT1Dg@mail.gmail.com> (raw)
In-Reply-To: <1608023800-14560-1-git-send-email-vincent.chen@sifive.com>
On Tue, Dec 15, 2020 at 5:16 PM Vincent Chen <vincent.chen@sifive.com> wrote:
>
> The riscv Binutils supported GNU indirect function in the commit
> 02dd9d25. To make the entire mechanism work, these patches adds the
> required ports to enable Glibc to address the IRELATIVE relocation.
>
> Because the dynamic linker resolves the IRELATIVE relocation before
> jumping into the executable program, the $gp register is not initialized
> when executing the IFUNC resolver function. It may cause some unexpected
> error to occur when the dynamic loader resolves the IREALTIVE relocation
> of the position-dependent executable program. To solve this issue, the
> second patch enables dynamic linker to look for the __global_pointer$
> symbol and use it to initialize $gp before resolving the IREALTIVE
> relocation of the PDE program.
>
>
> Changes since v1:
> 1. Move the riscv entry to the end of libc-abis file
> 2. Add the second input argument to IFUNC resolver to preserve the
> extension flexibility
> 3. Enable ld.so to initilize $gp by __global_pointer$ symbol instead
> of the DT_RISCV_GP dynamic entry to avoid to modify the riscv ELF
> psABI specification.
>
Gentle ping on this series. Thanks and happy new year.
>
> Vincent Chen (2):
> riscv: support GNU indirect function
> riscv: Initialize $gp before resolving the IRELATIVE relocation
>
> libc-abis | 1 +
> sysdeps/riscv/dl-irel.h | 56 ++++++++++++++++++++++++++++++++++++++
> sysdeps/riscv/dl-machine.h | 44 +++++++++++++++++++++++++++++-
> 3 files changed, 100 insertions(+), 1 deletion(-)
> create mode 100644 sysdeps/riscv/dl-irel.h
>
> --
> 2.29.2
>
next prev parent reply other threads:[~2021-01-04 1:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 9:16 Vincent Chen
2020-12-15 9:16 ` [PATCH v2 1/2] riscv: support " Vincent Chen
2020-12-15 9:16 ` [PATCH v2 2/2] riscv: Initialize $gp before resolving the IRELATIVE relocation Vincent Chen
2021-01-04 1:38 ` Vincent Chen [this message]
2021-01-05 1:53 ` [PATCH v2 0/2] riscv: add support for GNU indirect function Jim Wilson
2021-01-05 3:13 ` Nelson Chu
2021-01-05 12:32 ` Carlos O'Donell
2021-01-06 0:53 ` Vincent Chen
2021-01-11 2:29 ` DJ Delorie
2021-01-11 7:34 ` Nelson Chu
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=CABvJ_xh2F+f_cS_sZ10by5_VQYXB3SQ8Mf27UrhmBUnUKUT1Dg@mail.gmail.com \
--to=vincent.chen@sifive.com \
--cc=darius@bluespec.com \
--cc=dj@redhat.com \
--cc=jimw@sifive.com \
--cc=libc-alpha@sourceware.org \
--cc=nelson.chu@sifive.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/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).