This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] aarch64: Clean up _dl_runtime_resolve
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: rth at twiddle dot net, libc-alpha at sourceware dot org
- Cc: nd at arm dot com, marcus dot shawcroft at linaro dot org, Richard Henderson <richard dot henderson at linaro dot org>
- Date: Thu, 2 Aug 2018 17:03:15 +0100
- Subject: Re: [PATCH 1/3] aarch64: Clean up _dl_runtime_resolve
- References: <20180801222347.18903-1-rth@twiddle.net> <20180801222347.18903-2-rth@twiddle.net>
On 01/08/18 23:23, rth@twiddle.net wrote:
From: Richard Henderson <richard.henderson@linaro.org>
* sysdeps/aarch64/dl-trampoline.S (_dl_runtime_resolve):
Do not record unwind info for arguments; this is unneeded;
do not save x9 just to have a register to pair with x8;
properly include the 16 bytes of PLT stack into the unwind;
create a frame pointer with the spare stack slot;
rearrange the exit to only adjust the stack once.
i thought the cfi annotations were needed for all registers
in case the debugger wants to investigate register content
across a _dl_runtime_resolve frame (possibly several frames
up in the call stack), this may not be a common use case though
and i don't know what's the convention in glibc asm, the compiler
seems to emit annotation for all spilled registers with -g.
--- a/sysdeps/aarch64/dl-trampoline.S
+++ b/sysdeps/aarch64/dl-trampoline.S
@@ -32,7 +32,6 @@
.text
.globl _dl_runtime_resolve
.type _dl_runtime_resolve, #function
- cfi_startproc
.align 2
_dl_runtime_resolve:
/* AArch64 we get called with:
@@ -41,46 +40,24 @@ _dl_runtime_resolve:
[sp, #8] lr
[sp, #0] &PLTGOT[n]
*/
-
+ cfi_startproc
is there a problem keeping it at its original place above?
the tlsdesc asm has cfi_startproc at the same place.
otherwise the patch looks ok.