[PATCH] MIPS: gas: alter 64 or 32 for r6 triples if march is implicit

YunQiang Su syq@debian.org
Mon May 8 09:16:50 GMT 2023


Maciej W. Rozycki <macro@orcam.me.uk> 于2023年5月8日周一 03:01写道:
>
> On Sun, 7 May 2023, Jiaxun Yang wrote:
>
> > > YunQiang, do you actually have a use case for invoking GAS directly?  I
> > > only do it when debugging GAS, which is sort of irrelevant.  For normal
> > > compilations I never do it.
> >
> > The issue was raised by Glib[1], they are involving `ld` directly.
>
>  That's a bug in Glib then, LD is not supposed to be invoked directly with
> user compilations.  For one correct multilib options won't be applied and
> if Glib strives to extract them from GCC invocation somehow, then good
> luck!
>

As my experience of working on Linux distributions, lots of softwares invoke
gas/ld directly.

For Glib's aspect, it expects the system's toolchain so the right thing,
So it is not a bug.

>  The issue claims they want to call `ld -r' to get a relocatable link.
> Why don't they just call `gcc -r' to the same effect in a supported way?
>

In fact it doesn't work:

syq@vm-1:~$ mipsisa32r6el-linux-gnu-gcc -r xx.dat -o xx.o && file xx.o
xx.o: ELF 32-bit LSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped

>   Maciej


More information about the Binutils mailing list