On Thu, Jun 27, 2013 at 08:03:06AM -0700, Matt Thomas wrote: > > On Jun 27, 2013, at 7:28 AM, matthew green <m...@eterna.com.au> wrote: > > > > >> Module Name: src > >> Committed By: matt > >> Date: Thu Jun 27 03:37:21 UTC 2013 > >> > >> Modified Files: > >> src/lib/csu/common: Makefile.inc > >> > >> Log Message: > >> Add -fPIC to compile of crtbeginS.o > > > > what is this for? crtbeginS.o is for static binaries isn't it? > > crtbegin.o is for static > crtbeginS.o is for shared
Actually, it is crtbegin.o for the main binary, crtbeginS.o for shared objects and crtbeginT.o for static binaries. Making crtbegin.o PIC is useful for PIE. Joerg