[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] multiple dynamic list-info addresses?

From: Todd L Miller
Subject: [libunwind] multiple dynamic list-info addresses?
Date: Mon, 29 Mar 2004 17:03:29 -0600 (CST)

        _UPT_get_dyn_info_list_addr() finds more than one dynamic
list-info address, at 0x20000000002c9fe0 and 0x20000000002d9fe0 in the
remote process.  The latter, so far as I can tell, is completely bogus*.
However, I had some trouble forcing _any_ dynamic list-info addresses to
show up in the remote process, so I'm wondering if I did it wrong.  What I
ended up having to do was copying global-asm-ia64.S, compiling it, and
adding the following lines to a source file in a library I load into the
remote process anyway:

#include <libunwind.h>
__attribute__((visibility ("hidden"))) unw_dyn_info_list_t _U_dyn_info_list;

I then linked the library as normal, excepting the additional
global-asm-ia64.o file at the end.

        Is there a recommended procedure?


- Todd Miller

*: I think I thought I sent this mail out Friday.  Anyway, I did a little
more investigating, and seems like the problem is that /proc/pid/maps
lists (at least) three entries per library: what appears to be the
"correct" one, with "r-xp" permissions, another copy immediately
thereafter with "---p", and a third copy (0x10000 later) with "rw-p"
permissions.  This lattermost is immediately followed by .bss data, and
may well actually start it.  The problem is that libunwind calculates the
address of _U_dyn_info_list by adding its relocated offset to the base
address (segment offset?) listed in /proc/pid/maps; it finds the dynamic
unwind entry in the same place each time it looks at the first and third
copies, but the third one's base address is off by 0x10000, giving the
bogus second result.  The three entries appear for all dynamically-loaded
libraries on my system, so far as I can tell.  Is this a situation
libunwind is supposed to handle?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]