This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: equ directive problem
- To: jspahr at crystal dot cirrus dot com
- Subject: Re: equ directive problem
- From: Nick Clifton <nickc at redhat dot com>
- Date: Fri, 15 Sep 2000 14:34:07 -0700
- CC: binutils at sourceware dot cygnus dot com
Hi John,
: I have an equate at the beginning of my program:
: .equ ADDRESS, 0x300f0000
:
: I actually use the ADDRESS over 4,000 lines later, but I'm getting an error
: when trying to assemble using as. The error is: Error: Literal referenced
: across section boundary (Implicit dump?)
:
: Anyway I can fix it without moving the equate? I want to be able to
: reference it anywhere in the program.
You could try using the C preprocessor instead. Assuming that you are
using gcc to run the assembler, eg by typing "gcc foo.s", then if you
change the file extension to a capital S, gcc will run the C
preprocessor on the file before passing it on to the assembler. ie
"gcc foo.S". Then all you needs to do is:
#define ADDRESS 0x300f0000
Cheers
Nick
PS. If this does not work, please could you try to create a simple
test case to reproduce the problem. You can probably use .fill or
.space to create large blocks of empty space in your program if
necessary.