9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Linking error with 8l, guys, could you tell
@ 2012-11-29  9:48 keystroke
  0 siblings, 0 replies; 9+ messages in thread
From: keystroke @ 2012-11-29  9:48 UTC (permalink / raw)
  To: 9fans

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

在 2012年11月28日星期三UTC+8下午8时22分30秒,Bence Fábián写道:
> but what is _most_ likely is that you really have them initialized two times.
> just do
> g '(op|et)names ?='
>
> you should find 4 initializations. just delete the redundant ones.
>
>
> 2012/11/28 Bence Fábián <beg...@gmail.com>
>
> DATA  opnames<1>+116(SB)/4,$string<1>+739(SB)
>
> and
> DATA  etnames<1)+72(SB)/4,$string<1>+912(SB)
>
>
>
>
> are the second initializations of both opnames and etnames.
>
> you can grep for them in the output of
> 8c -S source.c
>
>
> that's all i can help, cause i can't tell what $string<1>+739(SB) and $string<1>+912(SB) refer to
>
>
> since they are adresses.

Thanks guys, I just look into the list, and suprisingly saw you replying in
a new thread, I am not familiar with newsgroup and didn't saw your reply earlier
the problem is solved. It's a good lesson, eyes can lie, I just didn't use machine to check duplicated initializaion.



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

* Re: [9fans] Linking error with 8l, guys, could you tell
@ 2012-11-29  9:48 keystroke
  0 siblings, 0 replies; 9+ messages in thread
From: keystroke @ 2012-11-29  9:48 UTC (permalink / raw)
  To: 9fans

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

在 2012年11月28日星期三UTC+8下午8时48分09秒,erik quanstrom写道:
> you're right.  a quick trip through sort|uniq -d says that FALL is listed
>
> twice.
>
>
>
> - erik

Thank you erik and Bence, it's a good lesson to learn.



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

* Re: [9fans] Linking error with 8l, guys, could you tell
@ 2012-11-29  9:48 keystroke
  0 siblings, 0 replies; 9+ messages in thread
From: keystroke @ 2012-11-29  9:48 UTC (permalink / raw)
  To: 9fans

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

在 2012年11月28日星期三UTC+8下午8时48分09秒,erik quanstrom写道:
> you're right.  a quick trip through sort|uniq -d says that FALL is listed
>
> twice.
>
>
>
> - erik

Thank you erik, it's a good lesson.



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

* Re: [9fans] Linking error with 8l, guys, could you tell
  2012-11-28 11:43     ` Bence Fábián
  2012-11-28 11:51       ` lucio
@ 2012-11-28 12:48       ` erik quanstrom
  1 sibling, 0 replies; 9+ messages in thread
From: erik quanstrom @ 2012-11-28 12:48 UTC (permalink / raw)
  To: begnoc, 9fans

you're right.  a quick trip through sort|uniq -d says that FALL is listed
twice.

- erik



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

* Re: [9fans] Linking error with 8l, guys, could you tell
  2012-11-28 12:12         ` Bence Fábián
@ 2012-11-28 12:22           ` Bence Fábián
  0 siblings, 0 replies; 9+ messages in thread
From: Bence Fábián @ 2012-11-28 12:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

but what is _most_ likely is that you really have them initialized two
times.
just do
g '(op|et)names ?='
you should find 4 initializations. just delete the redundant ones.

2012/11/28 Bence Fábián <begnoc@gmail.com>

> DATA  opnames<1>+116(SB)/4,$string<1>+739(SB)
> and
> DATA  etnames<1)+72(SB)/4,$string<1>+912(SB)
>
> are the second initializations of both opnames and etnames.
> you can grep for them in the output of
> 8c -S source.c
>
> that's all i can help, cause i can't tell what $string<1>+739(SB)
> and $string<1>+912(SB) refer to
> since they are adresses.
>
>

[-- Attachment #2: Type: text/html, Size: 1103 bytes --]

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

* Re: [9fans] Linking error with 8l, guys, could you tell
  2012-11-28 11:51       ` lucio
