if (vdso->rt_sigreturn_ofs) {
default_rt_sigreturn = load_addr + vdso->rt_sigreturn_ofs;
}
+ if (vdso->sigreturn_region_start_ofs) {
+ vdso_sigreturn_region_start =
+ load_addr + vdso->sigreturn_region_start_ofs;
+ vdso_sigreturn_region_end = load_addr + vdso->sigreturn_region_end_ofs;
+ }
/* Remove write from VDSO segment. */
target_mprotect(info->start_data, info->end_data - info->start_data,
if (sigreturn_sym && strcmp(sigreturn_sym, name) == 0) {
sigreturn_addr = sym.st_value;
- }
- if (rt_sigreturn_sym && strcmp(rt_sigreturn_sym, name) == 0) {
+ } else if (rt_sigreturn_sym && strcmp(rt_sigreturn_sym, name) == 0) {
rt_sigreturn_addr = sym.st_value;
+ } else if (strcmp("sigreturn_region_start", name) == 0) {
+ sigreturn_region_start_addr = sym.st_value;
+ } else if (strcmp("sigreturn_region_end", name) == 0) {
+ sigreturn_region_end_addr = sym.st_value;
}
}
}
static unsigned sigreturn_addr;
static unsigned rt_sigreturn_addr;
+static unsigned sigreturn_region_start_addr;
+static unsigned sigreturn_region_end_addr;
#define N 32
#define elfN(x) elf32_##x
fprintf(outf, " .reloc_count = ARRAY_SIZE(%s_relocs),\n", prefix);
fprintf(outf, " .sigreturn_ofs = 0x%x,\n", sigreturn_addr);
fprintf(outf, " .rt_sigreturn_ofs = 0x%x,\n", rt_sigreturn_addr);
+ fprintf(outf, " .sigreturn_region_start_ofs = 0x%x,\n",
+ sigreturn_region_start_addr);
+ fprintf(outf, " .sigreturn_region_end_ofs = 0x%x,\n",
+ sigreturn_region_end_addr);
fprintf(outf, "};\n");
ret = EXIT_SUCCESS;
unsigned reloc_count;
unsigned sigreturn_ofs;
unsigned rt_sigreturn_ofs;
+ unsigned sigreturn_region_start_ofs;
+ unsigned sigreturn_region_end_ofs;
} VdsoImageInfo;
/* Note that both Elf32_Word and Elf64_Word are uint32_t. */
/* Fallback addresses into sigtramp page. */
extern abi_ulong default_sigreturn;
extern abi_ulong default_rt_sigreturn;
+extern abi_ulong vdso_sigreturn_region_start;
+extern abi_ulong vdso_sigreturn_region_end;
void setup_sigtramp(abi_ulong tramp_page);
/* Fallback addresses into sigtramp page. */
abi_ulong default_sigreturn;
abi_ulong default_rt_sigreturn;
+abi_ulong vdso_sigreturn_region_start;
+abi_ulong vdso_sigreturn_region_end;
/*
* System includes define _NSIG as SIGRTMAX + 1, but qemu (like the kernel)