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

RE>C++ linked with other la

Reply to:   RE>C++ linked with other langu

>The initialization of static globals is accomplished in C++ by a post
>ld pass that scans the name table of the linked file and generates 
>a initialization routine that it links in.  The problem is that
>users of another language, C for instance, won't have this final phase
>lying around in a convenient way. 

Apple has solved this problem for the Mac by having the linker build a table of
all of the static initializers and destructors, and having a special function
linked in (from the c++ library) that calls all of them at the right time.

Now... if they could only get the linker to work...