[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] XIP / PIC



Carr, Vincent wrote:

> Hi all, 
> 
> I've asked the below question as part of a longer email a few weeks
> back.  Can anyone answer it this time round?
> 
> 
>>For applications to run directly from flash (XIP) the compiler must 
>>be capable of generating Position Independent Code(PIC) and capable of
> 
> 
>>generating the PIC form of flat executable.
>>
>>Does the current version of mb-gcc support PIC?

Short answer - sort of, but not really.  There is an option to enable 
some short pointer optimisatiosn that will user r2 and r13 as relative 
offsets for some small data items.  There is also an option to the 
linker to specifiy what the threshold of "small" means.  So, in theory 
you could maybe specifiy a hughe threshold to the compiler (linker 
maybe) for what it considers a small object, and maybe end up with 
everything accessed by these relative pointer offsets.  However, last 
time I tried working with this the compiler support didn't work - that 
was several releases ago, haven't looked since.

The microblaze reference manual or embedded systems tools guide might 
have somethign to say on the matter.

cheers,

john


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/