bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/17505] arm: bad static label resolution from different modes


From: chrbr at gcc dot gnu.org
Subject: [Bug ld/17505] arm: bad static label resolution from different modes
Date: Wed, 05 Nov 2014 16:52:48 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #8 from Christian Bruel <chrbr at gcc dot gnu.org> ---
sorry, the first test was only illustrative, but not completed. the fact that
the addresses are the same is just because I reduced the code. 

Here is the complete attachment, here the code is : 

00008240 <foo>:
    8240:    e30b3178     movw    r3, #45432    ; 0xb178
    8244:    e3e0207e     mvn    r2, #126    ; 0x7e
    8248:    e3403001     movt    r3, #1
    824c:    e5933000     ldr    r3, [r3]
    8250:    e5c32000     strb    r2, [r3]
    8254:    e12fff1e     bx    lr

00008258 <bar>:
    8258:    4770          bx    lr
    825a:    bf00          nop

and main calls : 

00008018 <main>:
    8018:    e92d4010     push    {r4, lr}
    801c:    fa000093     blx    8270 <atexit+0x14>
    8020:    eb000086     bl    8240 <foo>
    8024:    e3a00000     mov    r0, #0
    8028:    e8bd8010     pop    {r4, pc}

so

 bl    bar

is in the .o

   4:    eb000004     bl    30 <bar+0x18>
            4: R_ARM_CALL    bar

instead of just     bl    30 <0x18>

looks like a wrong addend to the start of the section.

to reproduce:

arm-none-eabi-gcc -march=armv7-a 2.s -c -o 1.o
arm-none-eabi-objdump -dr 1.o | grep bar

arm-none-eabi-gcc -march=armv7-a 2.s -o 1.u
arm-none-eabi-objdump -dr 1.u

-- 
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]