diff options
Diffstat (limited to 'src/x86_64/Ginit.c')
-rw-r--r-- | src/x86_64/Ginit.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c index a865d338..fd8d418b 100644 --- a/src/x86_64/Ginit.c +++ b/src/x86_64/Ginit.c @@ -49,13 +49,6 @@ static struct unw_addr_space local_addr_space; unw_addr_space_t unw_local_addr_space = &local_addr_space; -HIDDEN unw_dyn_info_list_t _U_dyn_info_list; - -/* XXX fix me: there is currently no way to locate the dyn-info list - by a remote unwinder. On ia64, this is done via a special - unwind-table entry. Perhaps something similar can be done with - DWARF2 unwind info. */ - static void put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) { @@ -66,7 +59,13 @@ static int get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, void *arg) { - *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; +#ifndef UNW_LOCAL_ONLY +# pragma weak _U_dyn_info_list_addr + if (!_U_dyn_info_list_addr) + return -UNW_ENOINFO; +#endif + // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. + *dyn_info_list_addr = _U_dyn_info_list_addr (); return 0; } |