[GNU/ELF] Add support for -X/--discard-locals.
authorDavide Italiano <davide@freebsd.org>
Mon, 20 Apr 2015 22:52:56 +0000 (22:52 +0000)
committerDavide Italiano <davide@freebsd.org>
Mon, 20 Apr 2015 22:52:56 +0000 (22:52 +0000)
commit30326b9d8fff67ccedbad622ec4048862f40fa34
tree3a3586f573fc866e03da1e82b89954f266887110
parent2fbe13540a906cdb10a26889ab5c181ce242f563
[GNU/ELF] Add support for -X/--discard-locals.

There's (almost) never need to keep .L symbols around for production
builds. In fact, the FreeBSD kernel explicitly specify -X beacuse the
size impact (and the subsequent performance impact) might be significant,
because we keep symbols in memory.
I was tempted to make this the default, but I haven't (yet).

PR: 23232
llvm-svn: 235357
lld/include/lld/ReaderWriter/ELFLinkingContext.h
lld/lib/Driver/GnuLdDriver.cpp
lld/lib/Driver/GnuLdOptions.td
lld/lib/ReaderWriter/ELF/SectionChunks.cpp
lld/test/elf/discard-locals.test [new file with mode: 0644]