How to tell linker to use minimum ISA?
Jeffrey Walton
noloader@gmail.com
Wed Oct 16 19:54:00 GMT 2019
Hi Everyone,
I have object files from different ISAs. The higher ISAs are guarded
at runtime though getauxval.
Compile is OK. For example:
a.o # -march=armv7a
b_simd.o # -march=armv7a -mfpu=vfpv3-d16 -mfpu=neon
On Android link is failing when using only -march=armv7a with:
.../arm-linux-androideabi/bin/ld: error: aria_simd.o uses VFP
register arguments, output does not
To fix it I need to add -march=armv7a -mfpu=vfpv3-d16 -mfpu=neon to LDFLAGS.
I'm concerned the linker may want to perform optimizations, especially
now that LTO is becoming more popular. That could cause a lot of
problems, especially if the linker uses the wrong ISA.
How do I tell the linker to use the minimum ISA, and not the ISA I am using?
More information about the Binutils
mailing list