gm2
[Top][All Lists]
Advanced

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

[Gm2] Linking, initialization, ..


From: Dragiša Durić
Subject: [Gm2] Linking, initialization, ..
Date: Thu, 12 Jan 2012 23:22:17 +0100

Trying to figure some gm2 operation details out… Need help :)

Code structure is most ordinary, I have directories where each directory 
(library root) and sometimes it's subdirectories contain source files of 
corresponding library. Compile process will compile all Modula-2 and C objects 
to object files in library roots.

case 1: 

I make a shared library from my code. My issue with this are initializations 
(shared library constructor). If I understood this correctly, *all* my modules 
in (library root) will be topologically sorted and initialized in that order on 
library load? (Also finalized in reverse order on library unload?) Are all 
library modules initialized/finalized or just ones I import from my (client) 
program?

case 2:

I compile my sources and leave object files in (library root). What would be 
command syntax, equivalent of web site example for shared libs for such a case? 
I am not too intimate with GCC development other than gm2 so please help me 
here even if this is obvious for GCC environment.

case 3:

Same as case 2, except for object files being archived in .a files.

Most important for me, for all three cases is not to initialize modules I do 
not use, modules that just happen to be in said library.

TIA,
dd






reply via email to

[Prev in Thread] Current Thread [Next in Thread]