summaryrefslogtreecommitdiff
path: root/src/signal/x86_64/restore.s
AgeCommit message (Collapse)AuthorFilesLines
2018-09-12apply hidden visibility to sigreturn code fragmentsRich Felker1-0/+1
these were overlooked in the declarations overhaul work because they are not properly declared, and the current framework even allows their declared types to vary by arch. at some point this should be cleaned up, but I'm not sure what the right way would be.
2016-11-12work around gdb issues recognizing sigreturn trampoline on x86_64Rich Felker1-4/+3
gdb can only backtrace/unwind across signal handlers if it recognizes the sa_restorer trampoline. for x86_64, gdb first attempts to determine the symbol name for the function in which the program counter resides and match it against "__restore_rt". if no name can be found (e.g. in the case of a stripped binary), the exact instruction sequence is matched instead. when matching the function name, however, gdb's unwind code wrongly considers the interval [sym,sym+size] rather than [sym,sym+size). thus, if __restore_rt begins immediately after another function, gdb wrongly identifies pc as lying within the previous adjacent function. this patch adds a nop before __restore_rt to preclude that possibility. it also removes the symbol name __restore and replaces it with a macro since the stability of whether gdb identifies the function as __restore_rt or __restore is not clear. for the no-symbols case, the instruction sequence is changed to use %rax rather than %eax to match what gdb expects. based on patch by Szabolcs Nagy, with extended description and corresponding x32 changes added.
2011-06-14restore use of .type in asm, but use modern @function (vs %function)Rich Felker1-0/+2
this seems to be necessary to make the linker accept the functions in a shared library (perhaps to generate PLT entries?) strictly speaking libc-internal asm should not need it. i might clean that up later.
2011-06-13remove all .size and .type directives for functions from the asmRich Felker1-5/+0
these are useless and have caused problems for users trying to build with non-gnu tools like tcc's assembler.
2011-02-15Port musl to x86-64. One giant commit!Nicholas J. Kain1-0/+11