bug-binutils
[Top][All Lists]
Advanced

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

RE: Linker --fix-v4bx problem


From: Tamar Christina
Subject: RE: Linker --fix-v4bx problem
Date: Wed, 12 Feb 2020 09:34:21 +0000

Hi Gary,

It seems to work fine for me. Do you have a reproducer perhaps?

> cat test.s
        .text
        bx      lr
> arm-none-linux-gnueabihf-as -march=armv4t test.s -o test.o
> arm-none-linux-gnueabihf-ld --fix-v4bx test.o -e0 -o test.exe
> arm-none-linux-gnueabihf-objdump -dr test.exe

test.exe:     file format elf32-littlearm


Disassembly of section .text:

00010054 <__bss_end__-0x10004>:
   10054:       e1a0f00e        mov     pc, lr

Thanks,
Tamar

> -----Original Message-----
> From: bug-binutils <bug-binutils-
> bounces+tamar.christina=address@hidden> On Behalf Of Gary Partis
> Sent: Tuesday, February 11, 2020 18:36
> To: address@hidden
> Subject: Linker --fix-v4bx problem
> 
> 
> Hello
> 
> I am using GNU ld version 2.31.1 to target ARMv3 (ARM610/710) processors.
> Primarily, GCC's libgcc contains "BX LR" instructions which we want changed
> to "MOV PC,LR" so to be compatible with older processors, but after running
> the linker with the "--fix-vxb4" directive the BX instructions are still 
> there (we
> use objdump to disassemble the resultant ELF file to check).
> 
> Are we missing something really obvious or is the "--fix-v4bx" directive
> broken in some way?
> 
> Thanks in advance.
> 
> Kind regards
> 
> Gary Partis




reply via email to

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