Fix a crash.

This is PR33821.

What we really want to check in here is if the output section was
created, not if the command was empty.

llvm-svn: 308382
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 680ba93..1853f99 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1330,7 +1330,7 @@
   // 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>();