SYSINIT for userland?

2001-01-25 Thread Alfred Perlstein
Has anyone done any work for FreeBSD or GNU C that allows for SYSINITs in userland, meaning just having to specify a function and arg to be called at a certain time during program startup? I know you can do some evil magic with overloading special shared object symbols, but it is evil magic. :)

RE: SYSINIT for userland?

2001-01-25 Thread John Baldwin
On 25-Jan-01 Alfred Perlstein wrote: Has anyone done any work for FreeBSD or GNU C that allows for SYSINITs in userland, meaning just having to specify a function and arg to be called at a certain time during program startup? I know you can do some evil magic with overloading special

Re: SYSINIT for userland?

2001-01-25 Thread Alfred Perlstein
* John Baldwin [EMAIL PROTECTED] [010125 12:09] wrote: On 25-Jan-01 Alfred Perlstein wrote: Has anyone done any work for FreeBSD or GNU C that allows for SYSINITs in userland, meaning just having to specify a function and arg to be called at a certain time during program startup? I

RE: SYSINIT for userland?

2001-01-25 Thread Alexander N. Kabaev
Will functions marked with __attribute__((__constructor__)) or __attribute__((__destructor__)) satisfy your needs? Compiler will insert calls to these functions gets into .init section of the resulting ELF module which in turn will be called automatically at the program startup time. I do not

Re: SYSINIT for userland?

2001-01-25 Thread Alfred Perlstein
* Alexander N. Kabaev [EMAIL PROTECTED] [010125 12:16] wrote: Will functions marked with __attribute__((__constructor__)) or __attribute__((__destructor__)) satisfy your needs? Compiler will insert calls to these functions gets into .init section of the resulting ELF module which in turn will

Re: SYSINIT for userland?

2001-01-25 Thread Mike Smith
* Alexander N. Kabaev [EMAIL PROTECTED] [010125 12:16] wrote: Will functions marked with __attribute__((__constructor__)) or __attribute__((__destructor__)) satisfy your needs? Compiler will insert calls to these functions gets into .init section of the resulting ELF module which in turn