Port-arm archive

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

Re: [PATCH] thumb fixes



On Mon, Sep 08, 2008 at 01:36:42PM +0300, Mikko Rapeli wrote:
> NetBSD comes with binutils 2.16.1 and some fixes so switching to
> 2.18.50 solves this thumb issues. The whole tree does not compile with
> ld and others from binutils-2.18.50 but enough to run thumb mode /bin/sh 
> and /bin/cat work with thumb mode /lib/libc.so and others. Though
> /libexec/ld.elf_so still needs to be in ARM mode.

To be complete, here's what the plt section of thumb compiled /bin/cat 
looks like with ld 2.18.50.20080908:

00008890 <.plt>:
    8890:       e52de004        push    {lr}            ; (str lr, [sp, #-4]!)
    8894:       e59fe004        ldr     lr, [pc, #4]    ; 88a0 <_init+0x28>
    8898:       e08fe00e        add     lr, pc, lr
    889c:       e5bef008        ldr     pc, [lr, #8]!
    88a0:       000091fc        .word   0x000091fc
    88a4:       e28fc600        add     ip, pc, #0      ; 0x0
    88a8:       e28cca09        add     ip, ip, #36864  ; 0x9000
    88ac:       e5bcf1fc        ldr     pc, [ip, #508]!
    88b0:       e28fc600        add     ip, pc, #0      ; 0x0
    88b4:       e28cca09        add     ip, ip, #36864  ; 0x9000
    88b8:       e5bcf1f4        ldr     pc, [ip, #500]!
    88bc:       e28fc600        add     ip, pc, #0      ; 0x0
    88c0:       e28cca09        add     ip, ip, #36864  ; 0x9000
    88c4:       e5bcf1ec        ldr     pc, [ip, #492]!
    88c8:       e28fc600        add     ip, pc, #0      ; 0x0
    88cc:       e28cca09        add     ip, ip, #36864  ; 0x9000
    88d0:       e5bcf1e4        ldr     pc, [ip, #484]!
    88d4:       e28fc600        add     ip, pc, #0      ; 0x0
    88d8:       e28cca09        add     ip, ip, #36864  ; 0x9000
    88dc:       e5bcf1dc        ldr     pc, [ip, #476]!
...

-Mikko


Home | Main Index | Thread Index | Old Index