[PATCH] D65903: [LLD] [COFF] Allow using custom .edata from input object files

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 22:38:13 PDT 2019


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


================
Comment at: COFF/Writer.cpp:1376
   buf += sizeof(*dir) * numberOfDataDirectory;
-  if (!config->exports.empty()) {
-    dir[EXPORT_TABLE].RelativeVirtualAddress = edata.getRVA();
-    dir[EXPORT_TABLE].Size = edata.getSize();
+  if (edataStart) {
+    dir[EXPORT_TABLE].RelativeVirtualAddress = edataStart->getRVA();
----------------
ruiu wrote:
> Looks like you can check if `!edataSec->chunks.empty()` here and use `edataSec->chunks.front()` and `back()` in the following lines.
No, I can't. Edata ends up merged into rdata, so at this point, edataSec is empty.


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

https://reviews.llvm.org/D65903





More information about the llvm-commits mailing list