Trigger function on shared module init

R

rayuthar

Hi,

I need to trigger a function, whenever my shared module (.so) gets
loaded and before its been used by application.

Any suggestions?

Thanks
Rayuthar
 
W

Walter Roberson

I need to trigger a function, whenever my shared module (.so) gets
loaded and before its been used by application.

Please consult a newsgroup appropriate for the operating system
and toolchain that you are using. The C language itself does not
know anything about shared modules or dynamic loading.

[OT]

In SGI IRIX, this would be handled by the 'ld' option -init
 
A

Antoninus Twink

In SGI IRIX, this would be handled by the 'ld' option -init

On GNU at least, you can also just include a function called _init, and
the linker will use that without needing a special option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top