[FFmpeg-devel] [PATCH] Arm assembly for WinCE (Was Re: [PATCH] WinCE does not support _lseeki64)

Måns Rullgård mans
Tue Jul 21 17:37:15 CEST 2009


Martin Storsj? <martin at martin.st> writes:

> On Mon, 13 Jul 2009, M?ns Rullg?rd wrote:
>
>> Martin Storsj? <martin at martin.st> writes:
>> 
>> > - libavcodec/arm/asm.S has a few elf-specific arm attributes 
>> >   (.eabi_attribute, .type). I solved these by just commenting them out 
>> >   (see one of the attached patches), a proper solution would probably be 
>> >   to check for the binary format in configure and enable them 
>> >   conditionally. But I don't have any real clue about arm assembly... I 
>> >   can give more details or test out solution proposals if somebody's 
>> >   interested in fixing it.
>> 
>> These should be easy to fix.  Does ".type foo, STT_FUNCTION" work?  If
>> not, we can simply disable this too.  It's not essential, but useful
>> for debugging.
>
> Here's an attempt at fixing this.
>
> diff --git a/libavcodec/arm/asm.S b/libavcodec/arm/asm.S
> index 087b279..07a38d3 100644
> --- a/libavcodec/arm/asm.S
> +++ b/libavcodec/arm/asm.S
> @@ -21,18 +21,24 @@
>  #include "config.h"
>  
>          .macro require8, val=1
> +#if HAVE_EABI_ATTRIBUTE
>          .eabi_attribute 24, \val
> +#endif
>          .endm
>  
>          .macro preserve8, val=1
> +#if HAVE_EABI_ATTRIBUTE
>          .eabi_attribute 25, \val
> +#endif
>          .endm
>  
>          .macro function name, export=0
>  .if \export
>          .global \name
>  .endif
> +#if HAVE_ARM_ASM_TYPE
>          .type   \name, %function
> +#endif
>          .func   \name
>  \name:
>          .endm

These could all just be under #ifdef __ELF__ instead.  Those
directives are only supported for ELF targets, according to the
manual.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list