From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111639 invoked by alias); 15 Oct 2019 10:18:57 -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 111336 invoked by uid 89); 15 Oct 2019 10:18:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=promoting, closely X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Oct 2019 10:18:55 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6898DAEF5; Tue, 15 Oct 2019 10:18:53 +0000 (UTC) Subject: [RFC] Do we need to support PIE + stabs? To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20190816155753.GA22229@delia> <87y2xudlj5.fsf@tromey.com> From: Tom de Vries Message-ID: <79870605-9b6b-bee0-ea91-99303c79f220@suse.de> Date: Tue, 15 Oct 2019 10:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <87y2xudlj5.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00408.txt.bz2 [ was: Re: [PATCH][gdb/symtab] Handle gas-generated stabs with -fPIE/-pie ] On 09-10-2019 16:46, Tom Tromey wrote: >>>>>> "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. I don't know the answer to that, and I think it's a question broader than suggested by the current subject, so, promoting the question to the subject. Thanks, - Tom