diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fa99db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.~lock.*.pptx# diff --git a/presentation/Makefile b/presentation/Makefile new file mode 100644 index 0000000..4808722 --- /dev/null +++ b/presentation/Makefile @@ -0,0 +1,10 @@ +SRC=example.c +CC=gcc + +build: nopie pie + +nopie: + $(CC) -no-pie -o example.nopie example.c + +pie: + $(CC) -pie -o example.pie example.c diff --git a/presentation/example.c b/presentation/example.c new file mode 100644 index 0000000..8847371 --- /dev/null +++ b/presentation/example.c @@ -0,0 +1,11 @@ +#include + +void some_function() { + puts("Hello, world!\n"); +} + +int main() { + void (*function)() = &some_function; + printf("some_function is located at %p\n", function); + return 0; +} diff --git a/presentation/example.nopie b/presentation/example.nopie new file mode 100755 index 0000000..2acf05f Binary files /dev/null and b/presentation/example.nopie differ diff --git a/presentation/example.pie b/presentation/example.pie new file mode 100755 index 0000000..00123e3 Binary files /dev/null and b/presentation/example.pie differ