Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Position Independent Code and Data
PostPosted: Mon Oct 04, 2010 2:42 pm 
Offline

Joined: Thu Sep 09, 2010 1:18 pm
Posts: 3
Hello,

I have a question regarding the -fPIC option of GCC. I would like to compile a piece of code and place it somewhere inside the SAM7 flash, where the code should run no matter on which internal flash address it is placed.

My understanding is that the -fPIC option generates code, which is position independent. This can therefore be place on any location inside the SAM7 flash. But how is the .data section treated? Is this also position independent, meaning can I also place this in any section of the SAM7 RAM?

If this is the case, I surely have to tell the "code" on which offset inside the RAM the .data section starts. How do I do this?

Thanks,
Bas


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: