how arm linux to deal with label+offset format!

Shen Hui shenhui@arch.cs.pku.edu.cn
Sun Nov 17 21:22:00 GMT 2002


   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


More information about the Binutils mailing list