On 2018-10-12 14:43:56 +0300, Martin Storsjö wrote:
> Prior to Xcode 9.3, the clang built-in assembler didn't support
> altmacro, and gas-preprocessor was used for assembling for arm/darwin.
> 
> For thumb functions, gas-preprocessor took care of adding the .thumb_func
> directives, but when now being able to assemble without gas-preprocessor,
> we need to add these directives ourselves.
> ---
>  libavutil/arm/asm.S | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
> index e7eea0271f..5207a1a2b8 100644
> --- a/libavutil/arm/asm.S
> +++ b/libavutil/arm/asm.S
> @@ -75,6 +75,12 @@ T       .thumb
>  ELF     .eabi_attribute 25, 1           @ Tag_ABI_align_preserved
>  ELF     .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable
>  
> +.macro func_mode name
> +#if CONFIG_THUMB && defined(__APPLE__)
> +        .thumb_func \name
> +#endif
> +.endm
> +
>  .macro  function name, export=0, align=2
>          .set            .Lpic_idx, 0
>          .set            .Lpic_gp, 0
> @@ -98,10 +104,12 @@ FUNC    .endfunc
>          .global EXTERN_ASM\name
>  ELF     .type   EXTERN_ASM\name, %function
>  FUNC    .func   EXTERN_ASM\name
> +        func_mode EXTERN_ASM\name
>  EXTERN_ASM\name:
>      .else
>  ELF     .type   \name, %function
>  FUNC    .func   \name
> +        func_mode \name
>  \name:
>      .endif
>  .endm
> -- 

patch ok either in this form or as discussed on irc

Janne
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to