On Wed, Jan 29, 2020 at 05:34:11AM +0000, Bulekov, Alexander wrote: > A program might rely on functions implemented in vl.c, but implement its > own main(). By placing main into a separate source file, there are no > complaints about duplicate main()s when linking against vl.o. For > example, the virtual-device fuzzer uses a main() provided by libfuzzer, > and needs to perform some initialization before running the softmmu > initialization. Now, main simply calls three vl.c functions which > handle the guest initialization, main loop and cleanup. > > Signed-off-by: Alexander Bulekov <alx...@bu.edu> > --- > Makefile | 1 + > Makefile.objs | 2 ++ > Makefile.target | 2 +- > include/sysemu/sysemu.h | 4 ++++ > main.c | 53 +++++++++++++++++++++++++++++++++++++++++ > vl.c | 36 +++++++--------------------- > 6 files changed, 70 insertions(+), 28 deletions(-) > create mode 100644 main.c
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature