bash-3.2$ cat x.c #include <stdio.h> int main () { printf ("Hello\n"); return 0; } bash-3.2$ gcc -pie x.c -fpie bash-3.2$ ./a.out Hello bash-3.2$ gcc -shared -pie x.c -fpie bash-3.2$ ./a.out bash: ./a.out: /lib/ld64.so.1: bad ELF interpreter: No such file or directory bash-3.2$
I am expecting -pie will override -shared. -- Summary: -pie won't override -shared in -shared -pie Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hjl at lucon dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32632