Charles Collicutt wrote:
> On 14 June 2017 at 17:34, Ted Unangst <[email protected]> wrote:
> 
> > gcc -static -nopie -o foo foo.c
> >
> 
> That works, thank you. gcc-local(1) only mentions -nopie as an option for
> the linker, so I thought it ought to be passed with -Wl,...
> 
> So passing -nopie to gcc both causes it to link against the correct crt0
> and also passes -nopie to the linker? And passing -nopie to the linker
> disables PIE generation but doesn't affect which crt0 it uses?

I think I would interpret that sentence to mean linker as in the gcc invoked
to link stuff. gcc -c is the compiler, gcc is the linker... 

Reply via email to