diff options
author | Martin Storsjö <martin@martin.st> | 2015-03-05 23:38:00 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-03-08 18:12:02 +0200 |
commit | 7fd11fbeeb41990427b475dc0d8800d2cf15a8c4 (patch) | |
tree | 11942d9f9240dd30696a7f52675913fca8b8af0a | |
parent | 470fd8e64e292d2336b2b860437dcbc053ba9eec (diff) | |
download | ffmpeg-7fd11fbeeb41990427b475dc0d8800d2cf15a8c4.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-x | configure | 6 | ||||
-rw-r--r-- | libavutil/arm/asm.S | 6 |
2 files changed, 12 insertions, 0 deletions
@@ -1321,6 +1321,7 @@ HAVE_LIST=" alsa_asoundlib_h altivec_h arpa_inet_h + as_object_arch asm_mod_q asm_mod_y atomic_cas_ptr @@ -3650,6 +3651,11 @@ EOF check_inline_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)' check_inline_asm asm_mod_y '"vmul.i32 d0, d0, %y0" :: "x"(0)' + # 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 5884e172f3..a2c1c1dd21 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 |