This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Allow a global symbol set to common/undefined symbol


 --- "H. J. Lu" <hjl@lucon.org> wrote: 
> > > > > >   asm volatile (" dataPS2 = %c0 ": : "i" (&MOUSE.data.PS2));
> 
> It is the difference between
> 
>         .comm   MOUSE,12,4
> 	dataPS2 = MOUSE + 4
> 
> and
> 
> 	dataPS2 = MOUSE + 4
>         .comm   MOUSE,12,4
> 
> The former will create a copy of common symbol and latter won't. But
> 
> 	dataPS2 = MOUSE + 4
>         .comm   MOUSE,12,4
> 
> will turn the local symbol dataPS2 into a gloal one.

  OK, because GCC-4.0 put the ".comm MOUSE,12,4" at end of the
 assembler file I do not see the problem. I did not noticed dataPS2
 was a global symbol - not a problem in my software.

> H.J.
> ----
> gas/
> 
> 2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>
> ......
> --- gas/testsuite/gas/all/assign.s.set	2005-04-15 08:44:24.000000000 -0700
> +++ gas/testsuite/gas/all/assign.s	2005-04-25 12:18:11.000000000 -0700

  I do not have the above filename in my binutils-2.15.97 tree.
  I applied your patch and recompiled the C file given at the begining
 of this thread and the error did not disappear:
/home/etienne/projet/toolchain/bin/as  -acdhls=tmp.lis -o tmp.o tmp.s
tmp.s: Assembler messages:
tmp.s:34: Error: Local symbol `dataPS2' can't be equated to common symbol
`MOUSE'

  Maybe I have done something wrong? I still have the modified error report.
  Note that I no more need this fix because I have put the structure in
 BSS, and that should not affect too many people anyway.

  Thanks,
  Etienne.


	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]