[FFmpeg-cvslog] arm: Suppress tags about used cpu arch and extensions

Martin Storsjö git at videolan.org
Tue Mar 10 13:57:36 CET 2015


ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Thu Mar  5 23:38:00 2015 +0200| [9841654c158c80e9d525ba03754135d3f34e306e] | committer: Martin Storsjö

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 at martin.st>
(cherry picked from commit dcae2e32f7d8a1ca5fb8c1e4aa81313be854dd73
and b77e335e441040a40fc6156b8e4a134745d10233)
Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9841654c158c80e9d525ba03754135d3f34e306e
---

 configure           |    6 ++++++
 libavutil/arm/asm.S |    6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/configure b/configure
index 466ce54..042692f 100755
--- a/configure
+++ b/configure
@@ -1204,6 +1204,7 @@ HAVE_LIST="
     alsa_asoundlib_h
     altivec_h
     arpa_inet_h
+    as_object_arch
     asm_mod_q
     asm_mod_y
     attribute_may_alias
@@ -3223,6 +3224,11 @@ EOF
 
     enabled_all armv6t2 shared !pic && enable_pic
 
+    # llvm's integrated assembler supports .object_arch from llvm 3.5
+    [ "$objformat" = elf ] && check_as <<EOF && enable as_object_arch
+.object_arch armv4
+EOF
+
 elif enabled mips; then
 
     check_inline_asm loongson '"dmult.g $1, $2, $3"'
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index f088857..e68c8b6 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -43,11 +43,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



More information about the ffmpeg-cvslog mailing list