bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/10073] R_ARM_THM_PC8 Relocation Not Implemented in elf32-arm.c


From: JayS at spectralogic dot com
Subject: [Bug ld/10073] R_ARM_THM_PC8 Relocation Not Implemented in elf32-arm.c
Date: 4 May 2009 03:50:17 -0000

------- Additional Comments From JayS at spectralogic dot com  2009-05-04 03:50 
-------
Subject: RE:  R_ARM_THM_PC8 Relocation Not Implemented in elf32-arm.c

Owen, Nick, et. al.,

I've been working towards the same objective and stumbled across your post.

I tried Nick's fix of 4/21 and had similar results.

I believe that there is an additional problem.

If you go to the HOWTO() macro for R_ARM_THM_PC8 (elf32-arm.c, line 235), it 
shows a shift count of one.  ARM's documentation shows that the R_ARM_THM_PC8 
relocation is only used for an LDR(3) instruction, which uses a shift count of 
two:

Syntax

LDR <Rd>, [PC, #<immed_8> * 4]

where:

<Rd> Is the destination register for the word loaded from memory.

PC Is the program counter. Its value is used to calculate the memory address. 
Bit 1 of the PC
value is forced to zero for the purpose of this calculation, so the address is 
always
word-aligned.

<immed_8> Is an 8-bit value that is multiplied by 4 and added to the value of 
the PC to form the memory
address.

I haven't had a chance to rebuild and test it with a shift count of two.  I 
don't subscribe to the mailing list, but if you are interested in how it comes 
out, email me at jays at spectralogic dot com and I will let you know.  I'd ask 
that you do the same if you find anything out.

Thanks for the suggestions so far, and good luck.

Jay





-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10073

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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