[1/2,applied] ir: Remove over zealous assert from elf_symbol::update_main_symbol

Message ID 87pkyl2moq.fsf@seketeli.org
State New
Headers
Series [1/2,applied] ir: Remove over zealous assert from elf_symbol::update_main_symbol |

Commit Message

Dodji Seketeli Sept. 10, 2026, 2:41 p.m. UTC
  Hello,

While testing the build on Debian systems, I noticed that the assert
in elf_symbol::update_main_symbol was probably too eager.  The symbol
that this method is invoked on might not necessarily be the main
symbol, and yet, the function should succeed.

I am thus removing the assert for now.

	* src/abg-ir.cc (elf_symbol::update_main_symbol): Remove the
	assert.

Signed-off-by: Dodji Seketeli <dodji@seketeli.org>
---
 src/abg-ir.cc | 1 -
 1 file changed, 1 deletion(-)
  

Patch

diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index b3bc2ab1..8f43db58 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -3099,7 +3099,6 @@  elf_symbol::add_alias(const elf_symbol_sptr& alias)
 elf_symbol_sptr
 elf_symbol::update_main_symbol(const std::string& name)
 {
-  ABG_ASSERT(is_main_symbol());
   if (!has_aliases() || get_name() == name)
     return get_main_symbol();