From 6803c37be83f0c97c95870a18cb230e135a131c9 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Tue, 15 May 2018 15:10:16 +0100 Subject: Reorganise runtime libraries provided by KLEE Strictly differentiate between the following type of libraries: * FreeStanding: contains minimal amount of methods a compiler would expect * klee-libc: contains a minimal libc implementation * POSIX: contains a POSIX layer that can be used on top of a libc implementation * Intrinsic: contains additional runtime functions which provide KLEE-specific functionalities, (e.g. checks) Builds always archives instead of single modules. This allows to reduce linked-in dependencies of tested applications. --- runtime/FreeStanding/memset.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 runtime/FreeStanding/memset.c (limited to 'runtime/FreeStanding/memset.c') diff --git a/runtime/FreeStanding/memset.c b/runtime/FreeStanding/memset.c new file mode 100644 index 00000000..b439001e --- /dev/null +++ b/runtime/FreeStanding/memset.c @@ -0,0 +1,17 @@ +/*===-- memset.c ----------------------------------------------------------===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===*/ + +#include + +void *memset(void *dst, int s, size_t count) { + char *a = dst; + while (count-- > 0) + *a++ = s; + return dst; +} -- cgit 1.4.1