This is the mail archive of the binutils@sourceware.cygnus.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]

Constructor called twice on global objects


RedHat Linux 6.0 (kernel 2.2.10)
ld version 2.91
egcs version 2.95.1

Hi

I have the same global object in two different source files. One source
file is compiled and linked into a shared
object and the other is compiled and linked into the executable, the
executable being linked with the
shared object. I find that only one instance of the global object is
created, but its constructor and destructor are called twice.
Surely this can't be correct? - I don't observer this behaviour on other
UNIX platforms.

I have attached a simple testcase which illustrates the problem.


thanks

Barry


double.tar.gz


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