1#include "stub.h"
2
3void *(*memcpy_p)(void *dest, const void *src, unsigned long n);
4void *(*memset_p)(void *dest, int c, unsigned long n);
5
6int main() {
7 int a = 0xdeadbeef, b = 0;
8
9 memcpy_p = memcpy;
10 memcpy_p(&b, &a, sizeof(b));
11 if (b != 0xdeadbeef)
12 return 1;
13
14 memset_p = memset;
15 memset_p(&a, 0, sizeof(a));
16 if (a != 0)
17 return 1;
18
19 printf(format: "Test completed\n");
20}
21

source code of bolt/test/Inputs/plt.c