[libcxx-commits] [libcxx] [libcxx] Use local names for the operator new impl symbols (PR #122983)
Petr Hosek via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 14 14:59:26 PST 2025
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/122983
This way the impl symbols don't even make it into the symbol table which is important for symbolization since we want the symbolizer to always pick up the public symbol (which has the same address as the impl one).
>From 6c665275b6b94b9ea29cc75df53ce84ed28d019d Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Tue, 14 Jan 2025 14:47:47 -0800
Subject: [PATCH] [libcxx] Use local names for the operator new impl symbols
This way the impl symbols don't even make it into the symbol table which
is important for symbolization since we want the symbolizer to always
pick up the public symbol (which has the same address as the impl one).
---
libcxx/src/include/overridable_function.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcxx/src/include/overridable_function.h b/libcxx/src/include/overridable_function.h
index 7372e347831bb4..71feebf0c15b20 100644
--- a/libcxx/src/include/overridable_function.h
+++ b/libcxx/src/include/overridable_function.h
@@ -90,8 +90,8 @@ _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
# define _LIBCPP_OVERRIDABLE_FUNCTION(symbol, type, name, arglist) \
- static type symbol##_impl__ arglist __asm__(_LIBCPP_TOSTRING(symbol##_impl__)); \
- [[gnu::weak, gnu::alias(_LIBCPP_TOSTRING(symbol##_impl__))]] type name arglist; \
+ static type symbol##_impl__ arglist __asm__(".L" _LIBCPP_TOSTRING(symbol)); \
+ [[gnu::weak, gnu::alias(".L" _LIBCPP_TOSTRING(symbol))]] type name arglist; \
_LIBCPP_BEGIN_NAMESPACE_STD \
template <> \
inline bool __is_function_overridden<static_cast<type(*) arglist>(name)>() { \
More information about the libcxx-commits
mailing list