This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Do we need to support PIE + stabs?


[ 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 <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.

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]