[PATCH] D113147: [lld-macho] Fix an assertion failure when -u specifies an undefined section$start symbol

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 11:13:41 PDT 2021


int3 added a comment.

Gotcha, thanks for fixing the test. I still think the assert is correct... as long as we fix MarkLive to mark all `explicitUndefineds`:

  --- a/lld/MachO/MarkLive.cpp
  +++ b/lld/MachO/MarkLive.cpp
  @@ -96,8 +96,7 @@ void markLive() {
     }
     // -u symbols
     for (Symbol *sym : config->explicitUndefineds)
  -    if (auto *defined = dyn_cast<Defined>(sym))
  -      addSym(defined);
  +    addSym(sym);
     // local symbols explicitly marked .no_dead_strip
     for (const InputFile *file : inputFiles)
       if (auto *objFile = dyn_cast<ObjFile>(file))


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113147



More information about the llvm-commits mailing list