aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-03-05 23:38:00 +0200
committerMartin Storsjö <martin@martin.st>2015-03-08 18:11:36 +0200
commit450b02307cb631f501793b52b98b610c3a54378b (patch)
tree2ffd75eab5396aa5ae2490fb6dcdb483f49e1b11
parentfc3c1156e361202ab97ad63ffb4dacc416906d33 (diff)
downloadffmpeg-450b02307cb631f501793b52b98b610c3a54378b.tar.gz
arm: Suppress tags about used cpu arch and extensions
When all the codepaths using manually set .arch/.fpu code is behind runtime detection, the elf attributes should be suppressed. This allows tools to know that the final built binary doesn't strictly require these extensions. Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit dcae2e32f7d8a1ca5fb8c1e4aa81313be854dd73 and b77e335e441040a40fc6156b8e4a134745d10233) Signed-off-by: Martin Storsjö <martin@martin.st>
-rwxr-xr-xconfigure6
-rw-r--r--libavutil/arm/asm.S6
2 files changed, 12 insertions, 0 deletions
diff --git a/configure b/configure
index ee57ed945b..d3e545f369 100755
--- a/configure
+++ b/configure
@@ -1477,6 +1477,7 @@ SYSTEM_FUNCS="
TOOLCHAIN_FEATURES="
as_dn_directive
as_func
+ as_object_arch
asm_mod_q
attribute_may_alias
attribute_packed
@@ -3870,6 +3871,11 @@ ra .dn d0.i16
.unreq ra
EOF
+ # llvm's integrated assembler supports .object_arch from llvm 3.5
+ [ "$objformat" = elf ] && check_as <<EOF && enable as_object_arch
+.object_arch armv4
+EOF
+
[ $target_os != win32 ] && enabled_all armv6t2 shared !pic && enable_weak_pic
elif enabled mips; then
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index 93d74b65e1..61c8b1b570 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -49,11 +49,17 @@
#elif HAVE_ARMV5TE
.arch armv5te
#endif
+#if HAVE_AS_OBJECT_ARCH
+ELF .object_arch armv4
+#endif
#if HAVE_NEON
.fpu neon
+ELF .eabi_attribute 10, 0 @ suppress Tag_FP_arch
+ELF .eabi_attribute 12, 0 @ suppress Tag_Advanced_SIMD_arch
#elif HAVE_VFP
.fpu vfp
+ELF .eabi_attribute 10, 0 @ suppress Tag_FP_arch
#endif
.syntax unified