Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there any reason that compilers don't somehow fix this thing by default?


They can't - you get this error when trying to link other objects, which are already compiled without position-independent code. So the linker can't really fix this.

Also, if you're not doing dynamic linking, code without -fPIC is generally faster and for use-cases where C (and/or C++) is used that can make a difference.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: