]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge commit 8df4e6094 from llvm git (by Fangrui Song):
authordim <dim@FreeBSD.org>
Thu, 12 Nov 2020 19:25:31 +0000 (19:25 +0000)
committerdim <dim@FreeBSD.org>
Thu, 12 Nov 2020 19:25:31 +0000 (19:25 +0000)
commitc64d80c44fe20db9e1717379fadb9142ab0dc872
treeef4afea1152fdd41036aa9522f6e0596f424d667
parent0b25748a2ac6f73587dcd74e52ddacf2bbb63c8b
Merge commit 8df4e6094 from llvm git (by Fangrui Song):

  [ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections

  Fixes PR48071

  * The Rust compiler produces SHF_ALLOC `.debug_gdb_scripts` (which
    normally does not have the flag)
  * `.debug_gdb_scripts` sections are removed from `inputSections` due
    to --strip-debug/--strip-all
  * When processing --gc-sections, pieces of a SHF_MERGE section can be
    marked live separately

  `=>` segfault when marking liveness of a `.debug_gdb_scripts` which
  is not split into pieces (because it is not in `inputSections`)

  This patch circumvents the problem by not treating SHF_ALLOC
  ".debug*" as debug sections (to prevent --strip-debug's stripping)
  (which is still useful on its own).

  Reviewed By: grimar

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

This should fix lld segfaulting when linking the rust-based parts of the
devel/py-maturin port.

Reported by: Nick Venenga <nijave@gmail.com>
PR: 250783
MFC after: 3 days
contrib/llvm-project/lld/ELF/InputSection.h