tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: security/polkit not working with evbarm-current

On Jun 29, 2016, at 2:51 AM, Edgar Fuß wrote:

> This is strange (or so I think).
>> -	ldr r7, =.Lpoly1305_init_constants_neon
>> +	adr r7, .Lpoly1305_init_constants_neon
> My ARM knowledge is a bit dated (from Acorn 310 and ARM 2 times), but I 
> guess still nowadays neither of the two instructions is a real assembler 
> instruction. Both should assemble to something like
> 	ADD R7, R15, <offset of .Lpoly1305_init_constants_neon to PC+8>
> (assuming the offset is in a suitable range).
> So could you find out what instructions the assembler generates for the 
> two variants? I'm afraid it may be the assembler's fault that one variant 
> doesn't work.
> Or am I completely wrong with today's ARMs?

Here's the example I tried. Apparently this assembler doesn't optimize away the literal.

mipi$ cat tryme.S 
.syntax unified
.fpu neon


.p2align 2
.long 0x3ffff03
.long 0x3ffc0ff
.long 0x3f03fff
.long 0x00fffff

        .align  2
        .global oink
        ldr     r0, =.Lmyconstants
        bx      lr

        .align 2
        .global quack
        adr     r0, .Lmyconstants
        bx      lr
mipi$ objdump -d tryme.o

tryme.o:     file format elf32-littlearm

Disassembly of section .text:

00000000 <oink-0x10>:
   0:   03ffff03        .word   0x03ffff03
   4:   03ffc0ff        .word   0x03ffc0ff
   8:   03f03fff        .word   0x03f03fff
   c:   000fffff        .word   0x000fffff

00000010 <oink>:
  10:   e59f0008        ldr     r0, [pc, #8]    ; 20 <quack+0x8>
  14:   e12fff1e        bx      lr

00000018 <quack>:
  18:   e24f0020        sub     r0, pc, #32
  1c:   e12fff1e        bx      lr
  20:   00000000        .word   0x00000000

Home | Main Index | Thread Index | Old Index