From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Sun, 31 Dec 2006 09:53:44 -0800 From: "Micah Stetson" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [9fans] setmalloctag in cc.a? Topicbox-Message-UUID: fc1ae4fc-ead1-11e9-9d60-3106f5b1d025 So I'm starting to play with Charles Forsyth's zc compiler for Atmel AVRs (/n/sources/contrib/forsyth/avr.9gz), but I get errors trying to link zc: 8l -o 8.out cgen.8 enam.8 list.8 mul.8 peep.8 reg.8 sgen.8 swt.8 txt.8 ../cc/cc.a8 malloc: /386/lib/libc.a(setmalloctag): redefinition: malloc (1054) TEXT malloc+0(SB),$24 free: /386/lib/libc.a(setmalloctag): redefinition: free (1098) TEXT free+0(SB),$12 realloc: /386/lib/libc.a(setmalloctag): redefinition: realloc (1105) TEXT realloc+0(SB),$28 calloc: /386/lib/libc.a(setmalloctag): redefinition: calloc (1134) TEXT calloc+0(SB),$24 mk: 8l -o ... : exit status=rc 985: 8l 987: error I can fix this by adding the following lines to cc/compat.c: void setmalloctag(void*, ulong) { } /sys/src/cmd/cc does this, but I don't understand why. I don't see any place where setmalloctag is called, so why is 8l trying to pull it in? Micah