bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: GAS branch bug (arm-elf)


From: Nick Clifton
Subject: Re: GAS branch bug (arm-elf)
Date: 17 Mar 2003 09:22:14 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

Hi Németh,

> Using binutils 2.13.2 (target arm-elf) the relative branch addresses will
> be computed wrongly.

> As you can see the lines 5, 6 and 7 there is the same binary
> code. This is wrong, because the branch is relative, and with each
> instruction we will farther and farther from the text_label.

> What is wrong here?

The problem is that you are looking at incomplete instructions.  The
assembler does not fully resolve branch instructions.  Instead it
leaves this to the linker.  If you were to link your test case you
find that the correct offsets will be installed into the branch
instructions.

You can also use the command 'objdump -dr <object_file>' to display a
disassembly of the object file with the relocation instructions.  It
is these relocations which are interpreted by the linker and used to
create the final, working executable.

Cheers
        Nick





reply via email to

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