diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-08-23 19:46:30 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-08-23 19:46:30 (GMT) |
commit | 3c5bdffd74d21f6c156730a91d3c78b59eb83b42 (patch) | |
tree | af5f6fd7ef987ce2668c32feecb4bca2cb96ce91 /misc | |
parent | 27d9a07db9d3bc2027003ba218acee940ae7ed3f (diff) |
Added binary diffing examples.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 16 | ||||
-rw-r--r-- | misc/elf2diff.c | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile new file mode 100644 index 0000000..a087b0b --- /dev/null +++ b/misc/Makefile @@ -0,0 +1,16 @@ + +BINARIES=elf2diff1 elf2diff2 hole + +all: $(BINARIES) + +hole: hole.cpp + g++ -o $@ $< + +elf2diff1: elf2diff.c + arm-linux-gnueabi-gcc -o $@ -DNUMBER=1 $< + +elf2diff2: elf2diff.c + arm-linux-gnueabi-gcc -o $@ -DNUMBER=2 $< + +clean: + rm -f $(BINARIES) *~ diff --git a/misc/elf2diff.c b/misc/elf2diff.c new file mode 100644 index 0000000..1057d3c --- /dev/null +++ b/misc/elf2diff.c @@ -0,0 +1,16 @@ + +#include <stdio.h> + +static void show_me(int n) +{ + printf("Hello World %d\n", n); + +} + +int main(void) +{ + show_me(NUMBER); + + return 0; + +} |