|
From: | Moritz Struebe |
Subject: | [avr-libc-dev] Position Independent Code / Data (PIC /PID) |
Date: | Mon, 19 May 2008 15:21:30 +0200 |
User-agent: | Thunderbird 2.0.0.14 (Windows/20080421) |
Hi there,I developed module support for Nut/OS running on a ATmega128. At the moment I allocate memory and then link against this information. Using PIC would save me this trouble.
I did some research on PIC/PID & AVR, but mostly found guesswork and/or even false information. (Or people complaining that someone posted in an AVR and not in the Microchip-Forum. ;-) ) Dunkels et al. say that PIC is limited to 4K [1]. I'm not sure why this is the case. Looking at the documentation I come up with +-2^16 words = 64K.
I'm also not sure how to interpret the |-mshort-calls option. Does this mean I get only rjmps and the linker will complain if the jumps get too long, or will the Linker silently fail.|
Further on I curious whether it would be (theoretically) possible to let the linker decide whether to use jmp or rjmp or even do double rjmps to cover the full range. I know, the latter is a bit strange, but would enable code > 64K to be position independent.
I was wondering whether PID is supported because it came up in one or two threads. But I assume not.
Thanks for your advice. Cheers Morty [1] http://www.sics.se/~adam/dunkels06runtime.pdf
[Prev in Thread] | Current Thread | [Next in Thread] |