HELP: MIPS PC Relative Addressing
Jim Wilson
jimw@sifive.com
Wed Feb 24 21:46:28 GMT 2021
On Wed, Feb 24, 2021 at 9:30 AM Maciej W. Rozycki <macro@orcam.me.uk> wrote:
> On Wed, 24 Feb 2021, Jiaxun Yang wrote:
>
> > For RISC-V, %pcrel_lo shall point to the label of corresponding
> %pcrel_hi,
> > like
> >
> > .LA0:
> > auipc a0, %pcrel_hi(sym)
> > addi a0, a0, %pcrel_lo(.LA0)
>
> I commented on it once, in the course of the FDPIC design project, and I
> find it broken by design. Sadly it has made it into the RISC-V psABI and
> it is hard to revert at this time, too many places have started relying on
> it.
>
It was already a production ABI before you asked for the change. And
changing a production ABI is extremely difficult. You were not the first
to complain about this, and you probably won't be the last.
Jim
More information about the Binutils
mailing list