[arch-commits] Commit in lib32-libunwind/repos/multilib-x86_64 (3 files)
Laurent Carlier
lcarlier at archlinux.org
Sun Feb 28 17:59:24 UTC 2021
Date: Sunday, February 28, 2021 @ 17:59:24
Author: lcarlier
Revision: 875985
archrelease: copy trunk to multilib-x86_64
Added:
lib32-libunwind/repos/multilib-x86_64/PKGBUILD
(from rev 875984, lib32-libunwind/trunk/PKGBUILD)
Deleted:
lib32-libunwind/repos/multilib-x86_64/PKGBUILD
lib32-libunwind/repos/multilib-x86_64/fix-fno-common.patch
----------------------+
PKGBUILD | 108 +++++------
fix-fno-common.patch | 442 -------------------------------------------------
2 files changed, 48 insertions(+), 502 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-02-28 17:59:19 UTC (rev 875984)
+++ PKGBUILD 2021-02-28 17:59:24 UTC (rev 875985)
@@ -1,60 +0,0 @@
-# Maintainer: Laurent Carlier <lordheavym at gmail.com>
-# Contributor: Lone_Wolf <lonewolf at xs4all dot nl>
-# Contributor: Moritz Lipp <mlq at pwmt.org>
-
-_pkgbasename=libunwind
-pkgname=lib32-libunwind
-pkgver=1.4.0
-pkgrel=1
-pkgdesc="Portable and efficient C programming interface (API) to determine the call-chain of a program (32-bit)"
-arch=('x86_64')
-url="https://www.nongnu.org/libunwind/"
-license=('GPL')
-makedepends=('gcc-multilib')
-depends=('lib32-gcc-libs' 'libunwind' 'lib32-xz')
-source=(https://download.savannah.gnu.org/releases/$_pkgbasename/$_pkgbasename-$pkgver.tar.gz{,.sig}
- fix-fno-common.patch)
-sha512sums=('60bce1e840f071d3a48cfa8e2acff988977956f659c5c04ce83f00751348fbbeddbfc54e8c9bd6ebc9073423ca5ee1816655dc5aa59fefd0a8edc9c3f7f3b913'
- 'SKIP'
- 'd8b6e9208bd2fc351eb1d24a7b2534f4e6034982afeca9e4fb3cf6deed8e8445c46aaef8ff7e891167104feef9d07789b6253b02bf4099fa948aeb28a093dd9e')
-validpgpkeys=('1675C8DA2EF907FB116EB709EC52B396E6874AF2') # Dave Watson <davejwatson at fb.com> , project admin for unwind
-validpgpkeys+=('75D2CFC56CC2E935A4143297015A268A17D55FA4') # Dave Watson
-
-prepare() {
- cd $_pkgbasename-$pkgver
-
- # merged in v1.5.0
- # https://github.com/libunwind/libunwind/pull/166
- patch -Np1 -i ../fix-fno-common.patch
-}
-
-build() {
- export CC="gcc -m32"
- export CXX="g++ -m32"
-
- cd $_pkgbasename-$pkgver
- ./configure \
- --build=i686-pc-linux-gnu \
- --host=i686-pc-linux-gnu \
- --prefix=/usr \
- --libdir=/usr/lib32 \
- --disable-documentation
- make
-
-}
-
-check() {
- cd "$srcdir/$_pkgbasename-$pkgver"
- # This function is ``supposed'' to fail. Upstream know, but haven't fixed it.
- make check || :
-}
-
-package_lib32-libunwind() {
- cd $_pkgbasename-$pkgver
- make DESTDIR="$pkgdir" install
-
- # this build only provides multilib binary for x86 on x86_64 , remove all includes for other architectures
- find $pkgdir/usr/include/*.h -not -name "*x86*" -exec rm -f {} \;
-}
-
-# vim:set ts=2 sw=2 et:
Copied: lib32-libunwind/repos/multilib-x86_64/PKGBUILD (from rev 875984, lib32-libunwind/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-02-28 17:59:24 UTC (rev 875985)
@@ -0,0 +1,48 @@
+# Maintainer: Laurent Carlier <lordheavym at gmail.com>
+# Contributor: Lone_Wolf <lonewolf at xs4all dot nl>
+# Contributor: Moritz Lipp <mlq at pwmt.org>
+
+_pkgbasename=libunwind
+pkgname=lib32-libunwind
+pkgver=1.5.0
+pkgrel=1
+pkgdesc="Portable and efficient C programming interface (API) to determine the call-chain of a program (32-bit)"
+arch=('x86_64')
+url="https://www.nongnu.org/libunwind/"
+license=('GPL')
+makedepends=('gcc-multilib')
+depends=('lib32-gcc-libs' 'libunwind' 'lib32-xz')
+source=(https://download.savannah.gnu.org/releases/$_pkgbasename/$_pkgbasename-$pkgver.tar.gz{,.sig})
+sha512sums=('1df20ca7a8cee2f2e61294fa9b677e88fec52e9d5a329f88d05c2671c69fa462f6c18808c97ca9ff664ef57292537a844f00b18d142b1938c9da701ca95a4bab'
+ 'SKIP')
+validpgpkeys=('1675C8DA2EF907FB116EB709EC52B396E6874AF2') # Dave Watson <davejwatson at fb.com> , project admin for unwind
+validpgpkeys+=('75D2CFC56CC2E935A4143297015A268A17D55FA4') # Dave Watson
+
+build() {
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+
+ cd $_pkgbasename-$pkgver
+ ./configure \
+ --build=i686-pc-linux-gnu \
+ --host=i686-pc-linux-gnu \
+ --prefix=/usr \
+ --libdir=/usr/lib32 \
+ --disable-documentation
+ make
+
+}
+
+check() {
+ cd "$srcdir/$_pkgbasename-$pkgver"
+ # This function is ``supposed'' to fail. Upstream know, but haven't fixed it.
+ make check || :
+}
+
+package_lib32-libunwind() {
+ cd $_pkgbasename-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ # this build only provides multilib binary for x86 on x86_64 , remove all includes for other architectures
+ find $pkgdir/usr/include/*.h -not -name "*x86*" -exec rm -f {} \;
+}
Deleted: fix-fno-common.patch
===================================================================
--- fix-fno-common.patch 2021-02-28 17:59:19 UTC (rev 875984)
+++ fix-fno-common.patch 2021-02-28 17:59:24 UTC (rev 875985)
@@ -1,442 +0,0 @@
-From 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e Mon Sep 17 00:00:00 2001
-From: Yichao Yu <yyc1992 at gmail.com>
-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;
- }
-
More information about the arch-commits
mailing list