[elf] understand -no-pie

This passes -Wl,-no-pie linker arg. Golang uses that. From the `ld(1)`
man page:

   Create a position dependent executable.  This is the default.

Not adding to the help text, because this is the default.
This commit is contained in:
Motiejus Jakštys 2022-06-16 14:55:45 +03:00 committed by Andrew Kelley
parent d3caacfab7
commit d506275a06

View File

@ -1445,6 +1445,8 @@ fn buildOutputType(
needed = false;
} else if (mem.eql(u8, linker_arg, "--no-as-needed")) {
needed = true;
} else if (mem.eql(u8, linker_arg, "-no-pie")) {
want_pie = false;
} else if (mem.eql(u8, linker_arg, "--whole-archive") or
mem.eql(u8, linker_arg, "-whole-archive"))
{