This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
how arm linux to deal with label+offset format!
- From: Shen Hui <shenhui at arch dot cs dot pku dot edu dot cn>
- To: "binutils at sources dot redhat dot com" <binutils at sources dot redhat dot com>
- Date: Mon, 18 Nov 2002 13:26:33 +0800
- Subject: how arm linux to deal with label+offset format!
I am using binutils-2.10.1,
if there is a branch instruction whose target address is with format lable+offset, and there also is an pseudo-instruction (for example,adrl)between label and label+offset which need to be expand into more than two instruction , so there may be exists an question.
but how do deal with it.
for examele:
L1:
mov r1,r1
L2:
b L3+4
mov r2,r2
L3: adrl r10,L4
L4: mov r10,r10
... @there may be enougn nop instructions needed to occur an expand in L3
L5: mov r2,r2
as above,
L2: b L3+4,L3+4 is equal to L4,but when instruction L3:adrl r10,L4 is expand into two instruction(may be: add r10, pc, #immed1;add r10, r10, #immed1), L3+4 not equal L4,so the instruction L2: b L3+4 may branch to an error address.
how to deal with it?
3x
Shen Hui
shenhui@arch.cs.pku.edu.cn
2002-11-18