summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@gmail.com>2012-08-13 22:47:33 +0200
committerArd Biesheuvel <ard.biesheuvel@gmail.com>2012-08-13 22:55:03 +0200
commit9a2c14b2c96625d5be73e1a7627f5d2a3091c4a2 (patch)
treedbf2a346379e8b728b7d4a27e34cdf976d03632f /media
parent74bc3e133bd59a65dbed70b5fc89549f04a545e2 (diff)
downloadframeworks_av-9a2c14b2c96625d5be73e1a7627f5d2a3091c4a2.zip
frameworks_av-9a2c14b2c96625d5be73e1a7627f5d2a3091c4a2.tar.gz
frameworks_av-9a2c14b2c96625d5be73e1a7627f5d2a3091c4a2.tar.bz2
hardening: eliminate text relocations from mp3
Change-Id: I671ed4c8c7bb15172a8b64d513e2844319495102
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/codecs/mp3dec/src/asm/pvmp3_dct_16_gcc.s6
-rw-r--r--media/libstagefright/codecs/mp3dec/src/asm/pvmp3_mdct_18_gcc.s4
-rw-r--r--media/libstagefright/codecs/mp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s6
3 files changed, 9 insertions, 7 deletions
diff --git a/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_dct_16_gcc.s b/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_dct_16_gcc.s
index f83732b..e61c8d3 100644
--- a/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_dct_16_gcc.s
+++ b/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_dct_16_gcc.s
@@ -369,7 +369,9 @@ pvmp3_merge_in_place_N32:
pvmp3_split:
stmfd sp!,{r4,r5,lr}
- ldr r2,constant16
+ adr r1,constant16
+ ldr r2,[r1]
+ add r2,r1
sub r1,r0,#4
mov r3,#3
loop1:
@@ -449,7 +451,7 @@ constant14:
constant15:
.word 0x5a827980
constant16:
- .word CosTable_dct32 + 60
+ .word (CosTable_dct32 + 60)-constant16
diff --git a/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_mdct_18_gcc.s b/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_mdct_18_gcc.s
index 96230c5..575acd6 100644
--- a/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_mdct_18_gcc.s
+++ b/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_mdct_18_gcc.s
@@ -43,7 +43,7 @@
pvmp3_mdct_18:
stmfd sp!,{r4-r11,lr}
mov r7,r2
- ldr r2,table
+ adr r2,constdata$1
mov r6,r1
add r3,r2,#0x24
add r12,r3,#0x44
@@ -321,8 +321,6 @@ Loop_2:
smull r2,r1,r0,r1
str r1,[r6,#0x3c]
ldmfd sp!,{r4-r11,pc}
-table:
- .word constdata$1
@------------------------------------------------------------------------------
diff --git a/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s b/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s
index 4f45737..b74c849 100644
--- a/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s
+++ b/media/libstagefright/codecs/mp3dec/src/asm/pvmp3_polyphase_filter_window_gcc.s
@@ -46,8 +46,10 @@ pvmp3_polyphase_filter_window:
stmfd sp!,{r0-r2,r4-r11,lr}
sub sp,sp,#4
+ adr r2,PolyPh_filter_coeff
+ ldr r1,[r2]
+ add r1,r2
ldr r2,[sp,#0xc]
- ldr r1,PolyPh_filter_coeff
sub r2,r2,#1
mov r10,#1
@@ -224,7 +226,7 @@ PolyPh_filter_loop2:
ldmfd sp!,{r4-r11,pc}
PolyPh_filter_coeff:
- .word pqmfSynthWin
+ .word pqmfSynthWin-PolyPh_filter_coeff
LOW_16BITS:
.word 0x00007fff