From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 26 Nov 2012 08:25:13 -0500 To: 9fans@9fans.net Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Linking error with 8l, guys, could you tell me where to look? Topicbox-Message-UUID: e4931e98-ead7-11e9-9d60-3106f5b1d025 On Mon Nov 26 04:56:23 EST 2012, zhangrui0000@gmail.com wrote: > The message is: > > (2050) DATA opnames<1>+116(SB)/4,$string<1>+739(SB) > memccpy: multiple initialization > (2170) DATA etnames<1)+72(SB)/4,$string<1>+912(SB) > memccpy: multiple initialization > > I know 2050 is somehow related to the line number where opnames appear in the code, and so is 2170 with etnames. > I know it's suggesting I had an opnames initialized some where, but I just don't know where to look. I read the 8l man, but it seems there is no other docs where I can check for detail information. > Can anybody tell me what the rest number of the message means, where should I look for the duplicate code? this is the format from 8l/list.c:/^Pconv snprint(str, sizeof(str), "(%ld) %A %D,%D", p->line, p->as, &p->from, &p->to); it looks like memccpy is defined twice in the same .8. i'd look for the symbol rather than the line number. the format of the line number doesn't fit the plumbable convention, which would be file:line, and also appears to not be the line number you are expecting. it's the line number after include files are processed. which while not wrong, is not helpful either. - erik --- example: ; cat mdef.c #include #include void x(void) { } void x(void) { } void main(void) { } ; tmk mdef.c 6c -FVTw mdef.c 6l -o 6.mdef mdef.6 x: mdef.6: redefinition: x (818) TEXT x+0(SB),$0 ; # modified 8c to output line numbers in comments ; /sys/src/cmd/8c/6.out -S mdef.c TEXT x+0(SB),0,$0 /* 806 */ RET , /* 808 */ TEXT x+0(SB),0,$0 /* 811 */ RET , /* 813 */ TEXT main+0(SB),0,$0 /* 816 */ RET , /* 818 */ END , /* 818 */