From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29416 invoked by alias); 14 Apr 2003 15:13:33 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 29400 invoked from network); 14 Apr 2003 15:13:32 -0000 Received: from unknown (HELO localhost.localdomain) (195.113.19.66) by sources.redhat.com with SMTP; 14 Apr 2003 15:13:32 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h3EFDUqO027535; Mon, 14 Apr 2003 17:13:30 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id h3EFDTPB027531; Mon, 14 Apr 2003 17:13:29 +0200 Date: Mon, 14 Apr 2003 15:13:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Roland McGrath Cc: Glibc hackers Subject: [PATCH] Fix .eh_frame Message-ID: <20030414151329.GN16629@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-04/txt/msg00042.txt.bz2 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 * 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