ld mixing -s and --emit-relocs
Paul Edwards
mutazilah@gmail.com
Sat Sep 20 14:35:59 GMT 2025
I would have thought that it was perfectly fine to mix -s
and --emit-relocs when using ld, and the result should
be the same as
strip --strip-unneeded
But it simply says "invalid operation" and I have no idea
what the complaint is.
I worked around the problem for years by using
gcc -s -L,--emit-relocs
and it figured it out for itself.
But tonight I stumbled upon the reason.
Not sure if you consider it a bug or not, but reporting it anyway.
Platform showing the problem is x64, but there was
another platform too (loongarch64), but not arm64
(ie arm64 lets me combine them).
I can provide example binaries if you think it is a bug
and you need them.
And I'm using binutils 2.45
Thanks. Paul.
More information about the Binutils
mailing list