[all-commits] [llvm/llvm-project] 729899: [libunwind] unw_* alias fixes for ELF and Mach-O

Ryan Prichard via All-commits all-commits at lists.llvm.org
Mon Feb 22 16:54:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 729899f7b6bf6aff65988d895d7a639391a67608
      https://github.com/llvm/llvm-project/commit/729899f7b6bf6aff65988d895d7a639391a67608
  Author: Ryan Prichard <rprichard at google.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M clang/cmake/caches/Fuchsia-stage2.cmake
    M libunwind/CMakeLists.txt
    M libunwind/src/CMakeLists.txt
    M libunwind/src/assembly.h
    M libunwind/src/config.h
    M llvm/utils/gn/secondary/libunwind/src/BUILD.gn

  Log Message:
  -----------
  [libunwind] unw_* alias fixes for ELF and Mach-O

Rename the CMake option, LIBUNWIND_HERMETIC_STATIC_LIBRARY, to
LIBUNWIND_HIDE_SYMBOLS. Rename the C macro define,
_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS, to _LIBUNWIND_HIDE_SYMBOLS,
because now the macro adds a .hidden directive rather than merely
suppress visibility annotations.

For ELF, when LIBUNWIND_HIDE_SYMBOLS is enabled, mark unw_getcontext as
hidden. This symbol is the only one defined using src/assembly.h's
WEAK_ALIAS macro. Other unw_* weak aliases are defined in C++ and are
already hidden.

Mach-O doesn't support weak aliases, so remove .weak_reference and
weak_import. When LIBUNWIND_HIDE_SYMBOLS is enabled, output
.private_extern for the unw_* aliases.

In assembly.h, add missing SYMBOL_NAME macro invocations, which are
used to prefix symbol names with '_' on some targets.

Fixes PR46709.

Reviewed By: #libunwind, phosek, compnerd, steven_wu

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




More information about the All-commits mailing list