[LLVMdev] individual

Eli Friedman eli.friedman at gmail.com
Wed Feb 29 20:01:28 PST 2012


On Wed, Feb 29, 2012 at 1:21 PM, Charlie Burns <crb at sonic.net> wrote:
>
> 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?

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

-Eli



More information about the llvm-dev mailing list