This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: The new assembler with unwind table bug fix
- From: "H. J. Lu" <hjl at lucon dot org>
- To: davidm at hpl dot hp dot com
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 16 Jan 2004 14:56:52 -0800
- Subject: Re: The new assembler with unwind table bug fix
- References: <20040114223735.GA6409@lucon.org> <16391.14781.815426.673023@napali.hpl.hp.com>
On Thu, Jan 15, 2004 at 05:09:17PM -0800, David Mosberger wrote:
> Oops, while trying to come up with an automated test, I found a case
> which the new assembler doesn't handle properly:
>
> $ cat t.S
> .proc foo
> .prologue
> foo: .save rp, r2
> nop 0
> .align 64
> .endp foo
> $ as t.S -o t.o
> $ readelf -u t.o
>
> Unwind section '.IA_64.unwind' at offset 0x98 contains 1 entries:
>
> <foo>: [0x0-0x40], info at +0x0
> v1, flags=0x0 (), len=8 bytes
> R1:prologue(rlen=1)
> P7:rp_when(t=0)
> P3:rp_gr(reg=r2)
> R1:prologue(rlen=0)
> R1:prologue(rlen=0)
> R1:prologue(rlen=0)
>
> The region length should be 15, but instead it comes out as 1. It
> seems that .align is handled correctly only inside .body, not inside
> .prologue, which must work, too.
>
> Hopefully, this is easy to fix?
>
It is not easy to fix. The problem is the assembler uses the next
instruction after .align to find the region size. With
.align 64
.endp foo
it couldn't tell where a region ends.
H.J.