This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
How to tell linker to use minimum ISA?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Wed, 16 Oct 2019 15:53:46 -0400
- Subject: How to tell linker to use minimum ISA?
- Reply-to: noloader at gmail dot com
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?