public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix .eh_frame
@ 2003-04-14 15:13 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2003-04-14 15:13 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-04-14 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-14 15:13 [PATCH] Fix .eh_frame Jakub Jelinek

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).