1

I have a shared library named libtest.so. I was analyzing the readelf output of this .so to solve undefined reference to _invalid_parameter(). The readelf output shows _invalid_parameter UND in .symtab section but no mention of it in .dynsym section.

Could somebody please explain what it signifies to have a symbol mentioned in .symtab section but not in .dynsym section?

libtest.so is dynamically linking to few other shared libraries but none of them is providing definition for _invalid_parameter but still linking is passing. Any idea, how?

Smart Manoj
  • 5,230
  • 4
  • 34
  • 59
Pendyala
  • 585
  • 1
  • 6
  • 17
  • `how?` - the linker sees that `_invalid_parameter` is never called from nowhere, so it optimizes it out. – KamilCuk Jun 13 '19 at 10:52
  • if you mean to say it removes the dead code (unused code), _invalid_parameter should not be appeared in .symtab as well, no? – Pendyala Jun 13 '19 at 10:55

0 Answers0