[PATCH] D41082: [ELF] Change default output section type to SHT_NOBITS

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 13:23:45 PST 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM. Nice!



================
Comment at: ELF/OutputSections.cpp:315-318
+    if (auto *Data = dyn_cast<ByteCommand>(Base)) {
+      if(Type == SHT_NOBITS)
+        Type = SHT_PROGBITS;
+    }
----------------
You are not using `Data` so it should be

  if (isa<ByteCommand>(Base) && Type == SHT_NOBITS)
    Type = SHT_PROGBITS;


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D41082





More information about the llvm-commits mailing list