Bruce Korb writes:

> Is there supposed to be a way to tell GCC/collect2/ld to
> let me supply my own _init and _fini routines?

ld -init NAME -fini NAME

> Or, am I required to have a pre-determined external name that I must
> reference?  If so, what is the point of _init? *sigh*.

Actually, if you are using GCC then you probably should use
__attribute__((constructor)) and __attribute__((destructor)).  Those might
even work on non-ELF system.

> P.S.  I did a ``gcc -v'', grabbed the collect2 invocation
> and deleted the file containing the unwanted externals.
> Using that invocation resulted in a perfectly working
> shared library with my own _init routine.  Too clumsy for
> real use, tho.

I think what you were trying to do (i.e., supplying own _init) once worked
with stock GCC, but somehow it doesn't anymore.

-- 
Peter Eisentraut      [EMAIL PROTECTED]       http://yi.org/peter-e/


_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to