@ 2012-11-28 12:12         ` Bence Fábián
  2012-11-28 12:22           ` Bence Fábián
  0 siblings, 1 reply; 9+ messages in thread
From: Bence Fábián @ 2012-11-28 12:12 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

DATA  opnames<1>+116(SB)/4,$string<1>+739(SB)
and
DATA  etnames<1)+72(SB)/4,$string<1>+912(SB)

are the second initializations of both opnames and etnames.
you can grep for them in the output of
8c -S source.c

that's all i can help, cause i can't tell what $string<1>+739(SB)
and $string<1>+912(SB) refer to
since they are adresses.



2012/11/28 <lucio@proxima.alt.za>

> > int num = 20;
> > int num = 30;
>
> Looks easy to fix, but I understand where you're coming from.  What
> stops you from using a workaround?
>
> ++L
>
>
>

[-- Attachment #2: Type: text/html, Size: 1042 bytes --]

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

* Re: [9fans] Linking error with 8l, guys, could you tell
  2012-11-28 11:43     ` Bence Fábián
@ 2012-11-28 11:51       ` lucio
  2012-11-28 12:12         ` Bence Fábián
  2012-11-28 12:48       ` erik quanstrom
  1 sibling, 1 reply; 9+ messages in thread
From: lucio @ 2012-11-28 11:51 UTC (permalink / raw)
  To: 9fans

> int num = 20;
> int num = 30;

Looks easy to fix, but I understand where you're coming from.  What
stops you from using a workaround?

++L




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

* Re: [9fans] Linking error with 8l, guys, could you tell
  2012-11-28 10:20   ` [9fans] Linking error with 8l, guys, could you tell keystroke
@ 2012-11-28 11:43     ` Bence Fábián
  2012-11-28 11:51       ` lucio
  2012-11-28 12:48       ` erik quanstrom
  0 siblings, 2 replies; 9+ messages in thread
From: Bence Fábián @ 2012-11-28 11:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 5651 bytes --]

This is a multiple initialization problem. Here is an example code:

#include <u.h>
#include <libc.h>

int num = 20;
int num = 30;

void
main(void)
{
print("%d\n", num);
exits(nil);
}

relevant parts:

/sys/src/cmd/8l/asm.c:424:
/sys/src/cmd/8l/pass.c:16:



2012/11/28 keystroke <zhangrui0000@gmail.com>

