From mboxrd@z Thu Jan 1 00:00:00 1970 From: Home Email To: Art Berggreen Cc: crossgcc@sources.redhat.com Subject: Re: #define in assembler file Date: Mon, 23 Oct 2000 21:59:00 -0000 Message-id: <20001024045914.92792.qmail@web9405.mail.yahoo.com> X-SW-Source: 2000-10/msg00101.html --- Art Berggreen 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