Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Trigger function on shared module init

Reply
Thread Tools

Trigger function on shared module init

 
 
rayuthar@gmail.com
Guest
Posts: n/a
 
      04-17-2008
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
 
Reply With Quote
 
 
 
 
Walter Roberson
Guest
Posts: n/a
 
      04-17-2008
In article <809e9371-bad4-4e46-9e06->,
<> wrote:

>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
--
"The slogans of an inadequate criticism peddle ideas to fashion"
-- Walter Benjamin
 
Reply With Quote
 
 
 
 
Antoninus Twink
Guest
Posts: n/a
 
      04-17-2008
On 17 Apr 2008 at 5:23, Walter Roberson wrote:
> In article <809e9371-bad4-4e46-9e06->,
> <> wrote:
>
>>I need to trigger a function, whenever my shared module (.so) gets
>>loaded and before its been used by application.

>
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trigger static init Roedy Green Java 16 04-22-2012 04:09 PM
init of class members : mem(0) vs. mem() vs. not-init at all news.aon.at C++ 11 01-29-2011 07:30 PM
questions about object initialization, default-init and value-init Jess C++ 4 05-04-2007 02:47 AM
Sequence Order between Page Init and User Control Init Tony Cheng ASP .Net 1 02-24-2006 01:56 PM
Compiler/Linker Error undefined reference to 'std::ios_base::Init::Init[in-charge]() clusardi2k@aol.com C++ 1 08-18-2005 07:11 PM



Advertisments