> My > >linker script would probably look like this > instead: > > > > .ramtext : AT( ADDR( flash ) + SIZEOF( prog ) > ) > > { > > /* the rest goes here */ > > } > ram > > His original syntax is more or less straight out of > the ld manual. I'm sorry, I must have missed that part of the manual. Actually I'm still unable to find it. > ld should handle that transparently. All the > records that are in FLASH > will already be located to run from ram. Now if you > try to use them > directly from flash w/o copying them I would expect > problems. You bet :) > I don't see why position independent code would be > needed (it is always > ending up in the same place and that place is > defined at link time). Of course, you are right; I didn't realize that the code always ends up in the same place. You only need PIC if the load address is not known at link time. I seem to have a strange urge to see things more complicated than they are tonight, so I'd better go to sleep ... __________________________________ |
|
More ld script questions..
Started by ●January 22, 2004
Reply by ●January 22, 20042004-01-22
Reply by ●January 22, 20042004-01-22
--- In , Bogdan Marinescu <a_bogdan_marinescu@y...> wrote: > I'm sorry, I must have missed that part of the > manual. Actually I'm still unable to find it. That I can offer some help with. Search for (google +gnu +ld +pdf). That gets you several links including http://www.soundart-hot.com/files/pdf/gnu/ld.pdf Also the cygwin distribution comes with the appropriate man page (as presumably do most linux distributions). I don't much care for man when I'm starting to learn something but it is a start and will work if you can print it out. Robert " 'Freedom' has no meaning of itself. There are always restrictions, be they legal, genetic, or physical. If you don't believe me, try to chew a radio signal. " Kelvin Throop, III |