Don't gc symbols that have to go in the dynamic symbol table.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 26 Apr 2016 16:26:45 +0000 (16:26 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 26 Apr 2016 16:26:45 +0000 (16:26 +0000)
commit1b65ad17254b9934bc299f8c928452fa16efb3d8
tree185a03b8b3f26e15504af82abb65f2ea609f822e
parentfd5ceb2228a7d3ae5e132bfd403a72150b919eb3
Don't gc symbols that have to go in the dynamic symbol table.

We were only doing it for .so and --export-dynamic, but those are not
the only ways a symbol ends up in the dynamic symbol table.

Problem diagnostic and earlier patch version by Peter Collingbourne.

llvm-svn: 267568
lld/ELF/MarkLive.cpp
lld/test/ELF/gc-sections-shared.s [new file with mode: 0644]