This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |