Good thing LD_DEBUG can help you. Try the following: LD_DEBUG=all ./a.out . This will allow you to easily identify the library that loads when your program crashes.
(Edit: if this was not clear, a.out means a link to a shared binary - in this case, replace it with the name of the executable).
Edit 2:
To clarify, LD_DEBUG is an environment variable that is considered by the dynamic linker when the program starts. If a LD_DEBUG set for the LD_DEBUG parameter, the dynamic linker will provide a lot of information about dynamic libraries loaded at runtime, symbol bindings, etc.
To start, run the following on your computer:
LD_DEBUG=help ls
You will see the valid parameters for LD_DEBUG on your system. The most difficult setting is all , which displays all the available information.
Now, to use it as simple as the ls example, replace ls with your program name. There is no need for gdb to use LD_DEBUG, as this is functionality provided exclusively by the dynamic linker, not gdb.
proc-self-maps
source share