diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-19 07:02:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-19 07:02:58 +0000 |
commit | da06c7cfa0388de29a4024d8d386e48f2fb13ed6 (patch) | |
tree | dc28e84fc2bb9a4a4d9873fe4d04946fe3f7f4c0 /ELF/Writer.cpp | |
parent | 267829774358b5aebd3e726ae318813bd48129bb (diff) |
Notes
Diffstat (limited to 'ELF/Writer.cpp')
-rw-r--r-- | ELF/Writer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ELF/Writer.cpp b/ELF/Writer.cpp index bf43ee5c5f91..1853f99bc600 100644 --- a/ELF/Writer.cpp +++ b/ELF/Writer.cpp @@ -257,7 +257,6 @@ template <class ELFT> void Writer<ELFT>::run() { if (ErrorCount) return; - // Handle -Map option. writeMapFile<ELFT>(OutputSectionCommands); if (ErrorCount) @@ -1331,7 +1330,7 @@ template <class ELFT> void Writer<ELFT>::addPredefinedSections() { // ARM ABI requires .ARM.exidx to be terminated by some piece of data. // We have the terminater synthetic section class. Add that at the end. OutputSectionCommand *Cmd = findSectionCommand(".ARM.exidx"); - if (!Cmd || Cmd->Commands.empty() || Config->Relocatable) + if (!Cmd || !Cmd->Sec || Config->Relocatable) return; auto *Sentinel = make<ARMExidxSentinelSection>(); @@ -1392,7 +1391,8 @@ OutputSectionCommand *Writer<ELFT>::findSectionCommand(StringRef Name) { return nullptr; } -template <class ELFT> OutputSection *Writer<ELFT>::findSectionInScript(StringRef Name) { +template <class ELFT> +OutputSection *Writer<ELFT>::findSectionInScript(StringRef Name) { if (OutputSectionCommand *Cmd = findSectionCommand(Name)) return Cmd->Sec; return nullptr; |