[all-commits] [llvm/llvm-project] ae7309: [ELF] -r: don't crash when a non-SHF_LINK_ORDER or...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Oct 28 08:57:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ae73091f30245852817c5c0af050a5a731dee50a
      https://github.com/llvm/llvm-project/commit/ae73091f30245852817c5c0af050a5a731dee50a
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-10-28 (Wed, 28 Oct 2020)

  Changed paths:
    M lld/ELF/LinkerScript.cpp
    A lld/test/ELF/linkorder-mixed2.s

  Log Message:
  -----------
  [ELF] -r: don't crash when a non-SHF_LINK_ORDER orphan is added before a SHF_LINK_ORDER orphan

Fixes https://github.com/ClangBuiltLinux/linux/issues/1186

If a non-SHF_LINK_ORDER orphan is added first, `firstIsec->flags & SHF_LINK_ORDER`
will be zero and we currently assert when calling `getLinkOrderDep`.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D90200




More information about the All-commits mailing list