* non-constant in current section subtraction???
@ 2002-04-26 15:13 kieft_brian
0 siblings, 0 replies; only message in thread
From: kieft_brian @ 2002-04-26 15:13 UTC (permalink / raw)
To: linux-assembly
I'm having some trouble with the GNU assembler and the special '.' symbol. The
following code is an example:
LABEL1:
some stuff
more stuff
VAR1 = . - LABEL1
.IF (VAR1)
do something
.ENDIF
The dot symbol should give me the current location in memory, which is a
non-constant. However, the difference between the . and label1 (assuming they're
in the same section) is a constant. Why do I get a "non-constant expression in
if statement" error when I try to do this. I've tried working the assembler
source code a bit and making X_op = O_constant when you do the subtraction, but
that seems to screw things up and give everything a value of 0. Without the
hack, I get the right values, but they're just not constant. Has anyone ran into
this before? I'd appreciate any help I can get. Thanks,
Brian
**********************************************************************
This e-mail and any files transmitted with it are confidential and may
be legally privileged or otherwise exempt from disclosure under
applicable law. This e-mail and its files are intended solely for
the individual or entity to whom they are addressed and their content
is the property of Smiths Aerospace. If you are not the intended
recipient, please do not read, copy, use or disclose this communication.
If you have received this e-mail in error please notify the e-mail
administrator at postmaster@si.com and then delete this e-mail, its
files and any copies.
This footnote also confirms that this e-mail message has been scanned
for the presence of known computer viruses.
***********************************************************************
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-26 15:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-26 15:13 non-constant in current section subtraction??? kieft_brian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).