[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: undefined symbol __dso_handle
From: |
Alejandro Dobniewski |
Subject: |
RE: undefined symbol __dso_handle |
Date: |
Tue, 14 Jan 2003 17:12:01 -0300 |
We use them for calling initializing data structures needed by the functions
of the so. If this is the cause I'll take the initializing out and call it
from outside.
Is this documented somewhere? in mandrake 8.0 don't happen.
Alejandro
-----Mensaje original-----
De: H. J. Lu [mailto:address@hidden
Enviado el: Martes, 14 de Enero de 2003 17:06
Para: Alejandro Dobniewski
CC: 'address@hidden'
Asunto: Re: undefined symbol __dso_handle
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,
Alejandro Dobniewski <=
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/14
- RE: undefined symbol __dso_handle, Alejandro Dobniewski, 2003/01/14