From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11625 invoked by alias); 12 May 2006 05:39:56 -0000 Received: (qmail 11615 invoked by uid 22791); 12 May 2006 05:39:55 -0000 X-Spam-Check-By: sourceware.org Received: from smtp111.sbc.mail.mud.yahoo.com (HELO smtp111.sbc.mail.mud.yahoo.com) (68.142.198.210) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 12 May 2006 05:39:53 +0000 Received: (qmail 93813 invoked from network); 12 May 2006 05:39:51 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.87.95 with login) by smtp111.sbc.mail.mud.yahoo.com with SMTP; 12 May 2006 05:39:51 -0000 Received: by lucon.org (Postfix, from userid 1000) id 46278641A3; Thu, 11 May 2006 22:39:50 -0700 (PDT) Date: Fri, 12 May 2006 17:05:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Subject: How to get the padding size for the next section? Message-ID: <20060512053950.GA26440@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00234.txt.bz2 We don't handle .eh_frame section padding properly: http://sourceware.org/bugzilla/show_bug.cgi?id=2655 When we pad the current .eh_frame section for the alignment of the next .eh_frame section, we need to know the padding size. Otherwise, the last FDE size may be wrong. Currently, we assume that all .eh_frame sections have the same alignment. It isn't true for x86-64 since the .eh_frame section in crtend.o from gcc has 4 byte alignment. Ideally, _bfd_elf_write_section_eh_frame knows the real alignment of the next .eh_frame section. But this info is hard to come by. A kludge may be to force 8 byte alignment on .eh_frame for x86-64 when we see a 4 byte alignment. H.J.