Some fixups to the CFI directives for PLT stub entry points.
authorjhb <jhb@FreeBSD.org>
Fri, 10 Nov 2017 01:17:26 +0000 (01:17 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 10 Nov 2017 01:17:26 +0000 (01:17 +0000)
commit73e564150ada7ab56873d6effa557311742852b8
tree460de11631264fe614b014992813a778fcb1d35b
parentf77a4e7d64a11b5bb306794f15cd44de56699003
Some fixups to the CFI directives for PLT stub entry points.

The directives I added in r323466 and r323501 did not define a valid
CFA until several instructions into the associated functions.  This
triggers an assertion in GDB when generating a stack trace while
stopped at the first instruction of PLT stub entry point since there
is no valid CFA rule for the first instruction.

This is probably just wrong on my part as the non-simple .cfi_startproc
would have defined a valid CFA.  Instead, define a valid CFA as sp + 0
at the start of the functions and then use .cfa_def_offset to change the
offset when sp is adjusted later in the function.

Sponsored by: DARPA / AFRL
libexec/rtld-elf/mips/rtld_start.S