[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 1/2] Show GNU unique symbols as provided symbols



From: Yuanjie Huang <yuanjie.huang@windriver.com>

GNU Unique symbol is a GNU extension employed by new version of GCC
by default. Even Standard C++ library in GCC 4.9 provides some symbols,
such as _ZNSs4_Rep20_S_empty_rep_storageE in this binding type instead
of ELF standard weak binding.
This patch adds support of this new binding type to mklibs-readelf.

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
---
Hi maintainers:

I have two patches for mklibs, but I did not find the maillist for mklibs,
so send them to you, hope you can review them, thanks.

-Roy




 src/mklibs-readelf/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp
index 2444c39..fa994ff 100644
--- a/src/mklibs-readelf/main.cpp
+++ b/src/mklibs-readelf/main.cpp
@@ -80,7 +80,7 @@ static void process_symbols_provided (const Elf::section_type<Elf::section_type_
     uint8_t type = symbol->get_type ();
     const std::string &name = symbol->get_name_string ();
 
-    if (bind != STB_GLOBAL && bind != STB_WEAK)
+    if (bind != STB_GLOBAL && bind != STB_WEAK && bind != STB_GNU_UNIQUE)
       continue;
     if (shndx == SHN_UNDEF || shndx == SHN_ABS)
       continue;
-- 
1.9.1



Reply to: