[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undefined symbol __dso_handle
From: |
H. J. Lu |
Subject: |
Re: undefined symbol __dso_handle |
Date: |
Tue, 14 Jan 2003 12:05:43 -0800 |
User-agent: |
Mutt/1.2.5.1i |
On Tue, Jan 14, 2003 at 04:49:55PM -0300, Alejandro Dobniewski wrote:
> I can do that for testing purposes, but we need them for production
> releases. These are valid to override according to the program library
> how-to:
>
> "5.2. Special functions _init and _fini
> Two special functions aid in initializing and finalizing a module: _init and
> _fini. If a function ``_init'' is exported in a library, then it is called
> when the library is first opened (via dlopen() or simply as a shared
> library). In a C program, this just means that you defined some function
> named _init. There is a corresponding function called _fini, which is called
> whenever a client finishes using the library (via a call dlclose() that
> brings its reference count to zero, or on normal exit of the program). The C
> prototypes for these functions are:
>
> void _init(void);
> void _fini(void);
>
> When compiling the file into a ``.o'' file in gcc, be sure to add the gcc
> option ``-nostartfiles''. This keeps the C compiler from linking the system
> startup libraries against the .so file. Otherwise, you'll get a
> ``multiple-definition'' error. My thanks to Jim Mischel and Tim Gentry for
> their suggestion to add this discussion of _init and _fini, as well as help
> in creating it."
>
When you do that, you have to deal with its consequence. Undefined
__dso_handle is just one of them. Why do you need to define your own
_init/_fini?
H.J.
- Re: undefined symbol __dso_handle, (continued)
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/13
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/13
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/13
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/14
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/14
- Re: undefined symbol __dso_handle,
H. J. Lu <=
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/14
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/14
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/14