/* SPDX-License-Identifier: GPL-2.0 */ /* * Signal trampolines for 64 bit processes. * * Copyright (C) 2006 Randolph Chung <tausq@debian.org> * Copyright (C) 2018-2022 Helge Deller <deller@gmx.de> * Copyright (C) 2022 John David Anglin <dave.anglin@bell.net>
*/
#include <asm/unistd.h>
#include <linux/linkage.h>
#include <generated/asm-offsets.h>
.text
/* Gdb expects the trampoline is on the stack and the pc is offset from a 64-byte boundary by 0, 4 or 5 instructions. Since the vdso trampoline is not on the stack, we need a new variant with different offsets and data to tell gdb where to find the signal context on the stack.
Here we put the offset to the context data at the start of the trampoline region and offset the first trampoline by 2 instructions. Please do not change the trampoline as the code in gdb depends on the following instruction sequence exactly.
*/
.align 64
.word SIGFRAME_CONTEXT_REGS
/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from the return address to get an address in the middle of the presumed call instruction. Since we don't have a call here, we artifically extend the range covered by the unwind info by adding a nop before the real start.
*/
nop
/* This is where the mcontext_t struct can be found on the stack. */
#define PTREGS SIGFRAME_CONTEXT_REGS /* 64-bit process offset is -720 */
/* Register REGNO can be found at offset OFS of the mcontext_t structure. */
.macro rsave regno,ofs
.byte 0x05 /* DW_CFA_offset_extended */
.uleb128 \regno; /* regno */
.uleb128 \ofs /* factored offset */
.endm
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.