Почему попытка сборки кода с флагом fPIC выдает ошибку?
#include <unistd.h>
#include <linux/unistd.h>
int main()
{
__asm__ __volatile__ ("int $0x80" : : "a"(__NR_exit), "b"(0));
}
Сборка:
$ gcc -fPIC -o exit exit.c && ./exit ; echo $?
Ошибка:
exit.c: In function ‘main’:
exit.c:6: error: can't find a register in class ‘BREG’ while reloading ‘asm’
exit.c:6: error: ‘asm’ operand has impossible constraints