summaryrefslogtreecommitdiff
path: root/ELFLoader/_test.cpp
blob: 2d36eb2a6f591225927bbaa6ea84a31f6c91f999 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>

extern "C" const char hello_string[] = "Hello World!";

extern "C" int foo()
{
    volatile int i = 3;
    i = 4;
    return i;
}

extern "C" int bar()
{
    return foo();
}

extern "C" int baz()
{
    return bar();
}

extern "C" int EntryPoint()
{
    puts(hello_string);
    printf("abc!\n");
    printf("def!\n");
    return 10 + baz();
}