Skip to content

Commit 00df7c1

Browse files
Dmitrii BordukovVladimir Mezentsev
authored andcommitted
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 470a028.
1 parent cf03713 commit 00df7c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gprofng/src/Stabs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ Stabs::readSymSec (Elf *elf, bool is_dynamic)
15461546
switch (GELF_ST_TYPE (Sym.st_info))
15471547
{
15481548
case STT_FUNC:
1549-
if (Sym.st_size == 0 || ELF_ST_BIND (Sym.st_info) == STB_WEAK)
1549+
if (Sym.st_size == 0)
15501550
break;
15511551
if (Sym.st_shndx == 0)
15521552
{

0 commit comments

Comments
 (0)