From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2178 invoked by alias); 16 Jan 2002 10:43:46 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 2058 invoked from network); 16 Jan 2002 10:43:41 -0000 Received: from unknown (HELO dell-pe2450-3.cambridge.redhat.com) (195.224.55.225) by sources.redhat.com with SMTP; 16 Jan 2002 10:43:41 -0000 Received: from north-pole.nickc.cambridge.redhat.com (host217-35-26-140.in-addr.btopenworld.com [217.35.26.140]) by dell-pe2450-3.cambridge.redhat.com (Postfix) with ESMTP id 605448464D for ; Wed, 16 Jan 2002 10:43:40 +0000 (GMT) Received: from north-pole.nickc.cambridge.redhat.com.nickc.cambridge.redhat.com (localhost [127.0.0.1]) by north-pole.nickc.cambridge.redhat.com (Postfix) with ESMTP id 4DD2C112138; Wed, 16 Jan 2002 10:42:15 +0000 (GMT) To: Crni Gorac Cc: binutils@sources.redhat.com Subject: Re: gas preprocessor References: <20020115175703.59103.qmail@web14802.mail.yahoo.com> From: Nick Clifton Date: Wed, 16 Jan 2002 03:37:00 -0000 In-Reply-To: <20020115175703.59103.qmail@web14802.mail.yahoo.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-01/txt/msg00297.txt.bz2 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