mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
makesyscalls: generate private syscall symbols
For libsys we need to expose all the private symbols (_ and __sys_ prefixes) so libsys can replace the libc versions. Rather than trying to maintain a table, teach makesyscalls to generate it. There are a small number of "_" prefixed symbols that are exposed as public interfaces rather than in the private symbol space. Since the list is short, just hardcode it for now. If doesn't appear that we need to export freebsd#_foo symbols for compat system calls explicitly. If it turns out we do, there are probably few enough of them to handle seperately. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
This commit is contained in:
parent
10f1b536ad
commit
b71defdbd8
|
@ -42,6 +42,7 @@ local generated_tag = "@" .. "generated"
|
||||||
local config = {
|
local config = {
|
||||||
os_id_keyword = "FreeBSD", -- obsolete, ignored on input, not generated
|
os_id_keyword = "FreeBSD", -- obsolete, ignored on input, not generated
|
||||||
abi_func_prefix = "",
|
abi_func_prefix = "",
|
||||||
|
libsysmap = "/dev/null",
|
||||||
sysnames = "syscalls.c",
|
sysnames = "syscalls.c",
|
||||||
sysproto = "../sys/sysproto.h",
|
sysproto = "../sys/sysproto.h",
|
||||||
sysproto_h = "_SYS_SYSPROTO_H_",
|
sysproto_h = "_SYS_SYSPROTO_H_",
|
||||||
|
@ -85,6 +86,7 @@ local output_files = {
|
||||||
"sysnames",
|
"sysnames",
|
||||||
"syshdr",
|
"syshdr",
|
||||||
"sysmk",
|
"sysmk",
|
||||||
|
"libsysmap",
|
||||||
"syssw",
|
"syssw",
|
||||||
"systrace",
|
"systrace",
|
||||||
"sysproto",
|
"sysproto",
|
||||||
|
@ -922,6 +924,12 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype,
|
||||||
config.syscallprefix, funcalias, sysnum))
|
config.syscallprefix, funcalias, sysnum))
|
||||||
write_line("sysmk", string.format(" \\\n\t%s.o",
|
write_line("sysmk", string.format(" \\\n\t%s.o",
|
||||||
funcalias))
|
funcalias))
|
||||||
|
if funcalias ~= "exit" and funcalias ~= "getlogin" and funcalias ~= "vfork" then
|
||||||
|
write_line("libsysmap", string.format("\t_%s;\n",
|
||||||
|
funcalias))
|
||||||
|
end
|
||||||
|
write_line("libsysmap", string.format("\t__sys_%s;\n",
|
||||||
|
funcalias))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1485,6 +1493,13 @@ write_line("sysmk", string.format([[# FreeBSD system call object files.
|
||||||
# DO NOT EDIT-- this file is automatically %s.
|
# DO NOT EDIT-- this file is automatically %s.
|
||||||
MIASM = ]], generated_tag))
|
MIASM = ]], generated_tag))
|
||||||
|
|
||||||
|
write_line("libsysmap", string.format([[/*
|
||||||
|
* FreeBSD system call symbols.
|
||||||
|
* DO NOT EDIT-- this file is automatically %s.
|
||||||
|
*/
|
||||||
|
FBSDprivate_1.0 {
|
||||||
|
]], generated_tag))
|
||||||
|
|
||||||
write_line("systrace", string.format([[/*
|
write_line("systrace", string.format([[/*
|
||||||
* System call argument to DTrace register array converstion.
|
* System call argument to DTrace register array converstion.
|
||||||
*
|
*
|
||||||
|
@ -1548,6 +1563,7 @@ write_line("sysprotoend", string.format([[
|
||||||
]], config.sysproto_h))
|
]], config.sysproto_h))
|
||||||
|
|
||||||
write_line("sysmk", "\n")
|
write_line("sysmk", "\n")
|
||||||
|
write_line("libsysmap", "};\n")
|
||||||
write_line("sysent", "};\n")
|
write_line("sysent", "};\n")
|
||||||
write_line("sysnames", "};\n")
|
write_line("sysnames", "};\n")
|
||||||
-- maxsyscall is the highest seen; MAXSYSCALL should be one higher
|
-- maxsyscall is the highest seen; MAXSYSCALL should be one higher
|
||||||
|
|
Loading…
Reference in a new issue