elf icon indicating copy to clipboard operation
elf copied to clipboard

BUG: AT_BASE incorrect for static-pie

Open Hackerl opened this issue 4 years ago • 0 comments

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);

Hackerl avatar Jul 15 '21 09:07 Hackerl