bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gas/ia64 "data in a code section" problem


From: Jim Wilson
Subject: Re: gas/ia64 "data in a code section" problem
Date: 29 Jun 2004 18:22:55 -0700

On Fri, 2004-06-18 at 16:50, Belochapka, Konstantin wrote:
> It appears that ia64 as produces incorrect object code when the code and the 
> data are intermixed and the data is not aligned to the instruction bundle 
> boundary
>       add   r8=10,r7
>       data1  20
>       add  r9=15,r10

What do you think should happen for an example like this?

I'd suggest that what we should do is emit an error.  Emitting data into
the text section is a bad idea for IA-64.  It breaks a number of things,
bundling, dependency violation checking/stop bit generation, and
possibly also generation of unwind info.  The only way to fix these
problems is to not allow it at all.  However, I am not sure if I can
just give an error for this; there may be code in e.g. linux kernel or
glibc that needs this to continue to work.

I suspect you want it to work somehow though, perhaps by aligning the
code section to 16 bytes after the data directive.  Unfortunately, I
don't see an obvious way to fix this.  I checked, and noticed that I get
the same kind of error if I use mips instructions and the mips
assembler.  I suspect other RISC targets will also have the same
problem, but I haven't checked yet.  If I can find one that works, I can
try copying what it does.  Otherwise, I may have to invent something.  I
don't want to emit an align directive before every instruction bundle,
which is the naive solution.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]