From 8da7e29fc5d675bc6fe2068dfd9ac5d0b5b8897a91e51a55923f5590fc7e432a Mon Sep 17 00:00:00 2001 From: Pedro Monreal Gonzalez Date: Wed, 20 Jan 2021 09:16:51 +0000 Subject: [PATCH] Accepting request 864441 from home:dirkmueller:branches:devel:libraries:c_c++ - update to 1.5.0: * dwarf: clang doesn't respect the static alias * Fixed a missing dependency in dwarf-eh.h * x86_64: Fix tdep_init_done when built with libatomic_ops * mips: make _step_n64 as a static function * Added braces to suppress empty if/else warnings * Delete hardcode of address size to support MIPS64. * Fix format specifier for int64_t:29 * Add initial support for Solaris x86-64 * x86_64: Add fixup code if previous RIP was invalid * x86-64: make `is_cached_valid_mem` functional * arm: clear ip thumb/arm mode bit before move to previous instruction * Fix compilation with -fno-common. * Fix off-by-one error in x86_64 stack frames * aarch64: Fix __sigset build issue on muslC * Make SHF_COMPRESSED use contingent on its existence - remove libunwind_U_dyn_info_list.patch (upstream) OBS-URL: https://build.opensuse.org/request/show/864441 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libunwind?expand=0&rev=50 --- libunwind-1.4.0.tar.gz | 3 - libunwind-1.4.0.tar.gz.sig | Bin 438 -> 0 bytes libunwind-1.5.0.tar.gz | 3 + libunwind-1.5.0.tar.gz.sig | Bin 0 -> 438 bytes libunwind.changes | 21 ++ libunwind.spec | 14 +- libunwind_U_dyn_info_list.patch | 442 -------------------------------- 7 files changed, 30 insertions(+), 453 deletions(-) delete mode 100644 libunwind-1.4.0.tar.gz delete mode 100644 libunwind-1.4.0.tar.gz.sig create mode 100644 libunwind-1.5.0.tar.gz create mode 100644 libunwind-1.5.0.tar.gz.sig delete mode 100644 libunwind_U_dyn_info_list.patch diff --git a/libunwind-1.4.0.tar.gz b/libunwind-1.4.0.tar.gz deleted file mode 100644 index 4f93538..0000000 --- a/libunwind-1.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df59c931bd4d7ebfd83ee481c943edf015138089b8e50abed8d9c57ba9338435 -size 872941 diff --git a/libunwind-1.4.0.tar.gz.sig b/libunwind-1.4.0.tar.gz.sig deleted file mode 100644 index aba9e19db45b9b37d952146fa130a53e66b392d658dbda7c36add94ea4ecf7fc..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 438 zcmV;n0ZIOe0kZ@E0SW*e79j+6($B?g!s#`n6f&0qS|*AY)nB9q0$zh=m;ee15CK{y ziWk*iq$l4D0Ee5lP0BkW7$7`yy{)?h0YeTJ@IW>BCnx2!xj%m%(%P246JC`C0O=mNEyI!%)nyC}4~=1We`rnMYR z(-7cv{2ky-KF`(~6X&h%BiXUE$S>^fY4P@+t7%7GbDfVY#L%=Vo~UkDtSHc16;UDO zPj5KnAIekGI~W$R$iCeeR05)quLNqo3kmTQrl+B|4Yw2YX%fGSL5>d0vju2bixPEP zndhe*lt?_J-DhU4PSEV5i>7_B6@|HNmOs#YIAQQRyjLAXCtySn@qu2u8k^lJoXyU>&vvsE grsHUa{@fT`iE=H}t($n-aD*&JVZ0MWC=R2itz)S39y&Z&drEdR@?Y};ImMj%8Vu$2ZBnlMKt3z`!W@_V(z z$wFX^GQ;`K-nAxO>@+ORVO)sYK4$N?@4n^hz_a)vRfP4o#-Y2;fdVXCIqqtQ^Z5vv z-#B%)Io*1JeqH98=TFoQG=bR&Rz+rem#ch<8AU%oTq5OOD}2T979f+Ses>VcxrTL1t6 literal 0 HcmV?d00001 diff --git a/libunwind.changes b/libunwind.changes index a887f61..11dc7a5 100644 --- a/libunwind.changes +++ b/libunwind.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Tue Jan 19 21:29:19 UTC 2021 - Dirk Müller + +- update to 1.5.0: + * dwarf: clang doesn't respect the static alias + * Fixed a missing dependency in dwarf-eh.h + * x86_64: Fix tdep_init_done when built with libatomic_ops + * mips: make _step_n64 as a static function + * Added braces to suppress empty if/else warnings + * Delete hardcode of address size to support MIPS64. + * Fix format specifier for int64_t:29 + * Add initial support for Solaris x86-64 + * x86_64: Add fixup code if previous RIP was invalid + * x86-64: make `is_cached_valid_mem` functional + * arm: clear ip thumb/arm mode bit before move to previous instruction + * Fix compilation with -fno-common. + * Fix off-by-one error in x86_64 stack frames + * aarch64: Fix __sigset build issue on muslC + * Make SHF_COMPRESSED use contingent on its existence +- remove libunwind_U_dyn_info_list.patch (upstream) + ------------------------------------------------------------------- Tue Oct 20 20:01:36 UTC 2020 - Berthold Gunreben diff --git a/libunwind.spec b/libunwind.spec index b9fa634..11e55db 100644 --- a/libunwind.spec +++ b/libunwind.spec @@ -1,7 +1,7 @@ # # spec file for package libunwind # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libunwind -Version: 1.4.0 +Version: 1.5.0 Release: 0 Summary: Call chain detection library License: MIT @@ -27,12 +27,11 @@ Source0: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{ver Source1: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.gz.sig Source2: %{name}.keyring Source3: baselibs.conf -Patch0: libunwind_U_dyn_info_list.patch BuildRequires: gcc-c++ BuildRequires: lzma-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(atomic_ops) -ExclusiveArch: %{ix86} ia64 x86_64 %{arm} ppc ppc64 ppc64le aarch64 s390x +ExcludeArch: s390 riscv64 %description A C programming interface (API) to determine the call chain of a program. @@ -46,18 +45,17 @@ Requires: %{name} = %{version} A C programming interface (API) to determine the call chain of a program. %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 +%setup -q %build %configure \ --enable-minidebuginfo -make %{?_smp_mflags} +%make_build %check %if ! 0%{?qemu_user_space_build} # run-coredump-unwind fails -make check %{?_smp_mflags} || : +%make_build check || : %endif %install diff --git a/libunwind_U_dyn_info_list.patch b/libunwind_U_dyn_info_list.patch deleted file mode 100644 index 973754c..0000000 --- a/libunwind_U_dyn_info_list.patch +++ /dev/null @@ -1,442 +0,0 @@ -From 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e Mon Sep 17 00:00:00 2001 -From: Yichao Yu -Date: Tue, 31 Mar 2020 00:43:32 -0400 -Subject: [PATCH] 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... ---- - src/aarch64/Ginit.c | 15 +++++++-------- - src/arm/Ginit.c | 15 +++++++-------- - src/coredump/_UPT_get_dyn_info_list_addr.c | 5 +++++ - src/hppa/Ginit.c | 15 +++++++-------- - src/ia64/Ginit.c | 1 + - src/mi/Gfind_dynamic_proc_info.c | 1 + - src/mips/Ginit.c | 15 +++++++-------- - src/ppc32/Ginit.c | 11 +++++++---- - src/ppc64/Ginit.c | 11 +++++++---- - src/ptrace/_UPT_get_dyn_info_list_addr.c | 5 +++++ - src/s390x/Ginit.c | 15 +++++++-------- - src/sh/Ginit.c | 15 +++++++-------- - src/tilegx/Ginit.c | 15 +++++++-------- - src/x86/Ginit.c | 15 +++++++-------- - src/x86_64/Ginit.c | 15 +++++++-------- - 15 files changed, 89 insertions(+), 80 deletions(-) - -diff --git a/src/aarch64/Ginit.c b/src/aarch64/Ginit.c -index dec235c82..35389762f 100644 ---- a/src/aarch64/Ginit.c -+++ b/src/aarch64/Ginit.c -@@ -61,13 +61,6 @@ tdep_uc_addr (unw_tdep_context_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) - { -@@ -78,7 +71,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; - } - -diff --git a/src/arm/Ginit.c b/src/arm/Ginit.c -index 2720d063a..0bac0d72d 100644 ---- a/src/arm/Ginit.c -+++ b/src/arm/Ginit.c -@@ -57,18 +57,17 @@ tdep_uc_addr (unw_tdep_context_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 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; - } - -diff --git a/src/coredump/_UPT_get_dyn_info_list_addr.c b/src/coredump/_UPT_get_dyn_info_list_addr.c -index 0d1190556..739ed0569 100644 ---- a/src/coredump/_UPT_get_dyn_info_list_addr.c -+++ b/src/coredump/_UPT_get_dyn_info_list_addr.c -@@ -74,6 +74,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - - #else - -+/* 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 inline int - get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - int *countp) -diff --git a/src/hppa/Ginit.c b/src/hppa/Ginit.c -index 461e4b93d..265455a68 100644 ---- a/src/hppa/Ginit.c -+++ b/src/hppa/Ginit.c -@@ -64,13 +64,6 @@ _Uhppa_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) - { -@@ -81,7 +74,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; - } - -diff --git a/src/ia64/Ginit.c b/src/ia64/Ginit.c -index b09a2ad57..8601bb3ca 100644 ---- a/src/ia64/Ginit.c -+++ b/src/ia64/Ginit.c -@@ -68,6 +68,7 @@ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *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; - } -diff --git a/src/mi/Gfind_dynamic_proc_info.c b/src/mi/Gfind_dynamic_proc_info.c -index 98d350128..2e7c62e5e 100644 ---- a/src/mi/Gfind_dynamic_proc_info.c -+++ b/src/mi/Gfind_dynamic_proc_info.c -@@ -49,6 +49,7 @@ local_find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, - return -UNW_ENOINFO; - #endif - -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. - list = (unw_dyn_info_list_t *) (uintptr_t) _U_dyn_info_list_addr (); - for (di = list->first; di; di = di->next) - if (ip >= di->start_ip && ip < di->end_ip) -diff --git a/src/mips/Ginit.c b/src/mips/Ginit.c -index 3df170c75..bf7a8f5a8 100644 ---- a/src/mips/Ginit.c -+++ b/src/mips/Ginit.c -@@ -69,13 +69,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) - { -@@ -86,7 +79,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) (intptr_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; - } - -diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c -index ba302448a..7b4545580 100644 ---- a/src/ppc32/Ginit.c -+++ b/src/ppc32/Ginit.c -@@ -91,9 +91,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -104,7 +101,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; - } - -diff --git a/src/ppc64/Ginit.c b/src/ppc64/Ginit.c -index 4c88cd6e7..7bfb395a7 100644 ---- a/src/ppc64/Ginit.c -+++ b/src/ppc64/Ginit.c -@@ -95,9 +95,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -108,7 +105,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; - } - -diff --git a/src/ptrace/_UPT_get_dyn_info_list_addr.c b/src/ptrace/_UPT_get_dyn_info_list_addr.c -index cc5ed0441..16671d453 100644 ---- a/src/ptrace/_UPT_get_dyn_info_list_addr.c -+++ b/src/ptrace/_UPT_get_dyn_info_list_addr.c -@@ -71,6 +71,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - - #else - -+/* 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 inline int - get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - int *countp) -diff --git a/src/s390x/Ginit.c b/src/s390x/Ginit.c -index f0886ac93..db01743c0 100644 ---- a/src/s390x/Ginit.c -+++ b/src/s390x/Ginit.c -@@ -50,8 +50,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; -- - static inline void * - uc_addr (ucontext_t *uc, int reg) - { -@@ -75,11 +73,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --/* 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) - { -@@ -90,7 +83,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; - } - -diff --git a/src/sh/Ginit.c b/src/sh/Ginit.c -index 52988a721..9fe96d2bd 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; - } - -diff --git a/src/tilegx/Ginit.c b/src/tilegx/Ginit.c -index 7564a558b..925e64132 100644 ---- a/src/tilegx/Ginit.c -+++ b/src/tilegx/Ginit.c -@@ -64,13 +64,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) - { -@@ -81,7 +74,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) (intptr_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; - } - -diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c -index f6b8dc27d..3cec74a21 100644 ---- a/src/x86/Ginit.c -+++ b/src/x86/Ginit.c -@@ -54,13 +54,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) - { -@@ -71,7 +64,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; - } - -diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c -index a865d3385..fd8d418b1 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; - } -