diff options
author | Yichao Yu <yyc1992@gmail.com> | 2020-03-31 00:43:32 -0400 |
---|---|---|
committer | Dave Watson <dade.watson@gmail.com> | 2020-03-31 08:06:29 -0700 |
commit | 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e (patch) | |
tree | b95a49509c3f9d18550fd03ada3a098c2c583cd2 /src/sh | |
parent | 2157664745ddff0d34e8b0d620d14e0912f4296d (diff) | |
download | libunwind-29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e.tar.gz |
Fix compilation with -fno-common.
Making all other archs consistent with IA64 which should not have this problem.
Also move the FIXME to the correct place.
Also add some minimum comments about this...
Diffstat (limited to 'src/sh')
-rw-r--r-- | src/sh/Ginit.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/sh/Ginit.c b/src/sh/Ginit.c index 52988a72..9fe96d2b 100644 --- a/src/sh/Ginit.c +++ b/src/sh/Ginit.c @@ -58,13 +58,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) # endif /* UNW_LOCAL_ONLY */ -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) { @@ -75,7 +68,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; } |