static initialization

Hi there,

I am currently working on the native port of an embedded OS and trying to get static initialization to work. We have our own startup code to handle things before the main is called. When using gcc I acquire the function pointers to the initializer array and iterate over them. I asked on the llvm IRC channel and got this helpful guide [1] for gcc. Apparently it works in a similar way on clang, but remains silent on the details.

Is there a more detailed documentation I have overlooked or could you give me a hint how to acquire function pointers?

Thanks
Raphael

[1] Calling Global Constructors - OSDev Wiki