From e17724b5043da2837fc0b9e395604a4e56aee924 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Wed, 18 Dec 2019 18:37:52 +0100 Subject: [PATCH] Add examples for presentation --- .gitignore | 1 + presentation/Makefile | 10 ++++++++++ presentation/example.c | 11 +++++++++++ presentation/example.nopie | Bin 0 -> 16664 bytes presentation/example.pie | Bin 0 -> 16632 bytes 5 files changed, 22 insertions(+) create mode 100644 .gitignore create mode 100644 presentation/Makefile create mode 100644 presentation/example.c create mode 100755 presentation/example.nopie create mode 100755 presentation/example.pie 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 0000000000000000000000000000000000000000..2acf05f6e47c2574651a8ed2c8c40aa3452fa382 GIT binary patch literal 16664 zcmeHOU2Ggz6~4RcpKTJaH*rdwAMms^$U*VObsN_vB$@SJ#*y<=*C{D9nXJ9*cwxP3 z?asD#UNCZ~y0mHhzysn5@gwB{l|EH@Dv2B=s)&Tc14KnYTBXGeC3R^7QAM+S=gvLr z+3^}GB!mQWRx{_G@0@e*nKO5G@7=lgo4o^lexFY;`NbYV(&4Z!A^R-E^-d`&tV668 zy7;WvB5HtC;n1aqxLsmC=C>8hgUT)dPJZW<{+wTjM6yl{HQU6TBP33KOQfr!&4bmp z$XtY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S|1M>BUCno{D}SCakUvHP%kuXUFp7)vD@pxc;YUpp&ogbwj+M*A3pkwqn)26_ zKex|53g+s?cU}JcyLea`{={{|*q`hBzRRD-?|0YQ7Cet;dzBUz#Sc)TCOH44alQr+ z)M2yIne)#8^-rfi&j)y)Zx0(P?r#58mp{)NrZw9k=(>J)`xjtFeN=V#rEzRT`P-~? zW`E{ap}}aU?ecwm6TWnb?9cO>8){&rLFXj) zXZ{Y9PJax;cs|pR3czTXoaBw{Q{Yn3;aO@6u@jd!s0Cl=5=XPx^ Sjg>3=UsDfGz~$f)#XkVd5mk%; literal 0 HcmV?d00001 diff --git a/presentation/example.pie b/presentation/example.pie new file mode 100755 index 0000000000000000000000000000000000000000..00123e32975d526e1a229e26924c024548c3bf7e GIT binary patch literal 16632 zcmeHOYit}>6~60@6X)Tzlg7j(Z9NSMa!|c-^Ds7zlU=_uZk-3IQ&N#+SbNv@!g|;2 z&Jrg=!pNoSDmX;qq4JQ(&w#{B;t>!(61fUR@T2(w1S-H(Y3rcSx`luVG|P8p&RNfl z*H8(SA84*Ld+zzpRO&Skj1Na<=(V|g>D#8x+ke1_C$fp*WX?=v`ww)cGU-HrY#>FJ!=srrTN<`%Sw$dy(-Y{XMeQ7R>SZ5PXguG)HW?;KE3K_;ap2O&NjB@i`K!e; znRDRIaWL<|SBP`a`iRXCCihH;7NJk22&ew&7e51j2K)^88SpdUXTZ;Zp8-DuZ)XPn zTyy^&eezb7ezx-0+m+Hkb=j;aKCe$cTQzMpTipF3;NsRB_^fG&pho-%$!^XRQMUeu zc$!Mzd>$xE4Ja4u24MG>^ZHc#cTmx% zD!)#oZQiUyD0``nP*xUaY8ob>uBMqn|C5&f?lVNT-PH?o`juDr=~w21df=*l?XI~V z4(ixJRdHshrU8pIv8VVZ+S?&k`JG4g$@VwGsOp86%xe8?`~AR+bu)lw2XQl3E7t=E zoR}U8*EBpyVW{b$g*xSf{M{Ue?os$aaNiBV_E&d{#q%eoEokyqEpG02(9jFr^ZHp_ z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