public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, Roland McGrath <roland@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix .eh_frame
Date: Mon, 14 Apr 2003 15:13:00 -0000	[thread overview]
Message-ID: <20030414151329.GN16629@sunsite.ms.mff.cuni.cz> (raw)

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

                 reply	other threads:[~2003-04-14 15:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030414151329.GN16629@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).