36 #include <sys/syscall.h>
37 #if !defined( __GNU_LIBRARY__ ) && (defined(__FreeBSD__) || defined(__APPLE__))
38 #include <sys/sysctl.h>
54 class FreebsdLoader :
public Process::Loader
58 load(
const ProcessParams ¶ms, loader::ObjectFile *obj)
override
60 auto arch = obj->getArch();
61 auto opsys = obj->getOpSys();
72 return new ArmProcess64(params, obj, arch);
74 return new ArmProcess32(params, obj, arch);
78 FreebsdLoader freebsdLoader;
91 #if !defined ( __GNU_LIBRARY__ )
115 uint32_t *hnamep = (uint32_t *)buf.
bufferPtr();
117 size_t *holdlenp = (
size_t *)buf3.
bufferPtr();
119 ret = sysctl((
int *)hnamep, nameLen, holdp, holdlenp, hnewp, newlen);
135 { 3,
"read", readFunc<ArmFreebsd64> },
136 { 4,
"write", writeFunc<ArmFreebsd64> },
138 { 54,
"ioctl", ioctlFunc<ArmFreebsd64> },
139 { 58,
"readlink", readlinkFunc<ArmFreebsd64> },
140 { 117,
"getrusage", getrusageFunc<ArmFreebsd64> },
141 { 189,
"fstat", fstatFunc<ArmFreebsd64> },
142 #if !defined ( __GNU_LIBRARY__ )
148 { 477,
"mmap", mmapFunc<ArmFreebsd64> }
157 process->Process::syscall(tc);