Date: Thu, 6 Jun 2002 14:49:38 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: "David O'Brien" <obrien@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src UPDATING Message-ID: <20020606143319.V10309-100000@gamplex.bde.org> In-Reply-To: <20020605200821.A55648@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 Jun 2002, David O'Brien wrote:
> On Thu, Jun 06, 2002 at 10:02:07AM +1000, Bruce Evans wrote:
> > cc -gstabs+ -O -pipe -Wall -Wno-format-y2k -Wno-uninitialized -Wformat=2 -Wno-format-extra-args -static -o cat cat.o
> > cat.o: In function `udom_open':
> > /usr/src/bin/cat/cat.c(.stab+0x1460): undefined reference to `nantext'
> > *** Error code 1
>
> Perhaps do to local changes?
Perhaps. It seems to be caused by a very funny bug in printf or scanf or
in related functions in gcc.
> $ cat foo.c
> int main(void) { return 0; }
> $ /usr/bin/cc -gstabs+ foo.c
> $ ./a.out
> $ /usr/bin/cc -S -gstabs+ foo.c
> $ cat foo.s
> .file "foo.c"
> ..snip..
> .stabs "",100,0,0,nantext
> nantext:
"nan" here seems to be be for misparsing ".Letext" as "nan" (numeric
Not a Number). I get "nan" for the label in the stabs line and
"-inftext" for the label itself. "-inf" seems to be for misparsing
something as numeric -Infinity. The bogus label "-inftext" causes
only a warning from the assembler. Linkage fails later because there
is no label "nantext".
> .ident "GCC: (GNU) 3.1 [FreeBSD] 20020509 (prerelease)"
>
> $ gcc31 -gstabs+ foo.c
> $ ./a.out
> $ gcc31 -S -gstabs+ foo.c
> $ cat foo.s
> .file "foo.c"
> ..snip..
> .stabs "",100,0,0,.Letext
> .Letext:
> .ident "GCC: (GNU) 3.1.1 20020527 (prerelease) [FreeBSD]"
>
Here you get the reasonable label .Letext and I still get nantext/-inftext.
".Letext" is apparently from adding the prefix .L to etext to keep etext
out of the namespace.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020606143319.V10309-100000>
