Re: GDB problems
Thiemo Seufer wrote:
>
> Chris Plummer wrote:
> [snip]
> > (gdb) bt
> > #0 0xffffffff in ?? ()
> > #1 0x2aab73c8 in _dl_init () from /lib/ld.so.1
> > Cannot access memory at address 0x38
> > (gdb) p $pc
> > $1 = -1
> > (gdb)
>
> It looks like the dynamic loader forgot to resolve a function entry.
> Can you try to reduce your App to the smallest testcase where this
> problem occurs?
>
> Thiemo
>
Certainly I can try, but it could take a while. This is a very big
program, and heavily interconnected.
Your suggestion to use -static for my -mips2 problem got me thinking
that maybe I should try that here also so there are no dll's to load.
This indeed has fixed the problem. However, this program also requires
--export-dynamic to lookup some of its own symbols, and -static seems to
override --export-dynamic and prevent any exports, so now it gets the
following error from dlopen:
Fatal Error: Could not open testapp as a shared library
In any case, this is a good start. I'll play around with linker flags a
bit more. I'm still not sure if it is the presence of -static or the
lack of --export-dynamic that is making the problem go way. In a worse
case senario I can create a static table of all the symbols the program
looks up, and just replace dlsym calls with table lookups.
thanks for the help,
Chris
Reply to: