From 70aa5968a72030aff10fbdb1cb2c1c6c08de5fec Mon Sep 17 00:00:00 2001 From: Feng Tang Date: Thu, 3 Jun 2010 11:00:22 +0800 Subject: elflink: copy some elflink related files over also make sure the compiling passed --- com32/elflink/modules/hello.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 com32/elflink/modules/hello.c (limited to 'com32/elflink/modules/hello.c') diff --git a/com32/elflink/modules/hello.c b/com32/elflink/modules/hello.c new file mode 100644 index 00000000..3db23536 --- /dev/null +++ b/com32/elflink/modules/hello.c @@ -0,0 +1,31 @@ +/* + * hello.c - A simple ELF module that sorts a couple of numbers + * + * Created on: Aug 11, 2008 + * Author: Stefan Bucur + */ + +#include +#include +#include + +#include "sort.h" + +#define NUM_COUNT 10 +#define MAX_NUM 100 + +//static int hello_main(int argc, char **argv) +int hello_main(int argc, char **argv) +{ + int *nums = NULL; + int i; + + nums = malloc(NUM_COUNT * sizeof(int)); + printf("Hello, world, from 0x%08X! malloc return %p\n", (unsigned int)&hello_main), nums; + + free(nums); + + return 0; +} + +MODULE_MAIN(hello_main); -- cgit