[gccsdk] Shared library code and modules

Theo Markettos theo at markettos.org.uk
Tue Mar 8 08:41:55 PST 2016


On Tue, Mar 08, 2016 at 03:56:39PM +0000, Lee Noar wrote:
> The shared library system relies on each client having a few words of
> workspace located at &8034 (after the ELF header). This means that the
> location of the workspace is constant, but the contents can be
> different for each client.
> 
> Unfortunately, this does rule out its use in modules.

How feasible would it be to add another initialisation/entry method that made use
of a different shared data location?

The other problem is that the pre-existing SecureSockets SWI interface means
an entry point would be in supervisor mode, so some mode switching would be
required.  What I was trying to explore was how tricky that would be,
assuming a synchronous SWI interface is required (ie can't just schedule a
callback and call the user mode library later).  Can a SWI call out to user
mode, do some work and return to the caller via SVC mode, without getting
the SWI context confused?  Or can a SWI call drop into user mode code and
fix up the stack and return address so it returns direct to the caller
without going back up to SVC mode?

Can you point me in the direction of the documentation of the shared library
system?  I think we probably ought to have a wiki page with at the very
least pointers to what can be found where - I'm happy to write such a thing
if you point in the right direction.

Theo




More information about the gcc mailing list