From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2681 invoked by alias); 27 Jun 2008 16:41:29 -0000 Received: (qmail 2671 invoked by uid 22791); 27 Jun 2008 16:41:28 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Jun 2008 16:41:09 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id A97F898411; Fri, 27 Jun 2008 16:41:07 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8909898337; Fri, 27 Jun 2008 16:41:07 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KCH0U-0001KM-Rn; Fri, 27 Jun 2008 12:41:06 -0400 Date: Fri, 27 Jun 2008 17:14:00 -0000 From: Daniel Jacobowitz To: Jonathan Larmour Cc: gdb-patches@sourceware.org Subject: Re: Avoid potential crashes with --gc-sections and low addresses Message-ID: <20080627164106.GB4724@caradoc.them.org> Mail-Followup-To: Jonathan Larmour , gdb-patches@sourceware.org References: <48650919.707@eCosCentric.com> <4865094E.2000004@eCosCentric.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4865094E.2000004@eCosCentric.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00505.txt.bz2 On Fri, Jun 27, 2008 at 04:37:50PM +0100, Jonathan Larmour wrote: > --- gdb/dwarf2-frame.c~ 2008-05-04 00:24:17.000000000 +0100 > +++ gdb/dwarf2-frame.c 2008-06-20 17:06:04.000000000 +0100 > @@ -1795,7 +1795,8 @@ decode_frame_entry_1 (struct comp_unit * > > fde->eh_frame_p = eh_frame_p; > > - add_fde (unit, fde); > + if (fde->initial_location) > + add_fde (unit, fde); > } > > return end; This won't work if there is code actually at zero. Take a look at the .debug_info reader to see how we handled this case for symbolic debug info. -- Daniel Jacobowitz CodeSourcery