> Thank you for your reply, erik.
>
> But I don't quite follow you. Are you suggesting that the error has
> nothing to do with "opnames" and "etnames", but is about the following word
> "memccpy"?
>
> I had grep opnames and etnames before, and finds only one initial place.
> And I grep memccpy, no result was found.
> There is a strange situation, when I "8l subr.c" then it's "memccpy", when
> I
> "8l *.8", it shows "create":
>
> (2050) DATA ...(same as before)
> create: multiple initialization.
> ...(same as before)
> create: multiple initialization.
>
> I suspect it is opnames and etnames that cause the problem, and I find
> something
> strange in the subr.c and it's included file go.h, is it relevant?
>
> =============================================================
> > subr.c
> =============================================================
> static char*
> opnames[] =
> {
>         [OADDR]         = "ADDR",
>         [OADD]          = "ADD",
>         [OANDAND]       = "ANDAND",
>         [OAND]          = "AND",
>         [OARRAY]        = "ARRAY",
>         [OASOP]         = "ASOP",
>         [OAS]           = "AS",
>         [OBAD]          = "BAD",
>         [OBREAK]        = "BREAK",
>         [OCALL]         = "CALL",
>         [OCALLPTR]      = "CALLPTR",
>         [OCALLMETH]     = "CALLMETH",
>         [OCALLINTER]    = "CALLINTER",
>         [OCAT]          = "CAT",
>         [OCASE]         = "CASE",
>         [OXCASE]        = "XCASE",
>         [OFALL]         = "FALL",
>         [OCONV]         = "CONV",
>         [OCOLAS]        = "COLAS",
>         [OCOM]          = "COM",
>         [OCONST]        = "CONST",
>         [OCONTINUE]     = "CONTINUE",
>         [ODCLARG]       = "DCLARG",
>         [ODCLCONST]     = "DCLCONST",
>         [ODCLFIELD]     = "DCLFIELD",
>         [ODCLFUNC]      = "DCLFUNC",
>         [ODCLTYPE]      = "DCLTYPE",
>         [ODCLVAR]       = "DCLVAR",
>         [ODIV]          = "DIV",
>         [ODOT]          = "DOT",
>         [ODOTPTR]       = "DOTPTR",
>         [ODOTMETH]      = "DOTMETH",
>         [ODOTINTER]     = "DOTINTER",
>         [OEMPTY]        = "EMPTY",
>         [OEND]          = "END",
>         [OEQ]           = "EQ",
>         [OFOR]          = "FOR",
>         [OFUNC]         = "FUNC",
>         [OGE]           = "GE",
>         [OPROC]         = "PROC",
>         [OGOTO]         = "GOTO",
>         [OGT]           = "GT",
>         [OIF]           = "IF",
>         [OINDEX]        = "INDEX",
>         [OINDEXPTR]     = "INDEXPTR",
>         [OINDEXSTR]     = "INDEXSTR",
>         [OINDEXMAP]     = "INDEXMAP",
>         [OINDEXPTRMAP]  = "INDEXPTRMAP",
>         [OIND]          = "IND",
>         [OLABEL]        = "LABEL",
>         [OLE]           = "LE",
>         [OLEN]          = "LEN",
>         [OLIST]         = "LIST",
>         [OLITERAL]      = "LITERAL",
>         [OLSH]          = "LSH",
>         [OLT]           = "LT",
>         [OMINUS]        = "MINUS",
>         [OMOD]          = "MOD",
>         [OMUL]          = "MUL",
>         [ONAME]         = "NAME",
>         [ONE]           = "NE",
>         [ONOT]          = "NOT",
>         [OOROR]         = "OROR",
>         [OOR]           = "OR",
>         [OPLUS]         = "PLUS",
>         [ODEC]          = "DEC",
>         [OINC]          = "INC",
>         [OSEND]         = "SEND",
>         [ORECV]         = "RECV",
>         [OPTR]          = "PTR",
>         [ORETURN]       = "RETURN",
>         [ORSH]          = "RSH",
>         [OSLICE]        = "SLICE",
>         [OSUB]          = "SUB",
>         [OSWITCH]       = "SWITCH",
>         [OTYPE]         = "TYPE",
>         [OVAR]          = "VAR",
>         [OEXPORT]       = "EXPORT",
>         [OIMPORT]       = "IMPORT",
>         [OXOR]          = "XOR",
>         [ONEW]          = "NEW",
>         [OFALL]         = "FALL",
>         [OXFALL]        = "XFALL",
>         [OPANIC]        = "PANIC",
>         [OPRINT]        = "PRINT",
>         [OXXX]          = "XXX",
> };
>
> =============================================================
> > go.h
> =============================================================
> enum
> {
>         OXXX,
>
>         OTYPE, OCONST, OVAR, OEXPORT, OIMPORT,
>
>         ONAME,
>         ODOT, ODOTPTR, ODOTMETH, ODOTINTER,
>         ODCLFUNC, ODCLCONST, ODCLVAR,
>         ODCLTYPE, ODCLFIELD, ODCLARG,
>         OLIST,
>         OPTR, OARRAY,
>         ORETURN, OFOR, OIF, OSWITCH,
>         OAS, OASOP, OCOLAS, OCASE, OXCASE, OFALL, OXFALL,
>         OGOTO, OPROC, ONEW, OPANIC, OPRINT, OEMPTY,
>
>         OOROR,
>         OANDAND,
>         OEQ, ONE, OLT, OLE, OGE, OGT,
>         OADD, OSUB, OOR, OXOR, OCAT,
>         OMUL, ODIV, OMOD, OLSH, ORSH, OAND,
>         ODEC, OINC,
>         OLEN,
>         OFUNC,
>         OLABEL,
>         OBREAK,
>         OCONTINUE,
>         OADDR,
>         OIND,
>         OCALL, OCALLPTR, OCALLMETH, OCALLINTER,
>         OINDEX, OINDEXPTR, OINDEXSTR, OINDEXMAP, OINDEXPTRMAP,
>         OSLICE,
>         ONOT, OCOM, OPLUS, OMINUS, OSEND, ORECV,
>         OLITERAL,
>         OCONV,
>         OBAD,
>
>         OEND,
> };
>
>

