individual

Hello,

I'm implementing a compiler for ( yet another ) C like language. I am
writing llvm assembly from the compiler.

I would like to put a function into each .s file that somehow gets called
before main(). Perhaps named "init" or something like that, no arguments,
no return value.

Can anyone point me to any documentation or ideas about how I might begin
to go about this?

Thanks.

Charlie

http://llvm.org/docs/LangRef.html#intg_global_ctors

-Eli