public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/symtab] Handle gas-generated stabs with -fPIE/-pie
Date: Wed, 09 Oct 2019 14:47:00 -0000	[thread overview]
Message-ID: <87y2xudlj5.fsf@tromey.com> (raw)
In-Reply-To: <20190816155753.GA22229@delia> (Tom de Vries's message of "Fri,	16 Aug 2019 17:57:55 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> 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  <tdevries@suse.de>

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

  parent reply	other threads:[~2019-10-09 14:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 15:58 Tom de Vries
2019-08-29 15:04 ` [PING][PATCH][gdb/symtab] " Tom de Vries
2019-09-06 15:31   ` [PING^2][PATCH][gdb/symtab] " Tom de Vries
2019-09-13 19:51     ` [PING^3][PATCH][gdb/symtab] " Tom de Vries
2019-10-09 14:47 ` Tom Tromey [this message]
2019-10-15 10:18   ` [RFC] Do we need to support PIE + stabs? Tom de Vries
2019-10-25 14:39     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2xudlj5.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).