On 4/15/2012 6:12 AM, Artur Skawina wrote:
Static libraries (*.a) are basically just collections of compiled objects (*.o).

More precisely, a library is (literally) just an associative array. The index is a string representing the name of a symbol. The value is an object file that defines that symbol.

If you look at dmd's library generation code (libelf.c, libomf.c, libmach.c) you can see this in operation.

i.e. a library is nothing more than:

   doto[symbolname] library;

that's it. All of it. Nothing else.

Note that a library doesn't even know what a symbol is. It's just a string. No type information, no storage class, no scopes, no nothing. Just a string of bytes.

Reply via email to