[all-commits] [llvm/llvm-project] 16cb79: [ELF] --emit-relocs: fix a crash if .rela.dyn is a...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Dec 16 09:00:00 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 16cb7910f51f0c2570b1f3406bcd8d4069e52a3e
      https://github.com/llvm/llvm-project/commit/16cb7910f51f0c2570b1f3406bcd8d4069e52a3e
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-12-16 (Wed, 16 Dec 2020)

  Changed paths:
    M lld/ELF/OutputSections.cpp
    A lld/test/ELF/linkerscript/emit-relocs-rela-dyn.s

  Log Message:
  -----------
  [ELF] --emit-relocs: fix a crash if .rela.dyn is an empty output section

Fix PR48357: If .rela.dyn appears as an output section description, its type may
be SHT_RELA (due to the empty synthetic .rela.plt) while there is no input
section. The empty .rela.dyn may be retained due to a reference in a linker
script. Don't crash.

Reviewed By: grimar

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




More information about the All-commits mailing list