This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] _dl_tlsdesc_resolve_rela issue.


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]