[-- Attachment #2: Type: text/html, Size: 8162 bytes --]

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

* Re: [9fans] Linking error with 8l, guys, could you tell
  2012-11-26 13:25 ` erik quanstrom
@ 2012-11-28 10:20   ` keystroke
  2012-11-28 11:43     ` Bence Fábián
  0 siblings, 1 reply; 9+ messages in thread
From: keystroke @ 2012-11-28 10:20 UTC (permalink / raw)
  To: 9fans

Thank you for your reply, erik.

But I don't quite follow you. Are you suggesting that the error has nothing to do with "opnames" and "etnames", but is about the following word "memccpy"?

I had grep opnames and etnames before, and finds only one initial place.
And I grep memccpy, no result was found.
There is a strange situation, when I "8l subr.c" then it's "memccpy", when I
"8l *.8", it shows "create":

(2050) DATA ...(same as before)
create: multiple initialization.
...(same as before)
create: multiple initialization.

I suspect it is opnames and etnames that cause the problem, and I find something
strange in the subr.c and it's included file go.h, is it relevant?

=============================================================
> subr.c
=============================================================
static char*
opnames[] =
{
	[OADDR]		= "ADDR",
	[OADD]		= "ADD",
	[OANDAND]	= "ANDAND",
	[OAND]		= "AND",
	[OARRAY]	= "ARRAY",
	[OASOP]		= "ASOP",
	[OAS]		= "AS",
	[OBAD]		= "BAD",
	[OBREAK]	= "BREAK",
	[OCALL]		= "CALL",
	[OCALLPTR]	= "CALLPTR",
	[OCALLMETH]	= "CALLMETH",
	[OCALLINTER]	= "CALLINTER",
	[OCAT]		= "CAT",
	[OCASE]		= "CASE",
	[OXCASE]	= "XCASE",
	[OFALL]		= "FALL",
	[OCONV]		= "CONV",
	[OCOLAS]	= "COLAS",
	[OCOM]		= "COM",
	[OCONST]	= "CONST",
	[OCONTINUE]	= "CONTINUE",
	[ODCLARG]	= "DCLARG",
	[ODCLCONST]	= "DCLCONST",
	[ODCLFIELD]	= "DCLFIELD",
	[ODCLFUNC]	= "DCLFUNC",
	[ODCLTYPE]	= "DCLTYPE",
	[ODCLVAR]	= "DCLVAR",
	[ODIV]		= "DIV",
	[ODOT]		= "DOT",
	[ODOTPTR]	= "DOTPTR",
	[ODOTMETH]	= "DOTMETH",
	[ODOTINTER]	= "DOTINTER",
	[OEMPTY]	= "EMPTY",
	[OEND]		= "END",
	[OEQ]		= "EQ",
	[OFOR]		= "FOR",
	[OFUNC]		= "FUNC",
	[OGE]		= "GE",
	[OPROC]		= "PROC",
	[OGOTO]		= "GOTO",
	[OGT]		= "GT",
	[OIF]		= "IF",
	[OINDEX]	= "INDEX",
	[OINDEXPTR]	= "INDEXPTR",
	[OINDEXSTR]	= "INDEXSTR",
	[OINDEXMAP]	= "INDEXMAP",
	[OINDEXPTRMAP]	= "INDEXPTRMAP",
	[OIND]		= "IND",
	[OLABEL]	= "LABEL",
	[OLE]		= "LE",
	[OLEN]		= "LEN",
	[OLIST]		= "LIST",
	[OLITERAL]	= "LITERAL",
	[OLSH]		= "LSH",
	[OLT]		= "LT",
	[OMINUS]	= "MINUS",
	[OMOD]		= "MOD",
	[OMUL]		= "MUL",
	[ONAME]		= "NAME",
	[ONE]		= "NE",
	[ONOT]		= "NOT",
	[OOROR]		= "OROR",
	[OOR]		= "OR",
	[OPLUS]		= "PLUS",
	[ODEC]		= "DEC",
	[OINC]		= "INC",
	[OSEND]		= "SEND",
	[ORECV]		= "RECV",
	[OPTR]		= "PTR",
	[ORETURN]	= "RETURN",
	[ORSH]		= "RSH",
	[OSLICE]	= "SLICE",
	[OSUB]		= "SUB",
	[OSWITCH]	= "SWITCH",
	[OTYPE]		= "TYPE",
	[OVAR]		= "VAR",
	[OEXPORT]	= "EXPORT",
	[OIMPORT]	= "IMPORT",
	[OXOR]		= "XOR",
	[ONEW]		= "NEW",
	[OFALL]		= "FALL",
	[OXFALL]	= "XFALL",
	[OPANIC]	= "PANIC",
	[OPRINT]	= "PRINT",
	[OXXX]		= "XXX",
};

=============================================================
> go.h
=============================================================
enum
{
	OXXX,

	OTYPE, OCONST, OVAR, OEXPORT, OIMPORT,

	ONAME,
	ODOT, ODOTPTR, ODOTMETH, ODOTINTER,
	ODCLFUNC, ODCLCONST, ODCLVAR,
	ODCLTYPE, ODCLFIELD, ODCLARG,
	OLIST,
	OPTR, OARRAY,
	ORETURN, OFOR, OIF, OSWITCH,
	OAS, OASOP, OCOLAS, OCASE, OXCASE, OFALL, OXFALL,
	OGOTO, OPROC, ONEW, OPANIC, OPRINT, OEMPTY,

	OOROR,
	OANDAND,
	OEQ, ONE, OLT, OLE, OGE, OGT,
	OADD, OSUB, OOR, OXOR, OCAT,
	OMUL, ODIV, OMOD, OLSH, ORSH, OAND,
	ODEC, OINC,
	OLEN,
	OFUNC,
	OLABEL,
	OBREAK,
	OCONTINUE,
	OADDR,
	OIND,
	OCALL, OCALLPTR, OCALLMETH, OCALLINTER,
	OINDEX, OINDEXPTR, OINDEXSTR, OINDEXMAP, OINDEXPTRMAP,
	OSLICE,
	ONOT, OCOM, OPLUS, OMINUS, OSEND, ORECV,
	OLITERAL,
	OCONV,
	OBAD,

	OEND,
};



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

end of thread, other threads:[~2012-11-29  9:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29  9:48 [9fans] Linking error with 8l, guys, could you tell keystroke
  -- strict thread matches above, loose matches on Subject: below --
2012-11-29  9:48 keystroke
2012-11-29  9:48 keystroke
2012-11-26  9:49 [9fans] Linking error with 8l, guys, could you tell me where to look? keystroke
2012-11-26 13:25 ` erik quanstrom
2012-11-28 10:20   ` [9fans] Linking error with 8l, guys, could you tell keystroke
2012-11-28 11:43     ` Bence Fábián
2012-11-28 11:51       ` lucio
2012-11-28 12:12         ` Bence Fábián
2012-11-28 12:22           ` Bence Fábián
2012-11-28 12:48       ` erik quanstrom

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).