I'm trying to understand the behavior of a buffer overflow and a shellcode. Basically when I compile the code, I receive the following warning :
gcc- -fno-stack-protector -z exestack -Wall -o buff buff.c
buff.c: In function ‘main’:
buff.c:19:2: warning: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration]
gets(buffer);
^~~~
fgets
/usr/bin/x86_64-linux-gnu-ld: warning: -z exestack ignored.
/tmp/cctQkxAI.o: In function `main':
buff.c:(.text+0x28): warning: the `gets' function is dangerous and should not be used.
How can I resolve the warning regarding:
/usr/bin/x86_64-linux-gnu-ld: warning: -z exestack ignored.
I tried different version of gcc but I had the same problem.