This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas preprocessor
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: Crni Gorac <cgorac at yahoo dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 16 Jan 2002 10:42:15 +0000
- Subject: Re: gas preprocessor
- References: <20020115175703.59103.qmail@web14802.mail.yahoo.com>
Hi Crni,
> I tried what you suggested but seems like it doesn't
> work. Here is small assembly program:
>
> .set result, [ebp-4]
> mov result, dword ptr 42
> mov eax, result
> However, linker reports errors:
> foo.o: In function `answer':
> foo.o(.text+0x14): undefined reference to `ebp'
> foo.o(.text+0x1d): undefined reference to `ebp'
*sigh* Yes, it seems that the assembler does not recheck the
expression in an evaluated .set symbol to see if it is a register
name, so it creates a reference to a symbol called 'ebp'. I thinkt
you are going to have to use the C preprocessor instead. Sorry.
Cheers
Nick