From: Steve Graegert <graegerts@gmail.com>
To: r_zaca <r_zaca@ig.com.br>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Dylibs
Date: Mon, 15 Aug 2005 14:05:55 +0200 [thread overview]
Message-ID: <6a00c8d505081505057c579fbf@mail.gmail.com> (raw)
In-Reply-To: <20050815_111719_052668.r_zaca@ig.com.br>
On 8/15/05, r_zaca <r_zaca@ig.com.br> wrote:
> Hello,
[snipped some code]
The use of _init() and _fini() is strongly discouraged. Both are
obsolete and their use can lead to some strange behaviour. Some even
consider them as dangerous.
Instead, you should rely on function attribute constructors and destructors:
void __attribute__ ((constructor)) my_init(void);
void __attribute__ ((destructor)) my_fini(void);
Please note: when compiling shared libs with gcc, you _must_ omit the
arguments -nostartfiles or -nostdlib, otherwise the declared routines
will not be executed.
Regards
\Steve
>
> >Hi,
> > While loading Dylibs i want to write my own __init,__fini
> >functions.Would you please tell me how to write those functions >please.
> >
> >Raja
>
>
Steve Graegert <graegerts@gmail.com>
Software Consultancy {C/C++ && Java && .NET}
Mobile: +49 (176) 21248869
Office: +49 (9131) 7126409
next prev parent reply other threads:[~2005-08-15 12:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 11:17 Dylibs r_zaca
2005-08-15 12:05 ` Steve Graegert [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-08-13 5:26 Dylibs raja
2005-08-13 6:29 ` Dylibs Markus Rechberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a00c8d505081505057c579fbf@mail.gmail.com \
--to=graegerts@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=r_zaca@ig.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).