From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56773 invoked by alias); 9 Oct 2019 14:47:48 -0000 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 Received: (qmail 56762 invoked by uid 89); 9 Oct 2019 14:47:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=12497, FUN X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.146.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Oct 2019 14:47:45 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 5DF259D838 for ; Wed, 9 Oct 2019 09:46:23 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id IDENiXCLdHunhIDENiD1Ws; Wed, 09 Oct 2019 09:46:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BlibRXdJpzLWFQCC2Dz27vdVdX7wTZHVx8G6nG9JAqs=; b=NZN81HQ8a/GvfZvonGvJr4QNSa vYeFPuuvnN7d43iQ1WvK2KqwT5Bs54GO5dQQtGNWpRq49qXtliQxrjNNBGCTnTJfiRmeNrajpw14+ tbfGlZ6mVKuivzag4w9L+DGYk; Received: from 174-29-53-230.hlrn.qwest.net ([174.29.53.230]:54526 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iIDEM-001AIU-W3; Wed, 09 Oct 2019 08:46:23 -0600 From: Tom Tromey To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH][gdb/symtab] Handle gas-generated stabs with -fPIE/-pie References: <20190816155753.GA22229@delia> Date: Wed, 09 Oct 2019 14:47:00 -0000 In-Reply-To: <20190816155753.GA22229@delia> (Tom de Vries's message of "Fri, 16 Aug 2019 17:57:55 +0200") Message-ID: <87y2xudlj5.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-10/txt/msg00247.txt.bz2 >>>>> "Tom" == Tom de Vries writes: Tom> The main3 function in the executable comes from dw2-ranges3.o, which is Tom> generated like this (leaving out -fPIE -pie for clarity): Tom> ... Tom> $ gcc -S dw2-ranges3.c Tom> $ gcc dw2-ranges3.s -o dw2-ranges3.o -gstabs Tom> ... Tom> So, main3 is described in stabs format, generated by gas. Tom> 2019-08-16 Tom de Vries Tom> PR symtab/12497 Tom> * dbxread.c (process_one_symbol): Handle relocation of SLINE address Tom> without preceding FUN/FNAME. I don't know enough about stabs to say whether this change is correct or whether it will cause problems in some other scenario. It modifies "valu" - which isn't then reset, so perhaps it's used in some other way later. Do we need to support PIE + stabs? Can we just declare stabs as mostly dead and ignore this instead? On the whole that would be my preference, if it's possible, because in my view this more closely mirrors reality... my understanding is that, last time anybody checked, stabs were still used by a few programs in a typical distro (for some unknown reason), but otherwise they are just totally obsolete. Tom