#define in assembler file

Home Email home_email2000@yahoo.com
Mon Oct 23 21:59:00 GMT 2000


--- Art Berggreen <art@acc.com> wrote:
> Robert Floyd wrote:
> > 
> > I am attempting to create an object file from my
> sh-hms-gcc
> > crosscompiler with an example *.s file that I
> have. But I noticed the
> > following when I type the line below:
> > 
> > ./sh-hms-gcc -o initsh.o initsh.s
> > 
> > /var/tmp/ccaJD08h.o(.text+0x20):InitSh.S:
> undefined reference to 'WCR1'
> > 
> > This is only one of many. When I look at my
> initsh.s example file for
> > the lines concerning WCR1 I find the following:
> > 
> > #define WCR1    0x05FFFFA2
> > 
> > ...and further down...
> > 
> >         .long   WCR1
> > 
> > I noticed however there is no problems with the
> use of the two byte word
> > such as:
> > 
> > #define INIT_WCR1       0x05FD
> > 
> > ....further down...
> > 
> >         .word INIT_WCR1
> > 
> > Why am I having these errors with the long words? 
> Thanks for your help.
> 
> Hmm,
> 
> #defines are handled by the C preprocessor (cpp). 
> Somewhere in the back
> of my mind I seem to recall that gcc will invoke cpp
> if the extension is
> .S (upper case) and doesn't for .s (lower case). 
> You might want to
> check in the gcc documentation.
> 
> Art
> 
> ------
> Want more information?  See the CrossGCC FAQ,
> http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sourceware.cygnus.com
> 


Thanks, Art.  It was the *.S extension that it needed.

Robert

__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list