9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] setmalloctag in cc.a?
@ 2006-12-31 17:53 Micah Stetson
  2006-12-31 19:51 ` Charles Forsyth
       [not found] ` <66f4993796d468c324e7cd31e6c8c74e@proxima.alt.za>
  0 siblings, 2 replies; 11+ messages in thread
From: Micah Stetson @ 2006-12-31 17:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-02-06  6:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-31 17:53 [9fans] setmalloctag in cc.a? Micah Stetson
2006-12-31 19:51 ` Charles Forsyth
2007-01-01  1:29   ` Micah Stetson
2007-01-01  6:19     ` Micah Stetson
2007-01-01 10:18     ` Charles Forsyth
     [not found] ` <66f4993796d468c324e7cd31e6c8c74e@proxima.alt.za>
2007-01-02  5:39   ` Micah Stetson
2007-01-03  4:06     ` lucio
2007-01-03 16:44       ` Micah Stetson
2007-02-06  4:46         ` Lucio De Re
2007-02-06  5:41           ` Lucio De Re
2007-02-06  6:31             ` Bruce Ellis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).