[all-commits] [llvm/llvm-project] e44a10: .gcc_except_table: Set SHF_LINK_ORDER if binutils>...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Feb 5 21:45:40 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e44a1009428304d2203ab5b99d479ab2a0abf53a
      https://github.com/llvm/llvm-project/commit/e44a1009428304d2203ab5b99d479ab2a0abf53a
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-02-05 (Fri, 05 Feb 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
    M llvm/include/llvm/Target/TargetLoweringObjectFile.h
    M llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/test/CodeGen/X86/gcc_except_table-multi.ll

  Log Message:
  -----------
  .gcc_except_table: Set SHF_LINK_ORDER if binutils>=2.36, and drop unneeded unique ID for -fno-unique-section-names

GNU ld>=2.36 supports mixed SHF_LINK_ORDER and non-SHF_LINK_ORDER sections in an
output section, so we can set SHF_LINK_ORDER if -fbinutils-version=2.36 or above.

If -fno-function-sections or older binutils, drop unique ID for -fno-unique-section-names.
The users can just specify -fbinutils-version=2.36 or above to allow GC with both GNU ld and LLD.
(LLD does not support garbage collection of non-group non-SHF_LINK_ORDER .gcc_except_table sections.)




More information about the All-commits mailing list