This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.25-542-ge535139
- From: nsz at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 21 Jun 2017 14:05:14 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-542-ge535139
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via e535139e82e5a4bb0ed63b0b5165f03a9b2d0e52 (commit)
from daa9bdb607e962726cc733c9b82c01bd68765736 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e535139e82e5a4bb0ed63b0b5165f03a9b2d0e52
commit e535139e82e5a4bb0ed63b0b5165f03a9b2d0e52
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Wed Jun 21 15:01:18 2017 +0100
[AArch64] Add more cfi annotations to tlsdesc entry points
Backtrace through _dl_tlsdesc_resolve_rela was broken because the offset
of x30 from cfa was not in the debug info.
Add enough annotation so backtracing from the dynamic linker through
tlsdesc entry points works and the debugger shows registers correctly.
diff --git a/ChangeLog b/ChangeLog
index 3c9d6ba..22889ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,12 @@
2017-06-21 Szabolcs Nagy <szabolcs.nagy@arm.com>
+ * sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Add cfi
+ annotation.
+ (_dl_tlsdesc_resolve_rela, _dl_tlsdesc_resolve_hold): Likewise.
+
+2017-06-21 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
* sysdeps/aarch64/dl-machine.h (RTLD_START_1): Change _dl_argv to the
hidden __GI__dl_argv symbol.
diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
index 94679a0..a70cfd5 100644
--- a/sysdeps/aarch64/dl-tlsdesc.S
+++ b/sysdeps/aarch64/dl-tlsdesc.S
@@ -176,6 +176,8 @@ _dl_tlsdesc_dynamic:
# define NSAVEXREGPAIRS 2
stp x29, x30, [sp,#-(32+16*NSAVEXREGPAIRS)]!
cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
+ cfi_rel_offset (x29, 0)
+ cfi_rel_offset (x30, 8)
mov x29, sp
DELOUSE (0)
@@ -184,6 +186,10 @@ _dl_tlsdesc_dynamic:
stp x1, x2, [sp, #32+16*0]
stp x3, x4, [sp, #32+16*1]
+ cfi_rel_offset (x1, 32)
+ cfi_rel_offset (x2, 32+8)
+ cfi_rel_offset (x3, 32+16)
+ cfi_rel_offset (x4, 32+24)
mrs x4, tpidr_el0
/* The ldar here happens after the load from [x0] at the call site
@@ -213,6 +219,8 @@ _dl_tlsdesc_dynamic:
ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)
+ cfi_restore (x29)
+ cfi_restore (x30)
# undef NSAVEXREGPAIRS
RET
2:
@@ -230,6 +238,20 @@ _dl_tlsdesc_dynamic:
stp x13, x14, [sp, #16*4]
stp x15, x16, [sp, #16*5]
stp x17, x18, [sp, #16*6]
+ cfi_rel_offset (x5, 0)
+ cfi_rel_offset (x6, 8)
+ cfi_rel_offset (x7, 16)
+ cfi_rel_offset (x8, 16+8)
+ cfi_rel_offset (x9, 16*2)
+ cfi_rel_offset (x10, 16*2+8)
+ cfi_rel_offset (x11, 16*3)
+ cfi_rel_offset (x12, 16*3+8)
+ cfi_rel_offset (x13, 16*4)
+ cfi_rel_offset (x14, 16*4+8)
+ cfi_rel_offset (x15, 16*5)
+ cfi_rel_offset (x16, 16*5+8)
+ cfi_rel_offset (x17, 16*6)
+ cfi_rel_offset (x18, 16*6+8)
SAVE_Q_REGISTERS
@@ -268,8 +290,14 @@ _dl_tlsdesc_dynamic:
.align 2
_dl_tlsdesc_resolve_rela:
#define NSAVEXREGPAIRS 9
+ /* The tlsdesc PLT entry pushes x2 and x3 to the stack. */
+ cfi_adjust_cfa_offset (16)
+ cfi_rel_offset (x2, 0)
+ cfi_rel_offset (x3, 8)
stp x29, x30, [sp, #-(32+16*NSAVEXREGPAIRS)]!
cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
+ cfi_rel_offset (x29, 0)
+ cfi_rel_offset (x30, 8)
mov x29, sp
stp x1, x4, [sp, #32+16*0]
stp x5, x6, [sp, #32+16*1]
@@ -280,6 +308,23 @@ _dl_tlsdesc_resolve_rela:
stp x15, x16, [sp, #32+16*6]
stp x17, x18, [sp, #32+16*7]
str x0, [sp, #32+16*8]
+ cfi_rel_offset (x1, 32)
+ cfi_rel_offset (x4, 32+8)
+ cfi_rel_offset (x5, 32+16)
+ cfi_rel_offset (x6, 32+16+8)
+ cfi_rel_offset (x7, 32+16*2)
+ cfi_rel_offset (x8, 32+16*2+8)
+ cfi_rel_offset (x9, 32+16*3)
+ cfi_rel_offset (x10, 32+16*3+8)
+ cfi_rel_offset (x11, 32+16*4)
+ cfi_rel_offset (x12, 32+16*4+8)
+ cfi_rel_offset (x13, 32+16*5)
+ cfi_rel_offset (x14, 32+16*5+8)
+ cfi_rel_offset (x15, 32+16*6)
+ cfi_rel_offset (x16, 32+16*6+8)
+ cfi_rel_offset (x17, 32+16*7)
+ cfi_rel_offset (x18, 32+16*7+8)
+ cfi_rel_offset (x0, 32+16*8)
SAVE_Q_REGISTERS
@@ -304,6 +349,8 @@ _dl_tlsdesc_resolve_rela:
ldp x17, x18, [sp, #32+16*7]
ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)
+ cfi_restore (x29)
+ cfi_restore (x30)
ldp x2, x3, [sp], #16
cfi_adjust_cfa_offset (-16)
RET
@@ -332,6 +379,8 @@ _dl_tlsdesc_resolve_hold:
1:
stp x29, x30, [sp, #-(32+16*NSAVEXREGPAIRS)]!
cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
+ cfi_rel_offset (x29, 0)
+ cfi_rel_offset (x30, 8)
mov x29, sp
stp x1, x2, [sp, #32+16*0]
stp x3, x4, [sp, #32+16*1]
@@ -343,6 +392,25 @@ _dl_tlsdesc_resolve_hold:
stp x15, x16, [sp, #32+16*7]
stp x17, x18, [sp, #32+16*8]
str x0, [sp, #32+16*9]
+ cfi_rel_offset (x1, 32)
+ cfi_rel_offset (x2, 32+8)
+ cfi_rel_offset (x3, 32+16)
+ cfi_rel_offset (x4, 32+16+8)
+ cfi_rel_offset (x5, 32+16*2)
+ cfi_rel_offset (x6, 32+16*2+8)
+ cfi_rel_offset (x7, 32+16*3)
+ cfi_rel_offset (x8, 32+16*3+8)
+ cfi_rel_offset (x9, 32+16*4)
+ cfi_rel_offset (x10, 32+16*4+8)
+ cfi_rel_offset (x11, 32+16*5)
+ cfi_rel_offset (x12, 32+16*5+8)
+ cfi_rel_offset (x13, 32+16*6)
+ cfi_rel_offset (x14, 32+16*6+8)
+ cfi_rel_offset (x15, 32+16*7)
+ cfi_rel_offset (x16, 32+16*7+8)
+ cfi_rel_offset (x17, 32+16*8)
+ cfi_rel_offset (x18, 32+16*8+8)
+ cfi_rel_offset (x0, 32+16*9)
SAVE_Q_REGISTERS
@@ -367,6 +435,8 @@ _dl_tlsdesc_resolve_hold:
ldp x17, x18, [sp, #32+16*8]
ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)
+ cfi_restore (x29)
+ cfi_restore (x30)
RET
cfi_endproc
.size _dl_tlsdesc_resolve_hold, .-_dl_tlsdesc_resolve_hold
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 +++
sysdeps/aarch64/dl-tlsdesc.S | 70 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources