Relocation truncated to fit: R_ARM_PC24
Jens-Christian Lache
lache@tu-harburg.de
Wed Dec 13 09:10:00 GMT 2000
Am Mit, 13 Dez 2000 schrieben Sie:
> Did you try using the "-relax" flag in the linkline?
That does not help:
make testProg
arm-elf-gcc -I/home/hiwi/lache/c/Include -DAT91M40400 -DDEBUG \
-o testProg -Wl,-Tlinker.script.internal.sc,-N,-relax testProg.c testFunc2.S
/tmp/ccTyUxcc.o: In function `main':
/tmp/ccTyUxcc.o(.text+0x34): relocation truncated to fit: R_ARM_PC24 nop100
collect2: ld returned 1 exit status
make: *** [testProg] Error 1
jc
>
> -----Original Message-----
> From: Jens-Christian Lache [ mailto:lache@tu-harburg.de ]
> Sent: Wednesday, December 13, 2000 8:26 AM
> To: crossgcc@sources.redhat.com
> Subject: Relocation truncated to fit: R_ARM_PC24
>
>
> Hi!
>
> Did s.b. ever had some functions in the internal RAM and some in
> external? If so, could you mail me the linker script? I have tried
> for too much days now, but I donôt make. I can have the lma/vma at 0x40 and
> set a function pointer to this address. Quite ugly! But thats o.k. for one
> function. Now I need three of them in the internal mem..
>
> I just donôt get the gcc or ld to make the vma/lma 0x40 AND to
> call this code explicitly. For example:
> This is working:
>
> void nop100(void);
> int main(void) {
> void (*fct) (void);
> fct = 0x40;
> fct ();
> return 0;
> }
>
> where nop100(void) is located at 0x40:
> Idx Name Size VMA LMA File off Algn
> 0 .testsection 00000028 00000040 00000040 00000074 2**2
> CONTENTS, ALLOC, LOAD, READONLY, CODE
>
> BUT:
> void nop100(void);
> int main(void) {
> nop100();
> return 0;
> }
> gives me the error:
>
> testProg.c: In function `main':
> testProg.c:6: warning: assignment makes pointer from integer without a cast
> /tmp/ccOCL4sJ.o: In function `main':
> /tmp/ccOCL4sJ.o(.text+0x34): relocation truncated to fit: R_ARM_PC24 nop100
> collect2: ld returned 1 exit status
>
> Note that the address differnce between the functions is about 33e6. Is this
> a
> linker or compiler problem? I think the problem is, that the compiler
> generates
> relativ jumps.
>
> Jens-Christian Lache
> Technische Universitaet Hamburg-Harburg
> www.tu-harburg.de/~sejl1601
> Mail:
> lache@tu-harburg.de
> lache@ngi.de
> Tel.:
> +0491759610756
>
> ------
> Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sourceware.cygnus.com
--
Jens-Christian Lache
Technische Universitaet Hamburg-Harburg
www.tu-harburg.de/~sejl1601
Mail:
lache@tu-harburg.de
lache@ngi.de
Tel.:
+0491759610756
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list