[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GCC constructors don't work

	I'm afraid that GCC constructors don's get executed, and that
causes that every c++ program I've tried fails.

	I think it's libc6-related, and not gcc...

cespedes@groucho:/tmp$ uname -a
Linux groucho 2.0.30 #1 Fri Apr 11 18:34:11 EDT 1997 sparc unknown
cespedes@groucho:/tmp$ cat kk.c
void f()__attribute__((constructor));
void f() { printf("Hello\n"); }
cespedes@groucho:/tmp$ gcc -o kk kk.c
cespedes@groucho:/tmp$ ldd kk
        libc.so.6 => /lib/libc.so.6 (0x50026000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x50000000)
cespedes@groucho:/tmp$ ./kk
cespedes@groucho:/tmp$ _

	(it should print "Hello\n")

	Any clue?

Juan Cespedes

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-sparc-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: