bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/13320] New: Please support thumb entry points in PLT instead o


From: mh-sourceware at glandium dot org
Subject: [Bug gold/13320] New: Please support thumb entry points in PLT instead of using (more or less randomly located) stubs
Date: Wed, 19 Oct 2011 16:18:33 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13320

             Bug #: 13320
           Summary: Please support thumb entry points in PLT instead of
                    using (more or less randomly located) stubs
           Product: binutils
           Version: 2.23 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden
                CC: address@hidden
    Classification: Unclassified


My original problem is the following:

I've been trying to pack hot startup functions in Firefox Android builds, which
are essentially Thumb. The PLT entries that gold generates are however ARM, and
jumping from the Firefox code to PLT entries requires stubs that do the
interwork.

Unfortunately, these are anonymous (no corresponding symbol in the .text
section), which makes it non-obvious where they come from (I should probably
file a separate bug for that), and more importantly, they are located are
arbitrary places, which clashes with packing hot startup functions.

However, GNU ld doesn't generate such stubs, and in fact has PLT entries that
start as Thumb, and switch to ARM. They are basically 4 bytes longer than the
PLT entries gold generates, but on the other hand, they save 12 bytes from the
corresponding stub. This is what the GNU ld PLT entries look like:

278:    4778          bx    pc
27a:    46c0          nop            ; (mov r8, r8)
27c:    e28fc600     add    ip, pc, #0
280:    e28cca08     add    ip, ip, #32768    ; 0x8000
284:    e5bcf0b4     ldr    pc, [ip, #180]!    ; 0xb4

The ARM part is just the same as the one gold generates.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]