This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC] _dl_tlsdesc_resolve_rela issue.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: libc-alpha at sourceware dot org
- Date: Fri, 18 Oct 2013 22:13:18 +0200
- Subject: [RFC] _dl_tlsdesc_resolve_rela issue.
- Authentication-results: sourceware.org; auth=none
Hi, a code for _dl_tlsdesc_resolve_rela is quite magic,
Which variant is true?
a) this code is broken.
b) it uses custom calling convention that passes return pointer in r11
c) a _dl_tlsdesc_resolve_rela_fixup will modify stack to set r11 in
correct location.
Assembly is following:
_dl_tlsdesc_resolve_rela:
cfi_adjust_cfa_offset (8)
/* Save all call-clobbered registers. */
subq $72, %rsp
cfi_adjust_cfa_offset (72)
...
movq %r11, 48(%rsp)
movq %rdx, 56(%rsp)
movq %rcx, 64(%rsp)
call _dl_tlsdesc_resolve_rela_fixup
...
movq 48(%rsp), %r11
movq 56(%rsp), %rdx
movq 64(%rsp), %rcx
addq $80, %rsp
cfi_adjust_cfa_offset (-80)
jmp *(%r11)