strip with mismatched machines

H.J. Lu hjl.tools@gmail.com
Sat Sep 20 20:45:19 GMT 2025


On Sat, Sep 20, 2025 at 4:23 PM Paul Edwards <mutazilah@gmail.com> wrote:
>
> I used gcc on an x64 system to create a loongarch64 target.
>
> So they are still x64 executables, they just do something unusual.
>
> But that didn't occur to me at the time, and I attempted to use
> the loongarch64 strip on the new x64 executables.
>
> I have qemu installed, so it seamlessly ran.
>
> However, the new executables (xgcc renamed to gcc etc)
> were deemed corrupt and wouldn't run.
>
> At the time I just thought "my bad" and moved on, but it
> occurred to me that maybe strip should check that it is
> being run on the right ELF type.
>
> I can provide samples if required, but there is no point if
> it is simply deemed "user error" and "bad luck", which is
> fine. I just thought I'd report it in case it was considered
> to be a bug.
>
> Thanks. Paul.

Did you run into:

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

-- 
H.J.


More information about the Binutils mailing list