[all-commits] [llvm/llvm-project] 42e391: [ELF] Use SHF_SUNW_NODISCARD instead of SHF_GNU_RE...

rorth via All-commits all-commits at lists.llvm.org
Wed Feb 23 06:42:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 42e391e4ca848e152bf8cdb072ed3ca2a394da2b
      https://github.com/llvm/llvm-project/commit/42e391e4ca848e152bf8cdb072ed3ca2a394da2b
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2022-02-23 (Wed, 23 Feb 2022)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/ELF.h
    M llvm/include/llvm/ObjectYAML/ELFYAML.h
    M llvm/lib/ObjectYAML/ELFYAML.cpp
    A llvm/test/tools/llvm-readobj/ELF/section-flags-solaris.test
    A llvm/test/tools/obj2yaml/ELF/retain-section.yaml
    A llvm/test/tools/yaml2obj/ELF/retain-section.yaml
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [ELF] Use SHF_SUNW_NODISCARD instead of SHF_GNU_RETAIN on Solaris

Instead of the GNU extension `SHF_GNU_RETAIN`, Solaris provides equivalent
functionality with `SHF_SUNW_NODISCARD`. This patch implements the necessary
support.

Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and
`x86_64-pc-linux-gnu`.

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




More information about the All-commits mailing list