[NSWI004] Problem with PIE

Ondřej Roztočil roztocil at outlook.com
Wed Oct 7 23:04:15 CEST 2020


Hi,

I must be missing something, but I have a problem with Q2 in 02-code-stack-before.md which deals with memory layout randomization.

First, I compile the provided code with the all the specified compiler parameters:

gcc -pie -fpie -o main main.c

Then I find addresses of main and the i variable in the output of:

objdump -d main

However, when I repeat the process I always get the same addresses. I tried it on the lab computer and on my pc (with Ubuntu in WSL). Is objdump -d not the right tool to solve this question?

Thanks

OR


More information about the NSWI004 mailing list