From 0c522ec5bfee22c7de54987d316cfbf245a8826e Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Mon, 28 May 2018 18:25:37 +0430 Subject: added test files for the wasm linker. added two scripts to extra-tools --- bruiser/wasm/test/linker/file1.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bruiser/wasm/test/linker/file1.c (limited to 'bruiser/wasm/test/linker/file1.c') diff --git a/bruiser/wasm/test/linker/file1.c b/bruiser/wasm/test/linker/file1.c new file mode 100644 index 0000000..233eaad --- /dev/null +++ b/bruiser/wasm/test/linker/file1.c @@ -0,0 +1,25 @@ +#include +#include +#if 1 +void print(void) { + printf("external symbol"); +} +#endif + +#define CODE_SECTION_1_0 "constant_1_0" +#define CODE_SECTION_1_1 "constant_1_1" +#define CODE_SECTION_1_2 "constant_1_2" +#define CODE_SECTION_1_3 "constant_1_3" +#define CODE_SECTION_1_4 "constant_1_4" + +int g_int_1_0 = 10; +int g_int_1_1 = 11; + +int dummy_f_1_0(int n) { + if (n >= 1) return dummy_f_1_0(n-1) * n; + else return 1; +} + +int dymmy_f_1_1(int n) { + return n*2; +} -- cgit v1.2.3