[PATCH] D44180: Improve --warn-symbol-ordering.

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 04:47:14 PST 2018


rafael added a comment.

Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:

Overall direction and ICF related change looks good.

> - if (auto *Sec = dyn_cast_or_null<InputSectionBase>(D->Section)) {
> - int &Priority = SectionOrder[cast<InputSectionBase>(Sec->Repl)];
> - Priority = std::min(Priority, Ent.Priority); +      auto *Sec = dyn_cast_or_null<InputSectionBase>(cast<Defined>(Sym)->Section); +      if (!Sec) { +        Warn("unable to order absolute symbol");

This will fire for symbols like _GLOBAL_OFFSET_TABLE_ that point to an
OutputSection, no?

Cheers,
Rafael


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44180





More information about the llvm-commits mailing list