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

Re: Shared Libs for MiNT



[As I'm a new list member, let me first introduce myself: I'm a German MiNT
 user, and I've joined the list mostly to keep informed about new patches etc.]

> But problems arise if the shared library calls functions (passed as pointers
> to the shared library routine) that are part of the text segment of the
> application that is compiled -mbaserel. (One prominent candidat is the qsort
> function). Then when the comparision function that is passed to qsort is
> called the base pointer would still point to the DATA/BSS segment of the
> library where the application code expects it to point to the app's own
> DATA/BSS segment.

Not only function pointers will present problems.  Global symbols like _errno
must also be shared between executable and library, but *not* between different
executables.
In HP-UX, for example, *all* global symbols are accessed by indirect reference
from a shared library; when an executable first binds to the library, it has
to set up an indirection table to resolve these references.

Bye,

        Jens.
--
Internet: jensk@hpbbn.bbn.hp.com | Phone: (0|+49)7031-14-4785 (TELNET 778-4785)
MausNet:  Jens Kilian @ BB       | Fax :  (0|+49)7031-14-2049
---------------------------------+---------------------------------------------
As the air to a bird, or the sea to a fish, so is contempt to the contemptible.