aboutsummaryrefslogtreecommitdiffstats
path: root/bfd/test
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-01-12 15:06:46 +0000
committerbloodstalker <thabogre@gmail.com>2018-01-12 15:06:46 +0000
commit575615c5a41592f3701853f90e1762c6dce4abe4 (patch)
treefca52890bb597c587441db1a99a1d16c63f98694 /bfd/test
parentupdate (diff)
downloadmutator-575615c5a41592f3701853f90e1762c6dce4abe4.tar.gz
mutator-575615c5a41592f3701853f90e1762c6dce4abe4.zip
you can now run objects that are loaded into bruiser from a shared library from lua. right now very simple examples work. i have to figure out how to handles runtime pointer recasts.
Diffstat (limited to '')
-rw-r--r--bfd/test/test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/test/test.c b/bfd/test/test.c
index 7b1e01c..fa9f74d 100644
--- a/bfd/test/test.c
+++ b/bfd/test/test.c
@@ -6,7 +6,8 @@ int myfunc3(void) {return 3;}
int myfunc4(void) {return 4;}
int myfunc5(void) {return 5;}
int myfunc6(void) {return 6;}
-int myfunc7(int a, int b) {return a + b;}
+int add2(int a, int b) {return a + b;}
+int sub2(int a, int b) {return a - b;}
int myvar1 = 1;
int myvar2 = 2;
@@ -15,7 +16,7 @@ int myvar4 = 4;
int main(int argc, char** argv) {
int sum;
- sum = myfunc7(10, 20);
+ sum = add2(10, 20);
printf("i live!\n");
- return myfunc7(10, 20);
+ return sub2(20, 10);
}