[PATCH] D60785: [ELF] Align file offset for .bss if first section in a PT_LOAD

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 06:15:44 PDT 2019


MaskRay added inline comments.


================
Comment at: lld/ELF/Writer.cpp:2224
+    // monotonically increasing rather than setting to zero.
+    if (OS->Type == SHT_NOBITS)
+      return Off;
----------------
MaskRay wrote:
> What happens if you delete `if (OS->Type == SHT_NOBITS) return Off;` here?
I think we probably just need to delete `if (OS->Type == SHT_NOBITS) return Off;` from the original code.

`.tss` in `tls-offset.s` is affected but that offset is not significant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60785/new/

https://reviews.llvm.org/D60785





More information about the llvm-commits mailing list