diff options
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 9f2ac61b463..ac5ac99b97b 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -296,7 +296,8 @@ template <class ELFT> void LinkerScript<ELFT>::discard(ArrayRef<InputSectionBase<ELFT> *> V) { for (InputSectionBase<ELFT> *S : V) { S->Live = false; - reportDiscarded(S); + if (S == In<ELFT>::ShStrTab) + error("discarding .shstrtab section is not allowed"); InputSection<ELFT> *IS = dyn_cast<InputSection<ELFT>>(S); if (!IS || IS->DependentSections.empty()) |

