[all-commits] [llvm/llvm-project] 2c6fae: ELF: Discard .ARM.exidx sections for empty functio...

pcc via All-commits all-commits at lists.llvm.org
Mon Nov 4 09:12:03 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c6fae179e6984c7330ff8a284d7a10ce142eef9
      https://github.com/llvm/llvm-project/commit/2c6fae179e6984c7330ff8a284d7a10ce142eef9
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2019-11-04 (Mon, 04 Nov 2019)

  Changed paths:
    M lld/ELF/SyntheticSections.cpp
    A lld/test/ELF/arm-exidx-empty-fn.s

  Log Message:
  -----------
  ELF: Discard .ARM.exidx sections for empty functions instead of misordering them.

The logic added in r372781 caused ARMExidxSyntheticSection::addSection()
to return false for exidx sections without a link order dep that passed
isValidExidxSectionDep(). This included exidx sections for empty functions. As
a result, such exidx sections would end up treated like ordinary sections and
would end up being laid out before the ARMExidxSyntheticSection, most likely in
the wrong order relative to the exidx entries in the ARMExidxSyntheticSection,
breaking the orderedness invariant relied upon by unwinders. Fix this by
simply discarding such sections.

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




More information about the All-commits mailing list