Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

RE: [lpc2100] More ld script questions..

2004-01-22 by Bogdan Marinescu

> 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 ...


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.