* [PATCH] Fix gas/ehopt.c
@ 2003-04-14 16:23 Jakub Jelinek
2003-04-18 8:07 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2003-04-14 16:23 UTC (permalink / raw)
To: binutils
Hi!
gas doesn't optimize .eh_frame sections like:
.section .eh_frame,"a",@progbits
.Lframe1:
.long .LECIE1-.LSCIE1 # Length of Common Information Entry
.LSCIE1:
.long 0x0 # CIE Identifier Tag
.byte 0x1 # CIE Version
.ascii "zR\0" # CIE Augmentation
.uleb128 0x1 # CIE Code Alignment Factor
.sleb128 -4 # CIE Data Alignment Factor
.byte 0x8 # CIE RA Column
.uleb128 0x1 # Augmentation size
.byte 0x1b # FDE Encoding (pcrel sdata4)
.byte 0xc # DW_CFA_def_cfa
.uleb128 0x4
.uleb128 0x4
.byte 0x88 # DW_CFA_offset, column 0x8
.uleb128 0x1
.align 4
.LECIE1:
.LSFDE1:
.long .LEFDE1-.LASFDE1 # FDE Length
.LASFDE1:
.long .LASFDE1-.Lframe1 # FDE CIE offset
.long .LFB3-. # FDE initial location
.long .LFE3-.LFB3 # FDE address range
.uleb128 0x0 # Augmentation size
.byte 0x4 # DW_CFA_advance_loc4
.long .LCFI0-.LFB3
...
CFA code
.LASFDE1:
(this is classical .eh_frame for -fpic/i386 without try/catch).
The problem is the FDE's augmentation size, ehopt.c apparently
doesn't assume it can be 0.
Fixed thusly, ok to commit?
2003-04-14 Jakub Jelinek <jakub@redhat.com>
* ehopt.c (check_eh_frame): For aug_size == 0
in state_seeing_aug_size state skip the state_skipping_aug
state.
--- gas/ehopt.c.jj 2003-04-14 11:40:25.000000000 -0400
+++ gas/ehopt.c 2003-04-14 12:17:43.000000000 -0400
@@ -1,5 +1,5 @@
/* ehopt.c--optimize gcc exception frame information.
- Copyright 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GAS, the GNU Assembler.
@@ -363,6 +363,8 @@ check_eh_frame (exp, pnbytes)
}
else
d->state = state_error;
+ if (d->state == state_skipping_aug && d->aug_size == 0)
+ d->state = state_wait_loc4;
break;
case state_skipping_aug:
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix gas/ehopt.c
2003-04-14 16:23 [PATCH] Fix gas/ehopt.c Jakub Jelinek
@ 2003-04-18 8:07 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2003-04-18 8:07 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: binutils
Hi Jakub,
> 2003-04-14 Jakub Jelinek <jakub@redhat.com>
>
> * ehopt.c (check_eh_frame): For aug_size == 0
> in state_seeing_aug_size state skip the state_skipping_aug
> state.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-18 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-14 16:23 [PATCH] Fix gas/ehopt.c Jakub Jelinek
2003-04-18 8:07 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).