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

Re: [MiNT] Shared Libs



Hi Patrice!

When I was thinking about it it seemed to me like that the .a archives (static libraries comprised of .o files) can serve as dynamicaly loadable library (for the case you don't need to share the code actually, of course, otherwise you would need -fPIC and other stuff to be fine, perhaps). It already contains (IMO) all information we need (symbol tables, relocation tables, ...).

So why not to just modify the .PRG binary so that it can contain the library list to load 'and we are done' (although it might be quite piece of investigation for binutils newbie) for now... Later, when we have VM (if ever), we can also implement true .so libs if required. Perhaps a symlinks .so -> .a libs would be just enought to distinguis whether the ld can link dynamicaly or not for now.

Opinions? Corrections?

regards

STanda


Patrice Mandin wrote:
Le Sun, 22 Aug 2004 17:16:47 -0400
Mark Duckworth <mduckworth@atari-source.com> a écrit:


This is something we seriously need.  We recently talked about it, but
it seemed to die.  You don't want me to work on this because I don't
know what I'm doing ;-)  Is anyone else working on it?  I'd be willing
to help in ANY WAY I can.


Well, at the moment, I want to write a document about how loadable
libraries could be done in MiNT (and maybe TOS if possible). The
"shareable" stuff needs MMU, so MiNT is mandatory.

1. Definition of the executable format that needs loadable libraries (i.e.
references to functions outside of the program file being run).

2. Definition of the format of those loadable libraries (maybe same as 1).

3. Definition of the work that has to be done by the "loader" which is run
by the program to load its needed libraries (i.e. a custom crt0.o).