From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 2875 invoked from network); 27 Mar 1998 20:15:42 -0000 Received: from morannon.bfr.co.il (HELO blinky.bfr.co.il) (hjstein@192.116.142.129) by mail2.redhat.com with SMTP; 27 Mar 1998 20:15:42 -0000 Received: (from hjstein@localhost) by blinky.bfr.co.il (8.8.5/8.6.9) id XAA08610; Fri, 27 Mar 1998 23:14:54 +0300 Date: Fri, 27 Mar 1998 23:14:54 +0300 Message-Id: <199803272014.XAA08610@blinky.bfr.co.il> From: "Harvey J. Stein" To: randy@carrera.com, lloyd@carrera.com, darryl@carrera.com, martinob@bloomberg.net, axp-list@redhat.com, bugs@redhat.com Subject: RH5.0 - undefined refs behavior changed? Under all versions of Linux, I've always been able to link a binary with undefined references & it would run fine, assuming the program never tries to execute the unresolved reference. This was especially convenient when linking f2c'ed Fortran into a C main, because libf2c.so contains a main which calls MAIN__, and f2c creates a MAIN__ when compiling a Fortran PROGRAM. Thus, MAIN__ is unresolved & will never execute when main is defined in a C program. However, this seems to have changed under RH5.0: hjstein@aldev5:~$ gcc -o foo foo.o misc_func.o -g -DUSE_F2C -DALPHA_LINUX -Xlinker -noinhibit-exec -lp2c -lopt -lf2c -lgdbm -lm /usr/lib/libf2c.so: undefined reference to `MAIN__' hjstein@aldev5:~$ ./foo Is this the way it's supposed to be? Any reason this was changed? Any way to change it back? It seems pretty dumb to have a -noinhibit-exec switch for ld while simultaneously refusing to run binaries containing undefined symbols. Thanks, -- Harvey J. Stein Berger Financial Research hjstein@bfr.co.il