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

Re: Shared Libs



>> Unless the shared library manages the data sections itself, in which case
>> we'd avoid using up another register.
>
>How shall the shared library do that? You have to keep a separate
>instance of the data section for each process that uses the
>library. So if you are not going to use some swapping trick (like in
>the implementation of fork), you need to use position independent
>code, i.e. use a base register in the code!

You'd need to use a base register in the *library*, yes. However you wouldn't
need to make the calling programs use a register.

Chris