ARM: 4-byte align start of all asm functions
authorMans Rullgard <mans@mansr.com>
Fri, 13 Jan 2012 18:56:36 +0000 (18:56 +0000)
committerMans Rullgard <mans@mansr.com>
Fri, 13 Jan 2012 19:09:59 +0000 (19:09 +0000)
Due to apprent bugs in the GNU assembler and/or linker, relocations
can be incorrectly processed if the alignment of a Thumb instruction
is changed in the output file compared to the input object.

This fixes crashes in h264 decoding with Thumb enabled. No effect in
ARM mode since everything is 4-byte aligned there.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/arm/asm.S

index aaf497e..3b495a2 100644 (file)
@@ -68,6 +68,7 @@ ELF     .size   \name, . - \name
         .purgem endfunc
     .endm
         .text
         .purgem endfunc
     .endm
         .text
+        .align          2
     .if \export
         .global EXTERN_ASM\name
 EXTERN_ASM\name:
     .if \export
         .global EXTERN_ASM\name
 EXTERN_ASM\name: