This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] mips: terminate the FDE before the return trampoline in makecontext
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: Aurelien Jarno <aurelien at aurel32 dot net>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 29 Mar 2016 14:09:09 +0100
- Subject: Re: [PATCH] mips: terminate the FDE before the return trampoline in makecontext
- Authentication-results: sourceware.org; auth=none
- References: <1457509993-2393-1-git-send-email-aurelien at aurel32 dot net> <alpine dot DEB dot 2 dot 00 dot 1603222100420 dot 9427 at tp dot orcam dot me dot uk> <20160323064152 dot GA9676 at aurel32 dot net>
On Wed, 23 Mar 2016, Aurelien Jarno wrote:
> > What's this NOP needed for here?
>
> We have to separate these to blocks because the unwinder uses ra-1 to
> find the FDE.
Ah indeed, I remember now, thanks!
For the record: I found that bloody piece when trying to make GDB
interpret DWARF records correctly for compressed code. The choice to use
PC-1 in the unwinder arbitrarily across all architectures broke DWARF
record interpretation in the MIPS port of GDB as the calculation flips the
ISA bit. Since it's been like that from the beginning and consequently
encoded across binaries out there handling GDB had to be adjusted to
painfully recover the ISA bit from the symbol table as DWARF records are
interpreted (while the DWARF records should have sufficed by themselves).
If I had designed this part of the unwinder, I'd have made the adjustment
target-specific and specifically PC-2 for the MIPS target, i.e. the
minimum instruction size in the ISA (a rule which should actually work
universally I believe).
FWIW,
Maciej