Commit Graph

6 Commits

Author SHA1 Message Date
Dmitry Vyukov
3aa380090f sys/syz-extract: extract constants from ELF
Add a second mode that extracts constant values from
ELF object, instead of running the executable.
This allows to not (1) link binaries, (2) use proper cross-compiler.
It finally fixes 386/arm extracts for my distro.
Hopefully not makes things worse for others,
should generally be safer/more reliable.
The current mode is left b/c I can't test all OSes,
windows binaries are not ELF, so we may need it anyway.
But later we may switch more OSes to this new mode
if they break (fuchsia?).
2019-12-02 14:36:47 +01:00
Marco Vanotti
6aad7497a8 sys/syz-extract: Add "DefineGlibcUse" flag.
Instead of defining the __GLIBC_USE macro on every OS, we are just
defining it based on a parameter. That parameter is set to false for all
OSs except for fuchsia.
2019-07-16 16:34:29 +02:00
Joey Jiao
8aa587b0a1 sys/syz-extract: add -includedirs option
Kernel modules are in different directories in some cases,
so to include the headers in the module dir or other directories
the includedirs flag is added.
ex: -includedirs path1/include,path2/include
2019-01-19 12:30:10 +01:00
Dmitry Vyukov
3439016dc2 sys/akaros: add all syscalls 2018-07-06 20:19:03 +02:00
zoulasc
3520854be0 syz-extract: select declaring printf or not
Kernels are standalone implementations and can have their own
implementations of functions that have different prototypes than
the standard ones. In the NetBSD case the kernel printf returns
void, and it is declared in <sys/systm.h> so avoid re-declaring it.
Select if we are going to declare printf or not depending on the OS.
2017-11-06 11:27:45 +03:00
Dmitry Vyukov
7553c19941 sys/syz-extract: support akaros 2017-10-16 14:21:54 +02:00