[ELF] - Linkerscript KEEP command.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 23 Feb 2016 07:47:54 +0000 (07:47 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 23 Feb 2016 07:47:54 +0000 (07:47 +0000)
commit481c2ce64b6e0938a7d94c139a5daff2a26aea07
treec144ddd156df254a8c80102108c697f06abe0636
parent17525aba8af3b218f52ccda0f01e066853d4a1e9
[ELF] - Linkerscript KEEP command.

When link-time garbage collection is in use (-gc-sections), it is
often useful to mark sections that should not be eliminated.
This is accomplished by surrounding an input section's wildcard
entry with KEEP(). Patch implements that command.

Differential revision: http://reviews.llvm.org/D17242

llvm-svn: 261616
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/ELF/MarkLive.cpp
lld/test/ELF/linkerscript-sections-keep.s [new file with mode: 0644]