elf
elf copied to clipboard
BUG: AT_BASE incorrect for static-pie
cat > test.c << EOF
#include <stdio.h>
int main() {
printf("hello world");
return 0;
}
EOF
gcc test.c -o test -static-pie -fPIE
./loader test
[1] 244579 segmentation fault (core dumped) ./loader test
AT_BASE should reset to 0, if interpreter does not exist.
AVSET(AT_BASE, av, elf_interp ?
base[Z_INTERP] : 0);