From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] malloc redefinition when linking pcc with 8c programs In-Reply-To: Your message of "Mon, 01 Dec 2003 11:13:25 MST." From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <58111.1070307826.1@t40.swtch.com> Message-Id: Date: Mon, 1 Dec 2003 14:43:46 -0500 Topicbox-Message-UUID: 99aec234-eacc-11e9-9e20-41e7f4b1d025 > I'm having this problem I can't get around -- trying to link .8 files > compiled with ape/pcc and .8 files compiled with 8c I get the > following: > > malloc: /386/lib/libc.a(mallocz): redefinition: malloc > (1012) TEXT malloc+0(SB),$24 > free: /386/lib/libc.a(mallocz): redefinition: free > (1041) TEXT free+0(SB),$12 > realloc: /386/lib/libc.a(mallocz): redefinition: realloc > (1049) TEXT realloc+0(SB),$28 > calloc: /386/lib/libc.a(mallocz): redefinition: calloc > (1078) TEXT calloc+0(SB),$24 > atexit: /386/lib/libc.a(exits): redefinition: atexit > (776) TEXT atexit+0(SB),$16 > > Any ideas? you're trying to link the ape library with the normal c library, and you cannot do that. one or the other, as discussed earlier. multiple mallocs aren't the only reason.