[PATCH] Fix .eh_frame
Jakub Jelinek
jakub@redhat.com
Mon Apr 14 15:13:00 GMT 2003
Hi!
This is just a quick patch to fix the .eh_frame.
This is still a ticking bomb, as DW_CFA_advance_loc can overflow
into DW_CFA_offset or even DW_CFA_restore without giving any errors from
assembly. The right thing to do is to use DW_CFA_advance_loc4 everywhere
and rely on gas optimizations, because that should be able to create the
same .eh_frame as one can do manually and at the same time not generate
garbage if distance of two labels suddenly grows to 64, 256 or 65536 bytes.
Unfortunately, it seems gas ATM doesn't cope with the gcc 3.x augmentation,
will look at it.
2003-04-14 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
DW_CFA_advance_loc2 for .Laddl-.Lsubl.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
DW_CFA_advance_loc for .Laddl-.Lsubl.
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S.jj 2003-04-14 01:11:34.000000000 -0400
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2003-04-14 09:40:26.000000000 -0400
@@ -412,7 +412,8 @@ versioned_symbol (libpthread, __pthread_
.byte 0x40+.Lsubl-.Lpush4 # DW_CFA_advance_loc+N
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 64
- .byte 0x40+.Laddl-.Lsubl # DW_CFA_advance_loc+N
+ .byte 3 # DW_CFA_advance_loc2
+ .2byte .Laddl-.Lsubl
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 20
.byte 0x40+.Lpop_ebx-.Laddl # DW_CFA_advance_loc+N
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S.jj 2003-04-14 01:00:51.000000000 -0400
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2003-04-14 09:48:54.000000000 -0400
@@ -376,7 +376,8 @@ versioned_symbol (libpthread, __pthread_
.byte 0x40+.Lsubl-.Lpush4 # DW_CFA_advance_loc+N
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 52
- .byte 0x40+.Laddl-.Lsubl # DW_CFA_advance_loc+N
+ .byte 2 # DW_CFA_advance_loc1
+ .byte .Laddl-.Lsubl
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16
.byte 0x40+ .Lpop_ebx-.Laddl # DW_CFA_advance_loc+N
Jakub
More information about the Libc-hacker
mailing list