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

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Oct 30 21:30:51 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 83716db47f94391771bf469262ab4282679d8981
      https://github.com/llvm/llvm-project/commit/83716db47f94391771bf469262ab4282679d8981
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-10-31 (Sat, 31 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

(cherry picked from commit ae73091f30245852817c5c0af050a5a731dee50a)




More information about the All-commits mailing list