[PATCH] D57168: Fix broken export table if .rdata is merged with .text.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 24 10:59:39 PST 2019


ruiu marked an inline comment as done.
ruiu added inline comments.


================
Comment at: lld/COFF/DLL.cpp:475-476
   void writeTo(uint8_t *Buf) const override {
+    memset(Buf + OutputSectionOff, 0, getSize());
+
     uint8_t *P = Buf + OutputSectionOff;
----------------
rnk wrote:
> I think we don't need this dead store if we modify the loop below to write zero unconditionally if !E.Noname. Maybe it's worth asserting `Config->Exports.size() == Size` to ensure there is no padding.
Actually this store seems completely dead. I'll remove before submitting.


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

https://reviews.llvm.org/D57168





More information about the llvm-commits mailing list