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

Re: Shared libs.



Michael Hohmuth wrote:

> I think every instance of a shared library needs its own base
> register.  This could be either
> 
> (a) the same register as usual (a6?) (Chris)
> or
> (b) another register, e.g. a5.
> 
> Both options would probably require changes to the compiler.

The usual register is a5, a6 is the frame pointer. Neither
gcc nor lattice-c need changes. Pure-c cannot create base
relative code at all.

> 4. Access from shared library to variables in the main program's DATA
>    segment: (Scott raised this question)
> 
> I believe we can just forbid this.  At least, I can't think of any
> useful example right now. :-)

There are none in libc. Besides, it's poor programming style.


Waldi