This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: gas/ia64 "data in a code section" problem
- From: "Belochapka, Konstantin" <konstantin dot belochapka at hp dot com>
- To: "Jim Wilson" <wilson at specifixinc dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Tue, 6 Jul 2004 16:19:21 -0700
- Subject: RE: gas/ia64 "data in a code section" problem
This is really a good solution that would satisfy almost everyone.
-----Original Message-----
From: Jim Wilson [mailto:wilson@specifixinc.com]
Sent: 03 July 2004 17:38
To: Belochapka, Konstantin
Cc: binutils@sources.redhat.com
Subject: RE: gas/ia64 "data in a code section" problem
On Tue, 2004-06-29 at 22:40, Belochapka, Konstantin wrote:
> Of course I agree that if anyone puts a data into code segment does this at his own risk. But my point is that an assembler also should not any restriction based on assumption of any potential problem.
> The situation when IA64 assembler starts next bundle from an address that is not aligned on 16 bytes
> in my opinion is a bug that need to be corrected or it might be mentioned in a README file that after a data .align 16 directive is a requirement. But emitting error message would be not good solution, warning might be more appropriate.
A similar problem was reported against the PowerPC assembler a few days
ago. See binutils bug 248.
http://sources.redhat.com/bugzilla/show_bug.cgi?id=248
A patch was added that generates an error for misaligned PPC
instructions.
http://sources.redhat.com/ml/binutils/2004-07/msg00017.html
I added a patch so we get the same error for misaligned IA-64
instructions. It is attached. You will need the above referenced patch
for this one to work. This should make it easier to identify places
where you need to emit an alignment directive.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com