The new assembler with unwind table bug fix

H. J. Lu hjl@lucon.org
Fri Jan 16 22:56:00 GMT 2004


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.



More information about the Binutils mailing list