This essentially reverts r362743, which restored r361830.
Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if the sections were discarded
The reverts of this revision are tangled so it is a bit tricky to revert it.
This change keeps the goodness of D61583 while fixing the line table issue as reported in
https://bugs.chromium.org/p/chromium/issues/detail?id=978067