Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bbn!husc6!rice!sun-spots-request From: symult!david@csvax.caltech.edu Newsgroups: comp.sys.sun Subject: __DYNAMIC Keywords: SunOS Message-ID: <4117@kalliope.rice.edu> Date: 23 Jun 89 21:19:32 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 27 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 49, message 11 of 11 SUN OS version: 4.0.3 on a Sun 3/60 (same behavior for 4.0.x OS) I would like to create an intermediate executable file using the -r switch of the linker. I am using the -Bstatic switch. When I do so, I get a diagnostic stating that __DYNAMIC is undefined. Does anyone know how to shut this message up? (It's a bug in ld since -r implies that all undefined error messages are suppressed). If I try to define __DYNAMIC myself, ld complains that I am trying to define a loader-defined symbol. The executable created is fine. Sample session (for any C file called t.c): % cc -Bstatic -c t.c % cc -Bstatic -r -o t.out t.o Undefined: __DYNAMIC % ld -o t.new t.out If you declare static int _DYNAMIC = 0; in t.c, the linker will complain (as it should): % cc -Bstatic -c t.c % cc -Bstatic -r -o t.out t.o % ld -o t.new t.out __DYNAMIC: ld: user attempt to redefine loader-defined symbol __DYNAMIC: t.out: multiply defined