From e3f850ee055a9238d17d6c503af27e287e6db28d Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 17 Jun 2011 02:33:52 +0200 Subject: Avoid text relocations in ARM vp8 decoder The current code stores pointers to coefficient tables and loads them to access the tables contents. As these pointers are stored in the code sections, it means we end up with text relocations. eu-findtextrel will thus complain about code not compiled with -fpic/-fPIC. Since the pointers are stored in the code sections, we can actually cheat and let the assembler generate relative addressing when accessing the coefficient tables, and just load their location with adr. Change-Id: Ib74ae2d3f2bab80b29991355f2dbe6955f38f6ae --- vp8/common/arm/neon/sixtappredict8x4_neon.asm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'vp8/common/arm/neon/sixtappredict8x4_neon.asm') diff --git a/vp8/common/arm/neon/sixtappredict8x4_neon.asm b/vp8/common/arm/neon/sixtappredict8x4_neon.asm index 0904f52ca..a57ec015f 100644 --- a/vp8/common/arm/neon/sixtappredict8x4_neon.asm +++ b/vp8/common/arm/neon/sixtappredict8x4_neon.asm @@ -15,6 +15,17 @@ PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2 + +filter8_coeff + DCD 0, 0, 128, 0, 0, 0, 0, 0 + DCD 0, -6, 123, 12, -1, 0, 0, 0 + DCD 2, -11, 108, 36, -8, 1, 0, 0 + DCD 0, -9, 93, 50, -6, 0, 0, 0 + DCD 3, -16, 77, 77, -16, 3, 0, 0 + DCD 0, -6, 50, 93, -9, 0, 0, 0 + DCD 1, -8, 36, 108, -11, 2, 0, 0 + DCD 0, -1, 12, 123, -6, 0, 0, 0 + ; r0 unsigned char *src_ptr, ; r1 int src_pixels_per_line, ; r2 int xoffset, @@ -25,7 +36,7 @@ |vp8_sixtap_predict8x4_neon| PROC push {r4-r5, lr} - ldr r12, _filter8_coeff_ + adr r12, filter8_coeff ldr r4, [sp, #12] ;load parameters from stack ldr r5, [sp, #16] ;load parameters from stack @@ -459,16 +470,4 @@ secondpass_filter8x4_only ;----------------- -_filter8_coeff_ - DCD filter8_coeff -filter8_coeff - DCD 0, 0, 128, 0, 0, 0, 0, 0 - DCD 0, -6, 123, 12, -1, 0, 0, 0 - DCD 2, -11, 108, 36, -8, 1, 0, 0 - DCD 0, -9, 93, 50, -6, 0, 0, 0 - DCD 3, -16, 77, 77, -16, 3, 0, 0 - DCD 0, -6, 50, 93, -9, 0, 0, 0 - DCD 1, -8, 36, 108, -11, 2, 0, 0 - DCD 0, -1, 12, 123, -6, 0, 0, 0 - END -- cgit v1.2.3