diff mbox series

[18/20] dwarf-reader/writer: consider aliases when dealing with suppressions

Message ID 20210127125853.886677-19-maennich@google.com
State New
Headers show
Series Refactor (k)symtab reader | expand

Commit Message

Matthias Maennich Jan. 27, 2021, 12:58 p.m. UTC
When a symbol is suppressed and it happens to be the main symbol of a
group of aliased symbols where another symbol is not suppressed, the
dwarf reader discards the DWARF information upon reading and the writer
will not be able to connect dwarf information to the aliased elf symbol.

In order to address this, ensure we are not suppressing symbols
(actually functions and variables) for which an alias is not suppressed.
We therefore keep the DWARF information even if only a non-main symbol
is asked for.

Likewise, when the abg-writer is having to attach an elf-symbol-id to
the DWARF collected information (for functions and variables), instead
of omitting the symbol altogether, rather make use of the property of
aliases and connect the dwarf information to an alias instead. This way
the function dwarf information stays connected to the elf symbol that we
want to track.

When reading from XML with a symbol whitelist that leads to suppression
of aliased symbols, abidiff would hit an assertion and crash when
looking up the aliased symbol due to it being suppressed. In the new
symtab reader we can still suppress a symbol without removing it from
the lookup. Make use of that property to fix this bug.

A test has been added for this as well.

	* src/abg-dwarf-reader.cc(function_is_suppressed): Do not suppress
	  a function for which there is an alias that is not suppressed.
	(variable_is_suppressed): Likewise for variables.
	* src/abg-reader.cc (build_elf_symbol): Improve handling of
	suppressed aliased symbols when reading from XML.
	* src/abg-symtab-reader.cc (load): Likewise.
	* src/abg-writer.cc(write_elf_symbol_reference): Fall back to
	  any aliased symbol if the main symbol is suppressed.
	* tests/data/Makefile.am: Add new test files.
	* tests/data/test-abidiff-exit/test-missing-alias-report.txt: New test file.
	* tests/data/test-abidiff-exit/test-missing-alias.abi: Likewise.
	* tests/data/test-abidiff-exit/test-missing-alias.suppr: Likewise.
	* tests/test-abidiff-exit.cc: Add support for whitelists and add
	new testcase.
	* tests/data/test-read-dwarf/test-suppressed-alias.c: New test file.
	* tests/data/test-read-dwarf/test-suppressed-alias.o: Likewise.
	* tests/data/test-read-dwarf/test-suppressed-alias.o.abi: Likewise.
	* tests/data/test-read-dwarf/test-suppressed-alias.suppr: Likewise.
	* tests/data/test-read-dwarf/test3-alias-1.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3-alias-1.suppr: Likewise.
	* tests/data/test-read-dwarf/test3-alias-2.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3-alias-2.suppr: Likewise.
	* tests/data/test-read-dwarf/test3-alias-3.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3-alias-3.suppr: Likewise.
	* tests/data/test-read-dwarf/test3-alias-4.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3-alias-4.suppr: Likewise.
	* tests/test-read-dwarf.cc: Add new test cases.

Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
---
 src/abg-dwarf-reader.cc                       |  30 +-
 src/abg-reader.cc                             |   7 +-
 src/abg-symtab-reader.cc                      |  14 +-
 src/abg-writer.cc                             |   5 +-
 tests/data/Makefile.am                        |  15 +
 .../test-missing-alias-report.txt             |   0
 .../test-abidiff-exit/test-missing-alias.abi  |  12 +
 .../test-missing-alias.suppr                  |   4 +
 .../data/test-diff-suppr/test31-report-0.txt  |   3 +
 .../data/test-diff-suppr/test32-report-1.txt  |   2 +-
 .../test-read-dwarf/libtest24-drop-fns.so.abi | 314 +++++++++---------
 .../test-read-dwarf/test-suppressed-alias.c   |  16 +
 .../test-read-dwarf/test-suppressed-alias.o   | Bin 0 -> 2848 bytes
 .../test-suppressed-alias.o.abi               |  16 +
 .../test-suppressed-alias.suppr               |   7 +
 .../test-read-dwarf/test3-alias-1.so.hash.abi |  14 +
 .../data/test-read-dwarf/test3-alias-1.suppr  |   3 +
 .../test-read-dwarf/test3-alias-2.so.hash.abi |  18 +
 .../data/test-read-dwarf/test3-alias-2.suppr  |   3 +
 .../test-read-dwarf/test3-alias-3.so.hash.abi |  14 +
 .../data/test-read-dwarf/test3-alias-3.suppr  |   3 +
 .../test-read-dwarf/test3-alias-4.so.hash.abi |   8 +
 .../data/test-read-dwarf/test3-alias-4.suppr  |   3 +
 tests/test-abidiff-exit.cc                    |  11 +
 tests/test-read-dwarf.cc                      |  40 +++
 25 files changed, 399 insertions(+), 163 deletions(-)
 create mode 100644 tests/data/test-abidiff-exit/test-missing-alias-report.txt
 create mode 100644 tests/data/test-abidiff-exit/test-missing-alias.abi
 create mode 100644 tests/data/test-abidiff-exit/test-missing-alias.suppr
 create mode 100644 tests/data/test-read-dwarf/test-suppressed-alias.c
 create mode 100644 tests/data/test-read-dwarf/test-suppressed-alias.o
 create mode 100644 tests/data/test-read-dwarf/test-suppressed-alias.o.abi
 create mode 100644 tests/data/test-read-dwarf/test-suppressed-alias.suppr
 create mode 100644 tests/data/test-read-dwarf/test3-alias-1.so.hash.abi
 create mode 100644 tests/data/test-read-dwarf/test3-alias-1.suppr
 create mode 100644 tests/data/test-read-dwarf/test3-alias-2.so.hash.abi
 create mode 100644 tests/data/test-read-dwarf/test3-alias-2.suppr
 create mode 100644 tests/data/test-read-dwarf/test3-alias-3.so.hash.abi
 create mode 100644 tests/data/test-read-dwarf/test3-alias-3.suppr
 create mode 100644 tests/data/test-read-dwarf/test3-alias-4.so.hash.abi
 create mode 100644 tests/data/test-read-dwarf/test3-alias-4.suppr
diff mbox series

Patch

diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index 7d7ffbdc8ebe..37d63b262646 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -13490,8 +13490,21 @@  function_is_suppressed(const read_context& ctxt,
       if (!ctxt.get_function_address(function_die, fn_addr))
 	return true;
 
-      if (!ctxt.function_symbol_is_exported(fn_addr))
+      elf_symbol_sptr symbol = ctxt.function_symbol_is_exported(fn_addr);
+      if (!symbol)
 	return true;
+      if (!symbol->is_suppressed())
+	return false;
+
+      // Since there is only one symbol in DWARF associated with an elf_symbol,
+      // we can assume this is the main symbol then. Otherwise the main hinting
+      // did not work as expected.
+      ABG_ASSERT(symbol->is_main_symbol());
+      if (symbol->has_aliases())
+	for (elf_symbol_sptr a = symbol->get_next_alias();
+	     !a->is_main_symbol(); a = a->get_next_alias())
+	  if (!a->is_suppressed())
+	    return false;
     }
 
   return suppr::function_is_suppressed(ctxt, qualified_name,
@@ -13599,8 +13612,21 @@  variable_is_suppressed(const read_context& ctxt,
       if (!ctxt.get_variable_address(variable_die, var_addr))
 	return true;
 
-      if (!ctxt.variable_symbol_is_exported(var_addr))
+      elf_symbol_sptr symbol = ctxt.variable_symbol_is_exported(var_addr);
+      if (!symbol)
 	return true;
+      if (!symbol->is_suppressed())
+	return false;
+
+      // Since there is only one symbol in DWARF associated with an elf_symbol,
+      // we can assume this is the main symbol then. Otherwise the main hinting
+      // did not work as expected.
+      ABG_ASSERT(symbol->is_main_symbol());
+      if (symbol->has_aliases())
+	for (elf_symbol_sptr a = symbol->get_next_alias();
+	     !a->is_main_symbol(); a = a->get_next_alias())
+	  if (!a->is_suppressed())
+	    return false;
     }
 
   return suppr::variable_is_suppressed(ctxt, qualified_name,
diff --git a/src/abg-reader.cc b/src/abg-reader.cc
index 296e1e2115d1..e0269436ee89 100644
--- a/src/abg-reader.cc
+++ b/src/abg-reader.cc
@@ -2780,7 +2780,8 @@  build_elf_symbol(read_context& ctxt, const xmlNodePtr node,
 
   elf_symbol::version version(version_string, is_default_version);
 
-  if (drop_if_suppressed && suppr::is_elf_symbol_suppressed(ctxt, name, type))
+  const bool is_suppressed = suppr::is_elf_symbol_suppressed(ctxt, name, type);
+  if (drop_if_suppressed && is_suppressed)
     return elf_symbol_sptr();
 
   const environment* env = ctxt.get_environment();
@@ -2789,6 +2790,8 @@  build_elf_symbol(read_context& ctxt, const xmlNodePtr node,
 					 is_defined, is_common,
 					 version, visibility,
 					 /*is_linux_string_cst=*/false);
+
+  e->set_is_suppressed(is_suppressed);
   return e;
 }
 
@@ -2875,7 +2878,7 @@  build_elf_symbol_db(read_context& ctxt,
   elf_symbol_sptr sym;
   for (xmlNodePtr n = node->children; n; n = n->next)
     {
-      if ((sym = build_elf_symbol(ctxt, n, /*drop_if_suppress=*/true)))
+      if ((sym = build_elf_symbol(ctxt, n, /*drop_if_suppress=*/false)))
 	{
 	  id_sym_map[sym->get_id_string()] = sym;
 	  xml_node_ptr_elf_symbol_map[n] = sym;
diff --git a/src/abg-symtab-reader.cc b/src/abg-symtab-reader.cc
index a769934e5c05..512fbc20adc0 100644
--- a/src/abg-symtab-reader.cc
+++ b/src/abg-symtab-reader.cc
@@ -357,16 +357,22 @@  symtab::load_(string_elf_symbols_map_sptr function_symbol_map,
   if (function_symbol_map)
     for (const auto& symbol_map_entry : *function_symbol_map)
       {
-	symbols_.insert(symbols_.end(), symbol_map_entry.second.begin(),
-			symbol_map_entry.second.end());
+	for (const auto& symbol : symbol_map_entry.second)
+	  {
+	    if (!symbol->is_suppressed())
+	      symbols_.push_back(symbol);
+	  }
 	ABG_ASSERT(name_symbol_map_.insert(symbol_map_entry).second);
       }
 
   if (variables_symbol_map)
     for (const auto& symbol_map_entry : *variables_symbol_map)
       {
-	symbols_.insert(symbols_.end(), symbol_map_entry.second.begin(),
-			symbol_map_entry.second.end());
+	for (const auto& symbol : symbol_map_entry.second)
+	  {
+	    if (!symbol->is_suppressed())
+	      symbols_.push_back(symbol);
+	  }
 	ABG_ASSERT(name_symbol_map_.insert(symbol_map_entry).second);
       }
 
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index d4d5e5531894..c2fdd8f0a043 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -1728,7 +1728,10 @@  write_elf_symbol_aliases(const elf_symbol& sym, ostream& out)
 static bool
 write_elf_symbol_reference(const elf_symbol& sym, ostream& o)
 {
-  o << " elf-symbol-id='" << sym.get_id_string() << "'";
+  auto actual_sym = &sym;
+  while (actual_sym->is_suppressed() && actual_sym->has_aliases())
+    actual_sym = actual_sym->get_next_alias().get();
+  o << " elf-symbol-id='" << actual_sym->get_id_string() << "'";
   return true;
 }
 
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index d1358c9e9942..83e48cb8ebac 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -197,6 +197,9 @@  test-abidiff-exit/test-non-leaf-array-v0.o \
 test-abidiff-exit/test-non-leaf-array-v1.c \
 test-abidiff-exit/test-non-leaf-array-v1.o \
 test-abidiff-exit/test-non-leaf-array-report.txt \
+test-abidiff-exit/test-missing-alias-report.txt \
+test-abidiff-exit/test-missing-alias.abi \
+test-abidiff-exit/test-missing-alias.suppr \
 \
 test-diff-dwarf/test0-v0.cc		\
 test-diff-dwarf/test0-v0.o			\
@@ -450,6 +453,14 @@  test-read-dwarf/test3.c		\
 test-read-dwarf/test3.so		\
 test-read-dwarf/test3.so.abi		\
 test-read-dwarf/test3.so.hash.abi	\
+test-read-dwarf/test3-alias-1.so.hash.abi \
+test-read-dwarf/test3-alias-1.suppr \
+test-read-dwarf/test3-alias-2.so.hash.abi \
+test-read-dwarf/test3-alias-2.suppr \
+test-read-dwarf/test3-alias-3.so.hash.abi \
+test-read-dwarf/test3-alias-3.suppr \
+test-read-dwarf/test3-alias-4.so.hash.abi \
+test-read-dwarf/test3-alias-4.suppr \
 test-read-dwarf/test4.c		\
 test-read-dwarf/test4.so		\
 test-read-dwarf/test4.so.abi		\
@@ -535,6 +546,10 @@  test-read-dwarf/test-PR26568-1.o.abi \
 test-read-dwarf/test-PR26568-2.o.abi \
 test-read-dwarf/test-libandroid.so \
 test-read-dwarf/test-libandroid.so.abi \
+test-read-dwarf/test-suppressed-alias.c \
+test-read-dwarf/test-suppressed-alias.o \
+test-read-dwarf/test-suppressed-alias.o.abi \
+test-read-dwarf/test-suppressed-alias.suppr \
 \
 test-annotate/test0.abi			\
 test-annotate/test1.abi			\
diff --git a/tests/data/test-abidiff-exit/test-missing-alias-report.txt b/tests/data/test-abidiff-exit/test-missing-alias-report.txt
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/data/test-abidiff-exit/test-missing-alias.abi b/tests/data/test-abidiff-exit/test-missing-alias.abi
new file mode 100644
index 000000000000..07a13f5e6d15
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-missing-alias.abi
@@ -0,0 +1,12 @@ 
+<abi-corpus path='test.so' soname='test.so'>
+  <elf-function-symbols>
+    <elf-symbol name='__foo' type='func-type' binding='global-binding' visibility='default-visibility' alias='foo' is-defined='yes'/>
+    <elf-symbol name='foo' type='func-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
+  </elf-function-symbols>
+  <abi-instr version='1.0' address-size='64' path='test.c' language='LANG_C89'>
+    <type-decl name='void' id='48b5725f'/>
+    <function-decl name='__foo' mangled-name='__foo' filepath='test.c' line='8' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='__foo'>
+      <return type-id='48b5725f'/>
+    </function-decl>
+  </abi-instr>
+</abi-corpus>
diff --git a/tests/data/test-abidiff-exit/test-missing-alias.suppr b/tests/data/test-abidiff-exit/test-missing-alias.suppr
new file mode 100644
index 000000000000..bcebae43a350
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-missing-alias.suppr
@@ -0,0 +1,4 @@ 
+[suppress_function]
+  symbol_name_not_regexp = ^__foo$
+  drop = true
+
diff --git a/tests/data/test-diff-suppr/test31-report-0.txt b/tests/data/test-diff-suppr/test31-report-0.txt
index e69de29bb2d1..9666a8fddad7 100644
--- a/tests/data/test-diff-suppr/test31-report-0.txt
+++ b/tests/data/test-diff-suppr/test31-report-0.txt
@@ -0,0 +1,3 @@ 
+Functions changes summary: 0 Removed, 0 Changed (1 filtered out), 0 Added function
+Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
+
diff --git a/tests/data/test-diff-suppr/test32-report-1.txt b/tests/data/test-diff-suppr/test32-report-1.txt
index 2f785d0203dd..cffdf3a5aa4f 100644
--- a/tests/data/test-diff-suppr/test32-report-1.txt
+++ b/tests/data/test-diff-suppr/test32-report-1.txt
@@ -1,4 +1,4 @@ 
-Functions changes summary: 0 Removed, 1 Changed, 0 Added function
+Functions changes summary: 0 Removed, 1 Changed (1 filtered out), 0 Added functions
 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
 1 function with some indirect sub-type change:
diff --git a/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi b/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
index 98b691bb4eec..fac267b365e1 100644
--- a/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
+++ b/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
@@ -204,75 +204,78 @@ 
     <pointer-type-def type-id='type-id-54' size-in-bits='64' id='type-id-55'/>
     <qualified-type-def type-id='type-id-16' const='yes' id='type-id-56'/>
     <qualified-type-def type-id='type-id-57' const='yes' id='type-id-58'/>
-    <qualified-type-def type-id='type-id-59' const='yes' id='type-id-60'/>
+    <qualified-type-def type-id='type-id-59' id='type-id-60'/>
+    <reference-type-def kind='lvalue' type-id='type-id-58' size-in-bits='64' id='type-id-59'/>
     <qualified-type-def type-id='type-id-61' const='yes' id='type-id-62'/>
     <qualified-type-def type-id='type-id-63' const='yes' id='type-id-64'/>
     <qualified-type-def type-id='type-id-65' const='yes' id='type-id-66'/>
-    <qualified-type-def type-id='type-id-67' id='type-id-68'/>
-    <reference-type-def kind='lvalue' type-id='type-id-66' size-in-bits='64' id='type-id-67'/>
-    <qualified-type-def type-id='type-id-31' const='yes' id='type-id-69'/>
-    <pointer-type-def type-id='type-id-69' size-in-bits='64' id='type-id-70'/>
-    <qualified-type-def type-id='type-id-17' const='yes' id='type-id-71'/>
-    <qualified-type-def type-id='type-id-22' const='yes' id='type-id-72'/>
-    <pointer-type-def type-id='type-id-72' size-in-bits='64' id='type-id-73'/>
+    <qualified-type-def type-id='type-id-67' const='yes' id='type-id-68'/>
+    <qualified-type-def type-id='type-id-69' const='yes' id='type-id-70'/>
+    <qualified-type-def type-id='type-id-71' id='type-id-72'/>
+    <reference-type-def kind='lvalue' type-id='type-id-70' size-in-bits='64' id='type-id-71'/>
+    <qualified-type-def type-id='type-id-31' const='yes' id='type-id-73'/>
     <pointer-type-def type-id='type-id-73' size-in-bits='64' id='type-id-74'/>
-    <pointer-type-def type-id='type-id-33' size-in-bits='64' id='type-id-75'/>
-    <pointer-type-def type-id='type-id-28' size-in-bits='64' id='type-id-76'/>
+    <qualified-type-def type-id='type-id-17' const='yes' id='type-id-75'/>
+    <qualified-type-def type-id='type-id-22' const='yes' id='type-id-76'/>
+    <pointer-type-def type-id='type-id-76' size-in-bits='64' id='type-id-77'/>
     <pointer-type-def type-id='type-id-77' size-in-bits='64' id='type-id-78'/>
-    <pointer-type-def type-id='type-id-6' size-in-bits='64' id='type-id-79'/>
+    <pointer-type-def type-id='type-id-33' size-in-bits='64' id='type-id-79'/>
+    <pointer-type-def type-id='type-id-28' size-in-bits='64' id='type-id-80'/>
+    <pointer-type-def type-id='type-id-81' size-in-bits='64' id='type-id-82'/>
+    <pointer-type-def type-id='type-id-6' size-in-bits='64' id='type-id-83'/>
     <pointer-type-def type-id='type-id-21' size-in-bits='64' id='type-id-8'/>
-    <pointer-type-def type-id='type-id-22' size-in-bits='64' id='type-id-80'/>
-    <pointer-type-def type-id='type-id-80' size-in-bits='64' id='type-id-81'/>
+    <pointer-type-def type-id='type-id-22' size-in-bits='64' id='type-id-84'/>
+    <pointer-type-def type-id='type-id-84' size-in-bits='64' id='type-id-85'/>
     <namespace-decl name='std'>
-      <class-decl name='char_traits&lt;char&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/char_traits.h' line='233' column='1' id='type-id-82'>
+      <class-decl name='char_traits&lt;char&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/char_traits.h' line='233' column='1' id='type-id-86'>
         <member-type access='public'>
-          <typedef-decl name='char_type' type-id='type-id-2' filepath='/usr/include/c++/5.3.1/bits/char_traits.h' line='235' column='1' id='type-id-61'/>
+          <typedef-decl name='char_type' type-id='type-id-2' filepath='/usr/include/c++/5.3.1/bits/char_traits.h' line='235' column='1' id='type-id-65'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='int_type' type-id='type-id-11' filepath='/usr/include/c++/5.3.1/bits/char_traits.h' line='236' column='1' id='type-id-63'/>
+          <typedef-decl name='int_type' type-id='type-id-11' filepath='/usr/include/c++/5.3.1/bits/char_traits.h' line='236' column='1' id='type-id-67'/>
         </member-type>
       </class-decl>
-      <typedef-decl name='string' type-id='type-id-83' filepath='/usr/include/c++/5.3.1/bits/stringfwd.h' line='74' column='1' id='type-id-65'/>
-      <class-decl name='basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;' size-in-bits='64' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2510' column='1' id='type-id-83'>
+      <typedef-decl name='string' type-id='type-id-57' filepath='/usr/include/c++/5.3.1/bits/stringfwd.h' line='74' column='1' id='type-id-69'/>
+      <class-decl name='basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;' size-in-bits='64' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2510' column='1' id='type-id-57'>
         <member-type access='private'>
-          <class-decl name='_Alloc_hider' size-in-bits='64' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2670' column='1' id='type-id-84'>
-            <base-class access='public' layout-offset-in-bits='0' type-id='type-id-85'/>
+          <class-decl name='_Alloc_hider' size-in-bits='64' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2670' column='1' id='type-id-87'>
+            <base-class access='public' layout-offset-in-bits='0' type-id='type-id-88'/>
             <data-member access='public' layout-offset-in-bits='0'>
               <var-decl name='_M_p' type-id='type-id-34' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2675' column='1'/>
             </data-member>
           </class-decl>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='size_type' type-id='type-id-86' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2519' column='1' id='type-id-59'/>
+          <typedef-decl name='size_type' type-id='type-id-89' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2519' column='1' id='type-id-63'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='allocator_type' type-id='type-id-85' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2518' column='1' id='type-id-87'/>
+          <typedef-decl name='allocator_type' type-id='type-id-88' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2518' column='1' id='type-id-90'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='reference' type-id='type-id-89' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2521' column='1' id='type-id-88'/>
+          <typedef-decl name='reference' type-id='type-id-92' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2521' column='1' id='type-id-91'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='const_reference' type-id='type-id-91' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2522' column='1' id='type-id-90'/>
+          <typedef-decl name='const_reference' type-id='type-id-94' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2522' column='1' id='type-id-93'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='iterator' type-id='type-id-93' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2525' column='1' id='type-id-92'/>
+          <typedef-decl name='iterator' type-id='type-id-96' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2525' column='1' id='type-id-95'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='const_iterator' type-id='type-id-95' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2527' column='1' id='type-id-94'/>
+          <typedef-decl name='const_iterator' type-id='type-id-98' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2527' column='1' id='type-id-97'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='const_reverse_iterator' type-id='type-id-97' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2528' column='1' id='type-id-96'/>
+          <typedef-decl name='const_reverse_iterator' type-id='type-id-100' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2528' column='1' id='type-id-99'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='reverse_iterator' type-id='type-id-99' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2529' column='1' id='type-id-98'/>
+          <typedef-decl name='reverse_iterator' type-id='type-id-102' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2529' column='1' id='type-id-101'/>
         </member-type>
         <member-type access='private'>
-          <class-decl name='_Rep_base' size-in-bits='192' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2546' column='1' id='type-id-100'>
+          <class-decl name='_Rep_base' size-in-bits='192' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2546' column='1' id='type-id-103'>
             <data-member access='public' layout-offset-in-bits='0'>
-              <var-decl name='_M_length' type-id='type-id-59' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2548' column='1'/>
+              <var-decl name='_M_length' type-id='type-id-63' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2548' column='1'/>
             </data-member>
             <data-member access='public' layout-offset-in-bits='64'>
-              <var-decl name='_M_capacity' type-id='type-id-59' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2549' column='1'/>
+              <var-decl name='_M_capacity' type-id='type-id-63' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2549' column='1'/>
             </data-member>
             <data-member access='public' layout-offset-in-bits='128'>
               <var-decl name='_M_refcount' type-id='type-id-39' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2550' column='1'/>
@@ -280,10 +283,10 @@ 
           </class-decl>
         </member-type>
         <member-type access='private'>
-          <class-decl name='_Rep' size-in-bits='192' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2553' column='1' id='type-id-57'>
-            <base-class access='public' layout-offset-in-bits='0' type-id='type-id-100'/>
+          <class-decl name='_Rep' size-in-bits='192' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2553' column='1' id='type-id-61'>
+            <base-class access='public' layout-offset-in-bits='0' type-id='type-id-103'/>
             <data-member access='public' static='yes'>
-              <var-decl name='_S_max_size' type-id='type-id-60' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.tcc' line='494' column='1'/>
+              <var-decl name='_S_max_size' type-id='type-id-64' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.tcc' line='494' column='1'/>
             </data-member>
             <data-member access='public' static='yes'>
               <var-decl name='_S_terminal' type-id='type-id-49' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.tcc' line='499' column='1'/>
@@ -294,29 +297,34 @@ 
           </class-decl>
         </member-type>
         <data-member access='public' static='yes'>
-          <var-decl name='npos' type-id='type-id-60' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2683' column='1'/>
+          <var-decl name='npos' type-id='type-id-64' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2683' column='1'/>
         </data-member>
         <data-member access='private' layout-offset-in-bits='0'>
-          <var-decl name='_M_dataplus' type-id='type-id-84' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2687' column='1'/>
+          <var-decl name='_M_dataplus' type-id='type-id-87' visibility='default' filepath='/usr/include/c++/5.3.1/bits/basic_string.h' line='2687' column='1'/>
         </data-member>
       </class-decl>
-      <class-decl name='allocator&lt;char&gt;' size-in-bits='8' visibility='default' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='92' column='1' id='type-id-85'>
+      <class-decl name='allocator&lt;char&gt;' size-in-bits='8' visibility='default' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='92' column='1' id='type-id-88'>
         <base-class access='public' layout-offset-in-bits='0' type-id='type-id-41'/>
         <member-type access='public'>
-          <typedef-decl name='size_type' type-id='type-id-101' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='95' column='1' id='type-id-86'/>
+          <typedef-decl name='size_type' type-id='type-id-104' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='95' column='1' id='type-id-89'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='reference' type-id='type-id-43' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='99' column='1' id='type-id-89'/>
+          <typedef-decl name='reference' type-id='type-id-43' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='99' column='1' id='type-id-92'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='const_reference' type-id='type-id-50' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='100' column='1' id='type-id-91'/>
+          <typedef-decl name='const_reference' type-id='type-id-50' filepath='/usr/include/c++/5.3.1/bits/allocator.h' line='100' column='1' id='type-id-94'/>
         </member-type>
       </class-decl>
-      <typedef-decl name='size_t' type-id='type-id-17' filepath='/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h' line='1969' column='1' id='type-id-101'/>
-      <typedef-decl name='ostream' type-id='type-id-102' filepath='/usr/include/c++/5.3.1/iosfwd' line='141' column='1' id='type-id-77'/>
-      <class-decl name='reverse_iterator&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-97'/>
-      <class-decl name='reverse_iterator&lt;__gnu_cxx::__normal_iterator&lt;char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-99'/>
-      <class-decl name='basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-102'/>
+      <typedef-decl name='size_t' type-id='type-id-17' filepath='/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h' line='1969' column='1' id='type-id-104'/>
+      <typedef-decl name='ostream' type-id='type-id-105' filepath='/usr/include/c++/5.3.1/iosfwd' line='141' column='1' id='type-id-81'/>
+      <class-decl name='reverse_iterator&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-100'/>
+      <class-decl name='reverse_iterator&lt;__gnu_cxx::__normal_iterator&lt;char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-102'/>
+      <class-decl name='basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-105'/>
+      <function-decl name='operator+&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;' mangled-name='_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_' filepath='/usr/include/c++/5.3.1/bits/basic_string.tcc' line='1151' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_'>
+        <parameter type-id='type-id-32' name='__lhs' filepath='/usr/include/c++/5.3.1/bits/basic_string.tcc' line='1151' column='1'/>
+        <parameter type-id='type-id-60' name='__rhs' filepath='/usr/include/c++/5.3.1/bits/basic_string.tcc' line='1152' column='1'/>
+        <return type-id='type-id-57'/>
+      </function-decl>
     </namespace-decl>
     <function-decl name='btowc' filepath='/usr/include/wchar.h' line='353' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-11'/>
@@ -327,10 +335,10 @@ 
       <return type-id='type-id-23'/>
     </function-decl>
     <function-decl name='fgetws' filepath='/usr/include/wchar.h' line='774' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
       <parameter type-id='type-id-11'/>
       <parameter type-id='type-id-40'/>
-      <return type-id='type-id-80'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='fputwc' filepath='/usr/include/wchar.h' line='759' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-22'/>
@@ -338,7 +346,7 @@ 
       <return type-id='type-id-23'/>
     </function-decl>
     <function-decl name='fputws' filepath='/usr/include/wchar.h' line='781' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-40'/>
       <return type-id='type-id-11'/>
     </function-decl>
@@ -349,13 +357,13 @@ 
     </function-decl>
     <function-decl name='fwprintf' filepath='/usr/include/wchar.h' line='594' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-40'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
       <parameter is-variadic='yes'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='fwscanf' filepath='/usr/include/wchar.h' line='635' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-40'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
       <parameter is-variadic='yes'/>
       <return type-id='type-id-11'/>
     </function-decl>
@@ -369,14 +377,14 @@ 
     <function-decl name='mbrlen' filepath='/usr/include/wchar.h' line='376' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-32'/>
       <parameter type-id='type-id-26'/>
-      <parameter type-id='type-id-76'/>
+      <parameter type-id='type-id-80'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='mbrtowc' filepath='/usr/include/wchar.h' line='365' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
       <parameter type-id='type-id-32'/>
       <parameter type-id='type-id-26'/>
-      <parameter type-id='type-id-76'/>
+      <parameter type-id='type-id-80'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='mbsinit' filepath='/usr/include/wchar.h' line='361' column='1' visibility='default' binding='global' size-in-bits='64'>
@@ -384,10 +392,10 @@ 
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='mbsrtowcs' filepath='/usr/include/wchar.h' line='408' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
       <parameter type-id='type-id-51'/>
       <parameter type-id='type-id-26'/>
-      <parameter type-id='type-id-76'/>
+      <parameter type-id='type-id-80'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='putwc' filepath='/usr/include/wchar.h' line='760' column='1' visibility='default' binding='global' size-in-bits='64'>
@@ -400,15 +408,15 @@ 
       <return type-id='type-id-23'/>
     </function-decl>
     <function-decl name='swprintf' filepath='/usr/include/wchar.h' line='604' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
       <parameter type-id='type-id-26'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
       <parameter is-variadic='yes'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='swscanf' filepath='/usr/include/wchar.h' line='645' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
       <parameter is-variadic='yes'/>
       <return type-id='type-id-11'/>
     </function-decl>
@@ -419,142 +427,142 @@ 
     </function-decl>
     <function-decl name='vfwprintf' filepath='/usr/include/wchar.h' line='612' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-40'/>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-79'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-83'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='vfwscanf' filepath='/usr/include/wchar.h' line='689' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-40'/>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-79'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-83'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='vswprintf' filepath='/usr/include/wchar.h' line='625' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
       <parameter type-id='type-id-26'/>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-79'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-83'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='vswscanf' filepath='/usr/include/wchar.h' line='701' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-79'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-83'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='vwprintf' filepath='/usr/include/wchar.h' line='620' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-79'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-83'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='vwscanf' filepath='/usr/include/wchar.h' line='697' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-79'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-83'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='wcrtomb' filepath='/usr/include/wchar.h' line='370' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-34'/>
       <parameter type-id='type-id-22'/>
-      <parameter type-id='type-id-76'/>
+      <parameter type-id='type-id-80'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='wcscat' filepath='/usr/include/wchar.h' line='155' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
-      <return type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wcscmp' filepath='/usr/include/wchar.h' line='163' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='wcscoll' filepath='/usr/include/wchar.h' line='192' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='wcscpy' filepath='/usr/include/wchar.h' line='147' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
-      <return type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wcscspn' filepath='/usr/include/wchar.h' line='252' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='wcsftime' filepath='/usr/include/wchar.h' line='855' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
       <parameter type-id='type-id-26'/>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-70'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-74'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='wcslen' filepath='/usr/include/wchar.h' line='287' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='wcsncat' filepath='/usr/include/wchar.h' line='158' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-26'/>
-      <return type-id='type-id-80'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wcsncmp' filepath='/usr/include/wchar.h' line='166' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-26'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='wcsncpy' filepath='/usr/include/wchar.h' line='150' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-26'/>
-      <return type-id='type-id-80'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wcsrtombs' filepath='/usr/include/wchar.h' line='414' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-34'/>
-      <parameter type-id='type-id-74'/>
+      <parameter type-id='type-id-78'/>
       <parameter type-id='type-id-26'/>
-      <parameter type-id='type-id-76'/>
+      <parameter type-id='type-id-80'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='wcsspn' filepath='/usr/include/wchar.h' line='256' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
       <return type-id='type-id-26'/>
     </function-decl>
     <function-decl name='wcstod' filepath='/usr/include/wchar.h' line='450' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
       <return type-id='type-id-9'/>
     </function-decl>
     <function-decl name='wcstof' filepath='/usr/include/wchar.h' line='457' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
       <return type-id='type-id-10'/>
     </function-decl>
     <function-decl name='wcstok' filepath='/usr/include/wchar.h' line='282' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
-      <return type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wcstol' filepath='/usr/include/wchar.h' line='468' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
       <parameter type-id='type-id-11'/>
       <return type-id='type-id-13'/>
     </function-decl>
     <function-decl name='wcstoul' filepath='/usr/include/wchar.h' line='473' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
       <parameter type-id='type-id-11'/>
       <return type-id='type-id-17'/>
     </function-decl>
     <function-decl name='wcsxfrm' filepath='/usr/include/wchar.h' line='196' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-26'/>
       <return type-id='type-id-26'/>
     </function-decl>
@@ -563,58 +571,58 @@ 
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='wmemcmp' filepath='/usr/include/wchar.h' line='325' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-26'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='wmemcpy' filepath='/usr/include/wchar.h' line='329' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-26'/>
-      <return type-id='type-id-80'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wmemmove' filepath='/usr/include/wchar.h' line='334' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-84'/>
+      <parameter type-id='type-id-77'/>
       <parameter type-id='type-id-26'/>
-      <return type-id='type-id-80'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wmemset' filepath='/usr/include/wchar.h' line='338' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-80'/>
+      <parameter type-id='type-id-84'/>
       <parameter type-id='type-id-22'/>
       <parameter type-id='type-id-26'/>
-      <return type-id='type-id-80'/>
+      <return type-id='type-id-84'/>
     </function-decl>
     <function-decl name='wprintf' filepath='/usr/include/wchar.h' line='601' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
       <parameter is-variadic='yes'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <function-decl name='wscanf' filepath='/usr/include/wchar.h' line='642' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
+      <parameter type-id='type-id-77'/>
       <parameter is-variadic='yes'/>
       <return type-id='type-id-11'/>
     </function-decl>
     <namespace-decl name='__gnu_cxx'>
       <class-decl name='new_allocator&lt;char&gt;' size-in-bits='8' visibility='default' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='58' column='1' id='type-id-41'>
         <member-type access='public'>
-          <typedef-decl name='size_type' type-id='type-id-101' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='61' column='1' id='type-id-103'/>
+          <typedef-decl name='size_type' type-id='type-id-104' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='61' column='1' id='type-id-106'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='pointer' type-id='type-id-34' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='63' column='1' id='type-id-104'/>
+          <typedef-decl name='pointer' type-id='type-id-34' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='63' column='1' id='type-id-107'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='const_pointer' type-id='type-id-32' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='64' column='1' id='type-id-105'/>
+          <typedef-decl name='const_pointer' type-id='type-id-32' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='64' column='1' id='type-id-108'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='reference' type-id='type-id-43' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='65' column='1' id='type-id-106'/>
+          <typedef-decl name='reference' type-id='type-id-43' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='65' column='1' id='type-id-109'/>
         </member-type>
         <member-type access='public'>
-          <typedef-decl name='const_reference' type-id='type-id-50' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='66' column='1' id='type-id-107'/>
+          <typedef-decl name='const_reference' type-id='type-id-50' filepath='/usr/include/c++/5.3.1/ext/new_allocator.h' line='66' column='1' id='type-id-110'/>
         </member-type>
       </class-decl>
-      <class-decl name='__numeric_traits_integer&lt;int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-108'>
+      <class-decl name='__numeric_traits_integer&lt;int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-111'>
         <data-member access='public' static='yes'>
           <var-decl name='__min' type-id='type-id-52' mangled-name='_ZN9__gnu_cxx24__numeric_traits_integerIiE5__minE' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='58' column='1'/>
         </data-member>
@@ -628,12 +636,12 @@ 
           <var-decl name='__digits' type-id='type-id-52' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='64' column='1'/>
         </data-member>
       </class-decl>
-      <class-decl name='__numeric_traits_integer&lt;long unsigned int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-109'>
+      <class-decl name='__numeric_traits_integer&lt;long unsigned int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-112'>
         <data-member access='public' static='yes'>
-          <var-decl name='__min' type-id='type-id-71' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='58' column='1'/>
+          <var-decl name='__min' type-id='type-id-75' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='58' column='1'/>
         </data-member>
         <data-member access='public' static='yes'>
-          <var-decl name='__max' type-id='type-id-71' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='59' column='1'/>
+          <var-decl name='__max' type-id='type-id-75' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='59' column='1'/>
         </data-member>
         <data-member access='public' static='yes'>
           <var-decl name='__is_signed' type-id='type-id-48' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='63' column='1'/>
@@ -642,7 +650,7 @@ 
           <var-decl name='__digits' type-id='type-id-52' mangled-name='_ZN9__gnu_cxx24__numeric_traits_integerImE8__digitsE' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='64' column='1'/>
         </data-member>
       </class-decl>
-      <class-decl name='__numeric_traits_integer&lt;char&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-110'>
+      <class-decl name='__numeric_traits_integer&lt;char&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-113'>
         <data-member access='public' static='yes'>
           <var-decl name='__min' type-id='type-id-49' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='58' column='1'/>
         </data-member>
@@ -656,7 +664,7 @@ 
           <var-decl name='__digits' type-id='type-id-52' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='64' column='1'/>
         </data-member>
       </class-decl>
-      <class-decl name='__numeric_traits_integer&lt;short int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-111'>
+      <class-decl name='__numeric_traits_integer&lt;short int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-114'>
         <data-member access='public' static='yes'>
           <var-decl name='__min' type-id='type-id-56' mangled-name='_ZN9__gnu_cxx24__numeric_traits_integerIsE5__minE' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='58' column='1'/>
         </data-member>
@@ -670,7 +678,7 @@ 
           <var-decl name='__digits' type-id='type-id-52' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='64' column='1'/>
         </data-member>
       </class-decl>
-      <class-decl name='__numeric_traits_integer&lt;long int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-112'>
+      <class-decl name='__numeric_traits_integer&lt;long int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='55' column='1' id='type-id-115'>
         <data-member access='public' static='yes'>
           <var-decl name='__min' type-id='type-id-53' mangled-name='_ZN9__gnu_cxx24__numeric_traits_integerIlE5__minE' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='58' column='1'/>
         </data-member>
@@ -684,23 +692,23 @@ 
           <var-decl name='__digits' type-id='type-id-52' visibility='default' filepath='/usr/include/c++/5.3.1/ext/numeric_traits.h' line='64' column='1'/>
         </data-member>
       </class-decl>
-      <class-decl name='__normal_iterator&lt;char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-93'/>
-      <class-decl name='__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-95'/>
+      <class-decl name='__normal_iterator&lt;char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-96'/>
+      <class-decl name='__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;' visibility='default' is-declaration-only='yes' id='type-id-98'/>
     </namespace-decl>
     <function-decl name='wcstold' filepath='/usr/include/wchar.h' line='459' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
       <return type-id='type-id-12'/>
     </function-decl>
     <function-decl name='wcstoll' filepath='/usr/include/wchar.h' line='483' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
       <parameter type-id='type-id-11'/>
       <return type-id='type-id-14'/>
     </function-decl>
     <function-decl name='wcstoull' filepath='/usr/include/wchar.h' line='490' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <parameter type-id='type-id-73'/>
-      <parameter type-id='type-id-81'/>
+      <parameter type-id='type-id-77'/>
+      <parameter type-id='type-id-85'/>
       <parameter type-id='type-id-11'/>
       <return type-id='type-id-15'/>
     </function-decl>
@@ -710,7 +718,7 @@ 
       <return type-id='type-id-34'/>
     </function-decl>
     <function-decl name='localeconv' filepath='/usr/include/locale.h' line='127' column='1' visibility='default' binding='global' size-in-bits='64'>
-      <return type-id='type-id-75'/>
+      <return type-id='type-id-79'/>
     </function-decl>
     <function-decl name='iswctype' filepath='/usr/include/wctype.h' line='175' column='1' visibility='default' binding='global' size-in-bits='64'>
       <parameter type-id='type-id-23'/>
@@ -731,12 +739,12 @@ 
       <return type-id='type-id-35'/>
     </function-decl>
     <function-decl name='foo' mangled-name='_Z3fooRKSs' filepath='/home/dodji/git/libabigail.git/suppr/tests/data/test-read-dwarf/test24-drop-fns.cc' line='14' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Z3fooRKSs'>
-      <parameter type-id='type-id-68' name='s' filepath='/home/dodji/git/libabigail.git/suppr/tests/data/test-read-dwarf/test24-drop-fns.cc' line='14' column='1'/>
-      <return type-id='type-id-65'/>
+      <parameter type-id='type-id-72' name='s' filepath='/home/dodji/git/libabigail.git/suppr/tests/data/test-read-dwarf/test24-drop-fns.cc' line='14' column='1'/>
+      <return type-id='type-id-69'/>
     </function-decl>
     <function-decl name='bar' mangled-name='_Z3barRKSs' filepath='/home/dodji/git/libabigail.git/suppr/tests/data/test-read-dwarf/test24-drop-fns.cc' line='21' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Z3barRKSs'>
-      <parameter type-id='type-id-68' name='str' filepath='/home/dodji/git/libabigail.git/suppr/tests/data/test-read-dwarf/test24-drop-fns.cc' line='21' column='1'/>
-      <return type-id='type-id-78'/>
+      <parameter type-id='type-id-72' name='str' filepath='/home/dodji/git/libabigail.git/suppr/tests/data/test-read-dwarf/test24-drop-fns.cc' line='21' column='1'/>
+      <return type-id='type-id-82'/>
     </function-decl>
     <class-decl name='_IO_FILE' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-24'/>
   </abi-instr>
diff --git a/tests/data/test-read-dwarf/test-suppressed-alias.c b/tests/data/test-read-dwarf/test-suppressed-alias.c
new file mode 100644
index 000000000000..a7812736c44b
--- /dev/null
+++ b/tests/data/test-read-dwarf/test-suppressed-alias.c
@@ -0,0 +1,16 @@ 
+
+// function aliases
+
+void main_func(void);
+void alias_func(void) __attribute__((weak, alias("main_func")));
+
+void main_func(void)
+{
+
+}
+
+// variables aliases
+
+int main_var;
+extern int alias_var __attribute__((weak, alias("main_var")));
+
diff --git a/tests/data/test-read-dwarf/test-suppressed-alias.o b/tests/data/test-read-dwarf/test-suppressed-alias.o
new file mode 100644
index 0000000000000000000000000000000000000000..10d4a94a18c9c249c5ed3b60ada8c4f8cc5393ae
GIT binary patch
literal 2848
zcmbtVPjA#l6o0c$NWvyd{<M^BTFF!th=jdKg#rZywrop4MO9P@!2wvtyOWKD*QT}?
zLVG|+RYh+cDz%k*sMJe8LVNCK=?Cb!hw|QdUe-G}r#{K^-u&KQKff72|LoTFnh?Mw
z;0la)i~>A7GM3v~Y{LpH!|fa2|NZLzUob>$O5?NIeO}9@Wu_$8NEVIh4zf9i70%Rj
z80SS4acrKH)1(tK2e~<j_yxq0_^`23cN(jWC9yoS_zpnrJUER@^~?2->o-@fHftvU
zoKsM*U#UB@Sly%+gZpr`$qr|l6s3LQ$7@YYc@7_4B%ou7IDZM!;ssnCcpq0G{%tJa
zs#}Vk5Rj`Z_j}rGTEJWp7Prk?H3tocGK{;sqqqlJdLmQykWnbJE&;8lSxd(KGzt4H
znPiV!k5n3~$O}ec)c5iviL#d3&k>YSD+&V{gaa8yu>Hktx3h7<-B|ZO^4DE&n2%z$
zHBhli!yayB+S}XOzqsjbo_D>0>+Q<yS=`%8lQ<b=-Y9+=#u#1(k;(wJJDp4J*-upv
z%GgBoHa6FcsNWBlw~QdZ{u0FgqF9}unSF(Qcn@)Uh;$b}X)JzM>nt3(h6V*(xzaFA
z!9V|1DY1Q3Fn)=HCQs-c)KrmUCfC+Ea4>iiDyMjZ35+%l%)NmXc>NH3;SjuW2>!;Y
z((}1o>H|;cGDi5I0;d^WD)pf_vjC?NKUsnEFpkHx7|Y3t9giw^>?p=#8AagA38yaI
zBM@n+V8Hl_*}rY!r_7#CClP)5@>gEdDCjuldGbp*<)u7CmkXxj95XVp&yCFWyleJ%
zEZl72ff4L__}wXvzQv5);vx2Q;}F?#T#Xj*T7F;fvu8s*n#l9C;Cn3Pco%@*m$?K#
z$TIL#6-mFZg3+KG#=8mXv@C-lRZk|=GL`WFPkY%V3S-4Cm;(G>G8`(rsr@*~m5-N<
zm*uke$T+FJ?rtiF$`t-T*(&-|Pq?2Pu5ARKcgD%KOeb+en0@lM%SI*H_CJF<nkU=;
zhVkL^!y)Yb1}f~BWXt|vv7_O(EzJeRY#TkZ9h0c|+XB#B5yZ2P|2|DyxY{vE@u$`T
z+&7$=ZM%aC8zbA}23%)H!);qSPgV8bHHU)zsebyFcKv<C?3f6_bp!G_CXC3o?IKo{
z|E0;#eWLtyKiK&no0wcDZZ*9yiGF9maL&*C8^lSr{nyN4c8wo1_GA7nDp+P4;x{KQ
zgR#c8{TWq++2%V2xHxvz62CvgKcG<6zh5i*M}IB$=e}0urr0k{{+~?2^dF$Vq3uuK
e#6EinflEap*?qO&pW;^e|6%I?O-C6ow*PChA-^pE

literal 0
HcmV?d00001

diff --git a/tests/data/test-read-dwarf/test-suppressed-alias.o.abi b/tests/data/test-read-dwarf/test-suppressed-alias.o.abi
new file mode 100644
index 000000000000..c0af2d84f12a
--- /dev/null
+++ b/tests/data/test-read-dwarf/test-suppressed-alias.o.abi
@@ -0,0 +1,16 @@ 
+<abi-corpus path='data/test-read-dwarf/test-suppressed-alias.o'>
+  <elf-function-symbols>
+    <elf-symbol name='alias_func' type='func-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
+  </elf-function-symbols>
+  <elf-variable-symbols>
+    <elf-symbol name='alias_var' size='4' type='object-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
+  </elf-variable-symbols>
+  <abi-instr version='1.0' address-size='64' path='test.c' comp-dir-path='/ws/android/aosp/kernel-build-tools/external/libabigail' language='LANG_C99'>
+    <type-decl name='int' size-in-bits='32' id='95e97e5e'/>
+    <type-decl name='void' id='48b5725f'/>
+    <var-decl name='main_var' type-id='95e97e5e' mangled-name='main_var' visibility='default' filepath='/ws/android/aosp/kernel-build-tools/external/libabigail/test.c' line='14' column='1' elf-symbol-id='alias_var'/>
+    <function-decl name='main_func' mangled-name='main_func' filepath='/ws/android/aosp/kernel-build-tools/external/libabigail/test.c' line='7' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='alias_func'>
+      <return type-id='48b5725f'/>
+    </function-decl>
+  </abi-instr>
+</abi-corpus>
diff --git a/tests/data/test-read-dwarf/test-suppressed-alias.suppr b/tests/data/test-read-dwarf/test-suppressed-alias.suppr
new file mode 100644
index 000000000000..3f0790a23f8c
--- /dev/null
+++ b/tests/data/test-read-dwarf/test-suppressed-alias.suppr
@@ -0,0 +1,7 @@ 
+[suppress_function]
+  symbol_name = main_func
+  drop = true
+
+[suppress_variable]
+  symbol_name = main_var
+  drop = true
diff --git a/tests/data/test-read-dwarf/test3-alias-1.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-1.so.hash.abi
new file mode 100644
index 000000000000..1ed4b0612886
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-1.so.hash.abi
@@ -0,0 +1,14 @@ 
+<abi-corpus path='data/test-read-dwarf/test3.so' soname='test3.so.1'>
+  <elf-needed>
+    <dependency name='libc.so.6'/>
+  </elf-needed>
+  <elf-function-symbols>
+    <elf-symbol name='__foo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+  </elf-function-symbols>
+  <abi-instr version='1.0' address-size='64' path='test3.c' comp-dir-path='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf' language='LANG_C89'>
+    <type-decl name='void' id='48b5725f'/>
+    <function-decl name='__foo' mangled-name='__foo' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test3.c' line='8' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='__foo'>
+      <return type-id='48b5725f'/>
+    </function-decl>
+  </abi-instr>
+</abi-corpus>
diff --git a/tests/data/test-read-dwarf/test3-alias-1.suppr b/tests/data/test-read-dwarf/test3-alias-1.suppr
new file mode 100644
index 000000000000..b347500d4c4e
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-1.suppr
@@ -0,0 +1,3 @@ 
+[suppress_function]
+  symbol_name_not_regexp = ^__foo$
+  drop = true
diff --git a/tests/data/test-read-dwarf/test3-alias-2.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-2.so.hash.abi
new file mode 100644
index 000000000000..50a53f97bf84
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-2.so.hash.abi
@@ -0,0 +1,18 @@ 
+<abi-corpus path='data/test-read-dwarf/test3.so' soname='test3.so.1'>
+  <elf-needed>
+    <dependency name='libc.so.6'/>
+  </elf-needed>
+  <elf-function-symbols>
+    <elf-symbol name='__foo__' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+    <elf-symbol name='_fini' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+    <elf-symbol name='_init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+    <elf-symbol name='foo' type='func-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
+    <elf-symbol name='foo__' type='func-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
+  </elf-function-symbols>
+  <abi-instr version='1.0' address-size='64' path='test3.c' comp-dir-path='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf' language='LANG_C89'>
+    <type-decl name='void' id='48b5725f'/>
+    <function-decl name='__foo' mangled-name='__foo' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test3.c' line='8' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='foo'>
+      <return type-id='48b5725f'/>
+    </function-decl>
+  </abi-instr>
+</abi-corpus>
diff --git a/tests/data/test-read-dwarf/test3-alias-2.suppr b/tests/data/test-read-dwarf/test3-alias-2.suppr
new file mode 100644
index 000000000000..b6d203d53c2b
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-2.suppr
@@ -0,0 +1,3 @@ 
+[suppress_function]
+  symbol_name_regexp = ^__foo$
+  drop = true
diff --git a/tests/data/test-read-dwarf/test3-alias-3.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-3.so.hash.abi
new file mode 100644
index 000000000000..6de4d59b13d5
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-3.so.hash.abi
@@ -0,0 +1,14 @@ 
+<abi-corpus path='data/test-read-dwarf/test3.so' soname='test3.so.1'>
+  <elf-needed>
+    <dependency name='libc.so.6'/>
+  </elf-needed>
+  <elf-function-symbols>
+    <elf-symbol name='foo' type='func-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
+  </elf-function-symbols>
+  <abi-instr version='1.0' address-size='64' path='test3.c' comp-dir-path='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf' language='LANG_C89'>
+    <type-decl name='void' id='48b5725f'/>
+    <function-decl name='__foo' mangled-name='__foo' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test3.c' line='8' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='foo'>
+      <return type-id='48b5725f'/>
+    </function-decl>
+  </abi-instr>
+</abi-corpus>
diff --git a/tests/data/test-read-dwarf/test3-alias-3.suppr b/tests/data/test-read-dwarf/test3-alias-3.suppr
new file mode 100644
index 000000000000..66cd33a8d353
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-3.suppr
@@ -0,0 +1,3 @@ 
+[suppress_function]
+  symbol_name_not_regexp = ^foo$
+  drop = true
diff --git a/tests/data/test-read-dwarf/test3-alias-4.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-4.so.hash.abi
new file mode 100644
index 000000000000..b26d12f80e61
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-4.so.hash.abi
@@ -0,0 +1,8 @@ 
+<abi-corpus path='data/test-read-dwarf/test3.so' soname='test3.so.1'>
+  <elf-needed>
+    <dependency name='libc.so.6'/>
+  </elf-needed>
+  <elf-function-symbols>
+    <elf-symbol name='_init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+  </elf-function-symbols>
+</abi-corpus>
diff --git a/tests/data/test-read-dwarf/test3-alias-4.suppr b/tests/data/test-read-dwarf/test3-alias-4.suppr
new file mode 100644
index 000000000000..25a2c437f51e
--- /dev/null
+++ b/tests/data/test-read-dwarf/test3-alias-4.suppr
@@ -0,0 +1,3 @@ 
+[suppress_function]
+  symbol_name_not_regexp = ^_init$
+  drop = true
diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc
index 4283e1455d67..38f1301eb924 100644
--- a/tests/test-abidiff-exit.cc
+++ b/tests/test-abidiff-exit.cc
@@ -392,6 +392,17 @@  InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-non-leaf-array-report.txt",
     "output/test-abidiff-exit/test-non-leaf-array-report.txt"
   },
