summaryrefslogtreecommitdiff
path: root/src/internal/ksigaction.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-09-23 18:33:49 +0000
committerRich Felker <dalias@aerifal.cx>2015-09-23 18:33:49 +0000
commitb61df2294f662540786f2558f691eba7447ff5ba (patch)
tree097e5fc922c4379fe7291f9381fa4fb0b79c1228 /src/internal/ksigaction.h
parent6c5cad2aa56745302c1d42d2c8baf6424d29c0f3 (diff)
downloadmusl-b61df2294f662540786f2558f691eba7447ff5ba.tar.gz
musl-b61df2294f662540786f2558f691eba7447ff5ba.tar.bz2
musl-b61df2294f662540786f2558f691eba7447ff5ba.tar.xz
musl-b61df2294f662540786f2558f691eba7447ff5ba.zip
fix signal return for sh/fdpic
the restorer function pointer provided in the kernel sigaction structure is interpreted by the kernel as a raw code address, not a function descriptor. this commit moves the declarations of the __restore and __restore_rt symbols to ksigaction.h so that arch versions of the file can override them, and introduces a version for sh which declares them as objects rather than functions. an alternate solution would have been defining SA_RESTORER to 0 so that the functions are not used, but this both requires executable stack (since the sh kernel does not have a vdso page with permanent restorer functions) and crashes on qemu user-level emulation.
Diffstat (limited to 'src/internal/ksigaction.h')
-rw-r--r--src/internal/ksigaction.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/internal/ksigaction.h b/src/internal/ksigaction.h
index 2eacabf1..1d8d9646 100644
--- a/src/internal/ksigaction.h
+++ b/src/internal/ksigaction.h
@@ -7,3 +7,5 @@ struct k_sigaction {
void (*restorer)(void);
unsigned mask[2];
};
+
+void __restore(), __restore_rt();