------- Comment #9 from sebor at roguewave dot com 2006-05-17 21:35 ------- Here's what I learned from Sun:
Here is the test case from that bug report: [Makefile] main: main.o libshibby.so gcc -L. -lshibby -Wl,-R. -o main main.o main.o: main.c gcc -c -o main.o main.c libshibby.so: shibby.c gcc -c shibby.c -fPIC -o shibby.o /usr/ccs/bin/ld -G -dy -z text -Y P,/usr/ccs/lib:/usr/lib \ -Qy -o libshibby.so shibby.o clean: rm *.o *.so [main.c] int main(int argc, char *argv[]) { shibby(); return 0; } [shibby.c] #include <ucontext.h> static void foo() { printstack(1); } void shibby() { foo(); } Here is the workaround: Making the function calling printstack() global instead of static will avoid this situation. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27629