+  {
+    "data/test-abidiff-exit/test-missing-alias.abi",
+    "data/test-abidiff-exit/test-missing-alias.abi",
+    "data/test-abidiff-exit/test-missing-alias.suppr",
+    "",
+    "",
+    "",
+    abigail::tools_utils::ABIDIFF_OK,
+    "data/test-abidiff-exit/test-missing-alias-report.txt",
+    "output/test-abidiff-exit/test-missing-alias-report.txt"
+  },
   {0, 0, 0 ,0, 0, 0, abigail::tools_utils::ABIDIFF_OK, 0, 0}
 };
 
diff --git a/tests/test-read-dwarf.cc b/tests/test-read-dwarf.cc
index 1212e11c0663..e327909fb803 100644
--- a/tests/test-read-dwarf.cc
+++ b/tests/test-read-dwarf.cc
@@ -110,6 +110,46 @@  InOutSpec in_out_specs[] =
     "data/test-read-dwarf/test3.so.hash.abi",
     "output/test-read-dwarf/test3.so.hash.abi"
   },
+  // suppress all except the main symbol of a group of aliases
+  {
+    "data/test-read-dwarf/test3.so",
+    "data/test-read-dwarf/test3-alias-1.suppr",
+    HASH_TYPE_ID_STYLE,
+    "data/test-read-dwarf/test3-alias-1.so.hash.abi",
+    "output/test-read-dwarf/test3-alias-1.so.hash.abi"
+  },
+  // suppress the main symbol of a group of aliases
+  {
+    "data/test-read-dwarf/test3.so",
+    "data/test-read-dwarf/test3-alias-2.suppr",
+    HASH_TYPE_ID_STYLE,
+    "data/test-read-dwarf/test3-alias-2.so.hash.abi",
+    "output/test-read-dwarf/test3-alias-2.so.hash.abi"
+  },
+  // suppress all except one non main symbol of a group of aliases
+  {
+    "data/test-read-dwarf/test3.so",
+    "data/test-read-dwarf/test3-alias-3.suppr",
+    HASH_TYPE_ID_STYLE,
+    "data/test-read-dwarf/test3-alias-3.so.hash.abi",
+    "output/test-read-dwarf/test3-alias-3.so.hash.abi"
+  },
+  // suppress all symbols of a group of aliases
+  {
+    "data/test-read-dwarf/test3.so",
+    "data/test-read-dwarf/test3-alias-4.suppr",
+    HASH_TYPE_ID_STYLE,
+    "data/test-read-dwarf/test3-alias-4.so.hash.abi",
+    "output/test-read-dwarf/test3-alias-4.so.hash.abi"
+  },
+  // suppress the main symbols with alias (function+variable) in .o file
+  {
+    "data/test-read-dwarf/test-suppressed-alias.o",
+    "data/test-read-dwarf/test-suppressed-alias.suppr",
+    HASH_TYPE_ID_STYLE,
+    "data/test-read-dwarf/test-suppressed-alias.o.abi",
+    "output/test-read-dwarf/test-suppressed-alias.o.abi",
+  },
   {
     "data/test-read-dwarf/test4.so",
     "",