Eu tive o mesmo problema e resolvi o problema graças a este post no Stack Overflow .
Você deve adicionar a opção -no-pie
à linha de comando de compilação
sem:
$ gcc main.c -o main
$ file main
main:ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32,
BuildID[sha1]=46ada4e5e25fc120ca052c9beb8bfa5491fc6239, not stripped
com:
$ gcc main.c -o main -no-pie
$ file main
main: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32,
BuildID[sha1]=17f860c6c84fc1a5771c8744b7aaaf164c219559, not stripped