What does this warning mean?

15,049

Some gdb versions are actually a bit more helpful with that warning. They output something like the following:

warning: .dynamic section for "libhello.so" is not at the expected address (wrong library or version mismatch?)

Make sure GDB finds the library your program was actually compiled with and that any debugging symbols, if in separate files, for the application and the library are current and consistent with the builds you are using.

An upgrade sounds like a good suspect for a cause. Prelinking libraries might also cause this warning to appear, although I think gdb can handle that case.

Share:
15,049
341008
Author by

341008

Updated on August 02, 2022

Comments

  • 341008
    341008 almost 2 years

    I have often encountered the following warning from gdb:

    warning: .dynamic section for XXX is not at the expected address

    where XXX is the name of some library. Most recently I got it for libgobject-2.0.so. My app uses GTK. gdb had been launching it without problems till yesterday when I synced the latest code from the repository and built it afresh. Since then it has been complaining about .dynamic section. What are the possible reasons for it? And how do I resolve them?