Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a2c14b2 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

hardening: eliminate text relocations from mp3

Change-Id: I671ed4c8c7bb15172a8b64d513e2844319495102
parent 74bc3e13
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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



+1 −3
Original line number Diff line number Diff line
@@ -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

@------------------------------------------------------------------------------

+4 −2
Original line number Diff line number Diff line
@@ -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