Make __start_sec __end_sec handling more precise.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 26 Jul 2017 23:39:10 +0000 (23:39 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 26 Jul 2017 23:39:10 +0000 (23:39 +0000)
commit4b075bb21879f25b24391e669eb4e910262dfff8
treea622bef79593231403990ff250cf82a5efa4d0fb
parent268f89d540fb32b11b6b9d1c33450b96ad3abd4b
Make __start_sec __end_sec handling more precise.

With this we only ask LTO to keep a C named section if there is a
__start_ or __end symbol.

This is not as strict as lld's --gc-sections, but is as good as we can
get without having a far more detailed ir summary.

llvm-svn: 309232
lld/ELF/LTO.cpp
lld/ELF/LTO.h
lld/test/ELF/lto/section-name.ll