[all-commits] [llvm/llvm-project] be91bd: [llvm-libgcc] Don't export __{, de}register_frame_i...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Aug 23 13:00:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be91bd012123de835f64e10e677b24a7580b273c
https://github.com/llvm/llvm-project/commit/be91bd012123de835f64e10e677b24a7580b273c
Author: Fangrui Song <i at maskray.me>
Date: 2023-08-23 (Wed, 23 Aug 2023)
Changed paths:
M llvm-libgcc/lib/gcc_s.ver
Log Message:
-----------
[llvm-libgcc] Don't export __{,de}register_frame_info* and __register_frame_table
These symbols are used in the absence of PT_GNU_EH_FRAME, for ld
--no-eh-frame-hdr (gcc -static default).
libunwind defines these empty functions when
`defined(_LIBUNWIND_BUILD_ZERO_COST_APIS) && defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_LIBUNWIND_SUPPORT_FRAME_APIS)`.
They should be perceived as Mac OS X workarounds.
For Linux, GCC crtbeginT.o (for -static) and clang_rt.crtbegin.o contain
weak references to `__{,de}register_frame_info`. Dynamically linked
executables will either not reference `__{,de}register_frame_info` (using
libgcc) or reference them as weak symbols (using compiler-rt).
Therefore, not defining these symbols is backward compatible.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D158241
More information about the All-commits
mailing list