This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Puzzle about the _fini function in ia64 Linux
- From: Gewj <geweijin at sinosoft dot com dot cn>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: "binutils at sources dot redhat dot com" <binutils at sources dot redhat dot com>
- Date: Fri, 17 Sep 2004 13:24:58 +0800
- Subject: Re: Puzzle about the _fini function in ia64 Linux
- References: <4149A217.2050305@sinosoft.com.cn> <jemzzq2oei.fsf@sykes.suse.de>
hello,Andreas, thank for you answer,but I still have one question:
The same code (it is IA64 CodeClean) run quite well under ia32 linux
system (such as redhat Kernel 2.4.20-8 gcc-3.2.2-5).
would it be a ia32/ia64 linux difference?
Andreas Schwab wrote:
Gewj <geweijin@sinosoft.com.cn> writes:
I'm working on a ia64 linux,(kernel 2.4.18,gcc3-3.0.4-1)system.
I redefine the _fini function in a dll library with the -nostartfiles in
its Makefile.
Don't do that. If you need a finalizer use __attribute__((destructor)).
Andreas.
----------------original message------------------------------------
Hi,
I'm working on a ia64 linux,(kernel 2.4.18,gcc3-3.0.4-1)system.
I redefine the _fini function in a dll library with the -nostartfiles in
its Makefile.
then I write a execute process which have many threads, all those
threads linked with this library in its Makefile, the puzzle thing is
in some case, it seems that in some threads, the _fini function of the
library have been called even since the library was been used by other
threads.
Does the above thing may happen(gcc bug in ia64) or it turn out to be my
fault?
Thank you for any help.
Regards
--
Ivod.