What does this warning mean?


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?


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.

Answered By – thkala

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published