[PATCH] D158241: [llvm-libgcc] Don't export __{,de}register_frame_info* and __register_frame_table
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 19:08:42 PDT 2023
MaskRay created this revision.
MaskRay added reviewers: cjdb, compnerd, phosek, saugustine.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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
undefined 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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158241
Files:
llvm-libgcc/lib/gcc_s.ver
Index: llvm-libgcc/lib/gcc_s.ver
===================================================================
--- llvm-libgcc/lib/gcc_s.ver
+++ llvm-libgcc/lib/gcc_s.ver
@@ -70,11 +70,6 @@
#endif
#if defined(GLOBAL_X86)
- GCC_3.0 {
- __deregister_frame_info_bases; __fixunsxfdi; __register_frame_info_bases;
- __register_frame_info_table_bases;
- };
-
GCC_4.0.0 { __divxc3; __mulxc3; __powixf2; };
GCC_4.8.0 { __cpu_indicator_init; };
#endif
@@ -148,17 +143,11 @@
#if defined(__i386__)
GCC_3.0 { __fixunsxfsi; __fixxfdi; __floatdixf; };
GCC_4.2.0 { __floatundixf; };
-
- GLIBC_2.0 {
- __register_frame_info; __register_frame_info_table; __register_frame_table;
- __deregister_frame_info;
- };
#endif
#if defined(__x86_64__)
GCC_3.0 {
- __register_frame_info; __register_frame_info_table; __register_frame_table;
- __deregister_frame; __deregister_frame_info; __register_frame;
+ __deregister_frame; __register_frame;
__fixunsxfti; __fixxfti; __floattixf;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158241.551349.patch
Type: text/x-patch
Size: 1057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230818/459a13bb/attachment.bin>
More information about the llvm-commits
mailing list