Trigger function on shared module init

Discussion in 'C Programming' started by rayuthar@gmail.com, Apr 17, 2008.

  1. Guest

    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
     
    , Apr 17, 2008
    #1
    1. Advertising

  2. In article <>,
    <> 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
     
    Walter Roberson, Apr 17, 2008
    #2
    1. Advertising

  3. On 17 Apr 2008 at 5:23, Walter Roberson wrote:
    > In article <>,
    > <> 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.
     
    Antoninus Twink, Apr 17, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Cheng
    Replies:
    1
    Views:
    8,258
    Juan T. Llibre
    Feb 24, 2006
  2. Replies:
    1
    Views:
    671
    Jules
    Aug 18, 2005
  3. Jess
    Replies:
    4
    Views:
    457
  4. news.aon.at
    Replies:
    11
    Views:
    658
    Ian Collins
    Jan 29, 2011
  5. Roedy Green

    trigger static init

    Roedy Green, Apr 9, 2012, in forum: Java
    Replies:
    16
    Views:
    778
    Andreas Leitgeb
    Apr 22, 2012
Loading...

Share This Page