This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: symbol_ref constants
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Sanjiv Kumar Gupta <skgnu at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 30 Mar 2005 15:28:24 +0100
- Subject: Re: symbol_ref constants
- Organization: Codesourcery LLC
- References: <20050330142323.18042.qmail@web50102.mail.yahoo.com>
Sanjiv Kumar Gupta wrote:
calculated by linker.
Now
add r1, foo
add r1, 10
add r1, -10
are okay but
add r1, foo + 10
add r1, -10
are not, since (foo + 10) may overflow during
relocation, so the value (foo + 10) && 0xff inserted
by linker is not correct.
What is stopping the value of 'foo' itself being > 255?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk