Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!helios!archone.tamu.edu From: byron@archone.tamu.edu (Byron Rakitzis) Newsgroups: comp.sys.next Subject: Redefining a symbol in /lib/libsys_s.a (bug in /bin/ld?) Message-ID: <17859@helios.TAMU.EDU> Date: 27 Jun 91 04:47:37 GMT Sender: usenet@helios.TAMU.EDU Organization: College of Architecture, Texas A&M University. Lines: 22 If I redefine a symbol in a program I write, say malloc(), then the NeXT loader will refuse to load my object file with /lib/libsys_s.a. For example: $ cat > a.c malloc(){return 0;} main(){return malloc();} $ cc a.c /bin/ld: multiple definitions of symbol _malloc a.o definition of _malloc in section (__TEXT,__text) /lib/libsys_s.a(malloc.o) definition of absolute _malloc (value 0x50028fa) Does anyone know a way to work around this problem (besides the obvious renaming of malloc() in a.c...)? Please send me mail and I will summarize to the net. -- Byron Rakitzis byron@archone.tamu.edu