aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrii Bordukov <dabordukov@gmail.com>2025-07-19 15:21:46 +0300
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>2025-07-19 12:54:32 -0700
commit00df7c126b9a0e551b32aeba9c7cb71c0e2a8e7e (patch)
tree1e44b935223e5def2f758002a6af89637148be43
parentcf03713dd1c4ecacc84c9f8a7d805003efa73ae3 (diff)
downloadbinutils-00df7c126b9a0e551b32aeba9c7cb71c0e2a8e7e.zip
binutils-00df7c126b9a0e551b32aeba9c7cb71c0e2a8e7e.tar.gz
binutils-00df7c126b9a0e551b32aeba9c7cb71c0e2a8e7e.tar.bz2
gprofng: do not skip weak symbols
PR gprofng/33151 gprofng ignores functions that are compiled as weak symbols. This heavily affects C++ class methods that are always compiled by g++ and clang++ as weak symbols. In this case 'gprofng display text' just displays <static>@ADDRESS(<FILENAME>) instead of proper method name. The bug has been introduced in the commit 470a0288a818.
-rw-r--r--gprofng/src/Stabs.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gprofng/src/Stabs.cc b/gprofng/src/Stabs.cc
index 116316e..20bdf8b 100644
--- a/gprofng/src/Stabs.cc
+++ b/gprofng/src/Stabs.cc
@@ -1546,7 +1546,7 @@ Stabs::readSymSec (Elf *elf, bool is_dynamic)
switch (GELF_ST_TYPE (Sym.st_info))
{
case STT_FUNC:
- if (Sym.st_size == 0 || ELF_ST_BIND (Sym.st_info) == STB_WEAK)
+ if (Sym.st_size == 0)
break;
if (Sym.st_shndx == 0)
{