Hacker News new | past | comments | ask | show | jobs | submit login

Gcc these days compiles with -pie (Position Independent Executable) by default. This makes the text section position independent and able to be relocated, like a shared library.

You are correct that the main TEXT section used to typically not be position independent.




Not only is the text segment relocatable, the entire binary is generally compiled as ET_DYN so it is a shared library in a sense.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: