public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* "--gstabs and certain file names cause assembler error messages"
@ 2001-08-21 13:35 Xinan Tang
  2001-08-24  9:50 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Xinan Tang @ 2001-08-21 13:35 UTC (permalink / raw)
  To: binutils

Hi

   I am using GNU assembler version 2.10 using BFD version 2.10 and I 
noticed a very strange bug related to the combination of --gstabs and 
file names.

   I have a simple program, `mau.s':
__________________________________
	.text
	.align 4
	.global main
main:
         goto undefined #purposely done
.end
___________________________________


    if I do:

	   as mau.s

    it runs correctly. However, if I do:

            as --gstabs mau.s

    it complains:
___________________________________________________________
  mau.s: Assembler messages:
mau.s:7: Error: local label "0" (instance number 0 of a dollar label) is 
not defined
______________________________________________

     First, the error message is incorrect since there is such a label.
Second, even though there is an undefined symbol, I do expect the
linker will report the error not the assembler.

     Furthermore, if I change the file name from `mau.s' to `mau_1.s',

     both `as' and `as --gstabs' run correctly and the error disappeared.

     Is the hash table being broken by such a combination?

Thanks

--Xinan



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

* Re: "--gstabs and certain file names cause assembler error messages"
  2001-08-21 13:35 "--gstabs and certain file names cause assembler error messages" Xinan Tang
@ 2001-08-24  9:50 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2001-08-24  9:50 UTC (permalink / raw)
  To: Xinan Tang; +Cc: binutils

Hi Xinan,

>    I am using GNU assembler version 2.10 using BFD version 2.10 and

That is an old version.  Can you check to see if the problem still
exists in the latest version (2.11.2).

>     if I do:
> 
> 	   as mau.s
> 
>     it runs correctly. However, if I do:
> 
>             as --gstabs mau.s
> 
>     it complains:
> ___________________________________________________________
>   mau.s: Assembler messages:
> mau.s:7: Error: local label "0" (instance number 0 of a dollar label)
> is not defined
> ______________________________________________
> 
>      First, the error message is incorrect since there is such a
>      label.

Where ?  The error message is referring to a special local label
created by the stabs code, not to any label in your source program.

> Second, even though there is an undefined symbol, I do expect the
> linker will report the error not the assembler.

No local labels must be resolved during assembly, their resolution
cannot wait until link time.

>      Furthermore, if I change the file name from `mau.s' to `mau_1.s', 
>      both `as' and `as --gstabs' run correctly and the error disappeared.

This is most strange.  Are you running gas under Cygwin by any chance?
This is the only host environment where I have heard of this kind of
thing happening.

Please could you give us more information about your problem.  For
example what host and target are involved ?  What configure options
were used to build gas ?

Cheers
        Nick

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

end of thread, other threads:[~2001-08-24  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21 13:35 "--gstabs and certain file names cause assembler error messages" Xinan Tang
2001-08-24  9:50 ` Nick Clifton

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 read-only IMAP folder(s) and NNTP newsgroup(s).