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

Re: [MiNT] Shareable/loadable libraries: a preliminary document



Le Fri, 29 Oct 2004 22:16:26 +0200
Philipp Donzé <philipp.donze@epfl.ch> a écrit:

> What about dependencies? Is it allowed to have a dynamic library to be 
> dependent on other dynamic libraries?
> If yes, I think we need also a well defined library format containing 
> this information.

Yes, an executable or a library reference the libraries it needs to work,
and we may have to solve the case where both reference the same library
(for example libc).

> Dynamic libraries have to be position independent. (i.e. can't have 
> their own "relocation table".)

What prevent them to have a relocation table? The gemdos/mint a.out
formats are not standards, and a new library format would not have to be.
My idea was to have the same custom a.out format for the executables and
the libraries.

> DATA and BSS segment of the library have to be directly after the TEXT 
> segment, and the linker has to align the BSS and DATA segment onto a 
> multiple of the MMU page size. The compiler also needs to know the page 
> size to generate proper access to DATA and BSS segment. (Perhaps GCC 
> does this already?)

Even if an executable has only one translation table, you know the size of
the TEXT segment, so you know if you are relocating an address in the TEXT
or the DATA segment, so you can align the segments on MMU pages
boundaries.

-- 
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux