How to configure gcc to use -no-pie by default?
问题 I want to compile the following program on Linux: .global _start .text _start: mov $1, %rax mov $1, %rdi mov $msg, %rsi mov $13, %rdx syscall mov $60, %rax xor %rdi, %rdi syscall msg: .ascii "Hello World!\n" However, it gives me the following linker error: $ gcc -nostdlib hello.s /usr/bin/ld: /tmp/ccMNQrOF.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: