Rockbox mail archive
Subject: Re: Version 2.3
From: Greg Haerr (greg_at_censoft.com)
> All plugins will be compiled and linked for a hard coded position in ram.
> Even simpler, I want no relocation at all. At least in the first versions.
> My current plan is to have a single inbound call, which passes the
function pointer struct and then is used by the plugin as the execution
thread. When that call exits, the plugin is unloaded and control returns to
the core Rockbox GUI.
So basically the module will be compiled with -fPIC,
loaded for a set memory address, with a known file offset
to the binary function pointer struct. When the module
is desired to be loaded, it's read from disk into a specific
memory address, then the function struct (likely at offset
0 at the loaded address) function pointers are filled in by
rockbox, then a call is made to the module entry point.
The module will callback functions only through the
On return, the module is unloaded (marked as "free").
Can gcc-sh3 produce completely relocateable code using
just the -fPIC option?
Page was last modified "Jan 10 2012" The Rockbox Crew