[PATCH] D116838: [ELF] -Map --why-extract=: print despite errors

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 00:29:20 PST 2022


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


================
Comment at: lld/ELF/LinkerScript.cpp:566-567
     error("discarding " + s.name + " section is not allowed");
+    if (&s == mainPart->relrDyn.get())
+      mainPart->relrDyn.reset();
+  }
----------------
ikudrin wrote:
> There is no test that covers this change. And maybe it'll be better to fix the issue directly in `DynamicSection<ELFT>::computeContents()`?
`discard-section-err.s` covers this. Without the change ``discard-section-err.s` segfaults.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116838



More information about the llvm-commits mailing list