This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

getting custom _init / _fini functions in a dynamic library


Hello,

the library I'm working on works so far (programs using it can be linked
against it and do what I expected), but I failed to get my own _init /_fini
functions working. According to the "Program Library HOWTO" I declared my
own functions (void _init(void); ) and used the -nostartfiles option. The
resulting library contained the symbols _init_Fv and _fini_Fv but they
wheren't used. I also tried to declare the functions with
__attribute__((constructor)) / ((destructor)) which didn't work either. As a
third method I tried the -init and -fini options of the linker, but to no
avail.
I'm using g++-3.0 on a i386 platform. Is there any known problem/solution?

Mit freundlichen Gruessen / Best regards
Dipl.-Phys. Christoph Baumann
---
SORCUS Computer GmbH
Im Breitspiel 11 c
D-69126 Heidelberg

Tel.: +49(0)6221/3206-0
Fax: +49(0)6221/3206-66


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]