[MIPS] Can we have R_MIPS_PC64?

Andrew Pinski pinskia@gmail.com
Wed Feb 5 09:16:00 GMT 2020


On Wed, Feb 5, 2020 at 1:10 AM Andrew Pinski <pinskia@gmail.com> wrote:
>
> On Wed, Feb 5, 2020 at 1:04 AM Andrew Pinski <pinskia@gmail.com> wrote:
> >
> > On Wed, Feb 5, 2020 at 12:59 AM Andrew Pinski <pinskia@gmail.com> wrote:
> > >
> > > On Tue, Feb 4, 2020 at 11:20 PM Fangrui Song <i@maskray.me> wrote:
> > > >
> > > > R_MIPS_PC32 exists as a GNU extension.
> > > > R_MIPS_PC64 existed, but was removed by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4030e8f62467c29b782aa2480e1e452b8e458699
> > > > (like all the old commits, the description just recorded what the commit *did*. There was no *why*.)
> > >
> > > But the why is recorded still in the mail archives:
> > > https://sourceware.org/ml/binutils/2004-04/msg00657.html
> >
> > See the GCC side of the reason:
> > https://gcc.gnu.org/ml/gcc-patches/2004-04/msg01093.html
>
> Note the reason why R_MIPS_PC32 was added back is described here:
> https://sourceware.org/ml/binutils/2004-06/msg00213.html
>
> So it is a GNU extension as GCC accidentally emitted them so it needed
> to be added back.


>  * DW_EH_PE_pcrel|DW_EH_PE_sdata8 => ?
Never used on MIPS, see
https://gcc.gnu.org/ml/gcc-patches/2004-06/msg00970.html
Plus:
https://www.sourceware.org/ml/binutils/2004-05/msg00227.html

>
>
> Thanks,
> Andrew
>
> >
> >
> > Thanks,
> > Andrew Pinski
> >
> > >
> > > Thanks,
> > > Andrew Pinski
> > >
> > >
> > > >
> > > > This just makes certain things unnecessarily complex.
> > > >
> > > > * DW_EH_PE_pcrel|DW_EH_PE_sdata8 => ?
> > > > * __patchable_function_entries has to have the SHF_WRITE flag on MIPS https://gcc.gnu.org/ml/gcc/2020-01/msg00106.html
> > > >    .quad foo - . => Error: PC-relative reference to a different section



More information about the Binutils mailing list