- Version update to 1.2-rc1, should include all our patches:
* 0001-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch * 0002-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch * libunwind-1.1-expected-fails.patch * libunwind-CVE-2015-3239.patch * libunwind-aarch64.patch * libunwind-ppc64le.patch OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libunwind?expand=0&rev=28
This commit is contained in:
parent
c57ee43e00
commit
4b4b8e4093
@ -1,69 +0,0 @@
|
||||
From c90a2e02b3c1b03362a549a05261a4d0513d6026 Mon Sep 17 00:00:00 2001
|
||||
From: Simon Atanasyan <simon@atanasyan.com>
|
||||
Date: Tue, 21 Oct 2014 15:43:20 -0700
|
||||
Subject: [PATCH] Mark run-ptrace-mapper and run-ptrace-misc as XFAIL on MIPS
|
||||
|
||||
Though PTRACE_SINGLESTEP is defined on MIPS Linux, the kernel does
|
||||
not support that kind of request. The ptrace call failed and sets
|
||||
errno to EIO and paused process is not resumed. In case of
|
||||
run-ptrace-mapper and run-ptrace-misc this leads to hanged execution
|
||||
because next call to wait4 never returns.
|
||||
|
||||
This change adds run-ptrace-mapper and run-ptrace-misc to the list
|
||||
of 'expected failed' tests on MIPS targets.
|
||||
|
||||
Signed-off-by: Simon Atanasyan <simon@atanasyan.com>
|
||||
---
|
||||
tests/Makefile.am | 9 ++++++++-
|
||||
tests/test-ptrace.c | 12 ++++++++++--
|
||||
2 files changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 9c76628..9c62f92 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -94,9 +94,16 @@ check_SCRIPTS = $(check_SCRIPTS_common) $(check_SCRIPTS_cdep) \
|
||||
|
||||
|
||||
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
||||
+XFAIL_TESTS =
|
||||
|
||||
if !ARCH_IA64
|
||||
-XFAIL_TESTS = Gtest-dyn1 Ltest-dyn1
|
||||
+XFAIL_TESTS += Gtest-dyn1 Ltest-dyn1
|
||||
+endif
|
||||
+
|
||||
+if ARCH_MIPS
|
||||
+# MIPS kernel does not support PTRACE_SINGLESTEP
|
||||
+# ptrace request used in the tests.
|
||||
+XFAIL_TESTS += run-ptrace-mapper run-ptrace-misc
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
|
||||
diff --git a/tests/test-ptrace.c b/tests/test-ptrace.c
|
||||
index 942b0db..a5b71dd 100644
|
||||
--- a/tests/test-ptrace.c
|
||||
+++ b/tests/test-ptrace.c
|
||||
@@ -303,9 +303,17 @@ main (int argc, char **argv)
|
||||
{
|
||||
do_backtrace ();
|
||||
#if HAVE_DECL_PTRACE_SINGLESTEP
|
||||
- ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig);
|
||||
+ if (ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig) < 0)
|
||||
+ {
|
||||
+ panic ("ptrace(PTRACE_SINGLESTEP) failed (errno=%d)\n", errno);
|
||||
+ killed = 1;
|
||||
+ }
|
||||
#elif HAVE_DECL_PT_STEP
|
||||
- ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig);
|
||||
+ if (ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig) < 0)
|
||||
+ {
|
||||
+ panic ("ptrace(PT_STEP) failed (errno=%d)\n", errno);
|
||||
+ killed = 1;
|
||||
+ }
|
||||
#else
|
||||
#error Singlestep me
|
||||
#endif
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 0bed10aa217157b287e036fba1e48ad2c6a3356e Mon Sep 17 00:00:00 2001
|
||||
From: Gregory Fong <gregory.0xf0@gmail.com>
|
||||
Date: Wed, 18 Feb 2015 13:18:41 -0800
|
||||
Subject: [PATCH] Mark run-ptrace-mapper and run-ptrace-misc as XFAIL on ARM
|
||||
|
||||
This is similar to commit c90a2e02b3c1b03362a549a05261a4d0513d6026
|
||||
"Mark run-ptrace-mapper and run-ptrace-misc as XFAIL on MIPS".
|
||||
Starting with 2.6.39, ARM Linux returns -EIO for PTRACE_SINGLESTEP, so
|
||||
we need to mark this as XFAIL for ARM too.
|
||||
|
||||
The Linux commit that changed this is
|
||||
|
||||
commit 425fc47adb5bb69f76285be77a09a3341a30799e
|
||||
Author: Will Deacon <will.deacon@arm.com>
|
||||
Date: Mon Feb 14 14:31:09 2011 +0100
|
||||
|
||||
ARM: 6668/1: ptrace: remove single-step emulation code
|
||||
|
||||
see: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=425fc47adb5bb69f76285be77a09a3341a30799e
|
||||
|
||||
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
|
||||
---
|
||||
tests/Makefile.am | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 9c62f92..fe2dba8 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -100,10 +100,17 @@ if !ARCH_IA64
|
||||
XFAIL_TESTS += Gtest-dyn1 Ltest-dyn1
|
||||
endif
|
||||
|
||||
-if ARCH_MIPS
|
||||
-# MIPS kernel does not support PTRACE_SINGLESTEP
|
||||
+# Use if arch defines but does not support PTRACE_SINGLESTEP
|
||||
# ptrace request used in the tests.
|
||||
-XFAIL_TESTS += run-ptrace-mapper run-ptrace-misc
|
||||
+XFAIL_TESTS_PTRACE_SINGLESTEP = run-ptrace-mapper run-ptrace-misc
|
||||
+
|
||||
+if ARCH_MIPS
|
||||
+XFAIL_TESTS += $(XFAIL_TESTS_PTRACE_SINGLESTEP)
|
||||
+endif
|
||||
+
|
||||
+if ARCH_ARM
|
||||
+# ARM Linux kernel >=2.6.39 removed PTRACE_SINGLESTEP emulation
|
||||
+XFAIL_TESTS += $(XFAIL_TESTS_PTRACE_SINGLESTEP)
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,15 +0,0 @@
|
||||
Index: libunwind-1.1/tests/Makefile.am
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/tests/Makefile.am
|
||||
+++ libunwind-1.1/tests/Makefile.am
|
||||
@@ -87,6 +87,10 @@ check_SCRIPTS = $(check_SCRIPTS_common)
|
||||
|
||||
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
||||
|
||||
+if !ARCH_IA64
|
||||
+XFAIL_TESTS = Gtest-dyn1 Ltest-dyn1
|
||||
+endif
|
||||
+
|
||||
noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
|
||||
$(noinst_PROGRAMS_arch)
|
||||
|
@ -1,10 +0,0 @@
|
||||
Index: libunwind-1.1/tests/Makefile.am
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/tests/Makefile.am
|
||||
+++ libunwind-1.1/tests/Makefile.am
|
||||
@@ -188,4 +188,4 @@ Lia64_test_stack_LDADD = $(LIBUNWIND_loc
|
||||
Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
|
||||
Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
|
||||
ia64_test_dyn1_LDADD = $(LIBUNWIND)
|
||||
-ia64_test_sig_LDADD = $(LIBUNWIND)
|
||||
+ia64_test_sig_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a
|
||||
size 1098603
|
Binary file not shown.
3
libunwind-1.2-rc1.tar.gz
Normal file
3
libunwind-1.2-rc1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d222f186b6bc60f49dac5030516ec35a7ed0ccca675551d6cf81008112116abc
|
||||
size 1172290
|
BIN
libunwind-1.2-rc1.tar.gz.sig
Normal file
BIN
libunwind-1.2-rc1.tar.gz.sig
Normal file
Binary file not shown.
@ -1,13 +0,0 @@
|
||||
Index: libunwind-1.1/include/dwarf_i.h
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/include/dwarf_i.h
|
||||
+++ libunwind-1.1/include/dwarf_i.h
|
||||
@@ -20,7 +20,7 @@
|
||||
extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
|
||||
/* REG is evaluated multiple times; it better be side-effects free! */
|
||||
# define dwarf_to_unw_regnum(reg) \
|
||||
- (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
|
||||
+ (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
|
||||
#endif
|
||||
|
||||
#ifdef UNW_LOCAL_ONLY
|
File diff suppressed because it is too large
Load Diff
@ -1,465 +0,0 @@
|
||||
Index: libunwind-1.1/tests/Makefile.am
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/tests/Makefile.am
|
||||
+++ libunwind-1.1/tests/Makefile.am
|
||||
@@ -193,3 +193,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local
|
||||
Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
|
||||
ia64_test_dyn1_LDADD = $(LIBUNWIND)
|
||||
ia64_test_sig_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
|
||||
+ppc64_test_altivec_LDADD = $(LIBUNWIND)
|
||||
Index: libunwind-1.1/src/dwarf/Gexpr.c
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/dwarf/Gexpr.c
|
||||
+++ libunwind-1.1/src/dwarf/Gexpr.c
|
||||
@@ -212,12 +212,13 @@ dwarf_eval_expr (struct dwarf_cursor *c,
|
||||
})
|
||||
# define push(x) \
|
||||
do { \
|
||||
+ unw_word_t _x = (x); \
|
||||
if (tos >= MAX_EXPR_STACK_SIZE) \
|
||||
{ \
|
||||
Debug (1, "Stack overflow\n"); \
|
||||
return -UNW_EINVAL; \
|
||||
} \
|
||||
- stack[tos++] = (x); \
|
||||
+ stack[tos++] = _x; \
|
||||
} while (0)
|
||||
# define pick(n) \
|
||||
({ \
|
||||
Index: libunwind-1.1/src/elfxx.c
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/elfxx.c
|
||||
+++ libunwind-1.1/src/elfxx.c
|
||||
@@ -128,10 +128,11 @@ elf_w (lookup_symbol) (unw_addr_space_t
|
||||
if (ELF_W (ST_TYPE) (sym->st_info) == STT_FUNC
|
||||
&& sym->st_shndx != SHN_UNDEF)
|
||||
{
|
||||
- if (tdep_get_func_addr (as, sym->st_value, &val) < 0)
|
||||
- continue;
|
||||
+ val = sym->st_value;
|
||||
if (sym->st_shndx != SHN_ABS)
|
||||
val += load_offset;
|
||||
+ if (tdep_get_func_addr (as, val, &val) < 0)
|
||||
+ continue;
|
||||
Debug (16, "0x%016lx info=0x%02x %s\n",
|
||||
(long) val, sym->st_info, strtab + sym->st_name);
|
||||
|
||||
Index: libunwind-1.1/include/libunwind-ppc64.h
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/include/libunwind-ppc64.h
|
||||
+++ libunwind-1.1/include/libunwind-ppc64.h
|
||||
@@ -222,6 +222,13 @@ typedef enum
|
||||
}
|
||||
ppc64_regnum_t;
|
||||
|
||||
+typedef enum
|
||||
+ {
|
||||
+ UNW_PPC64_ABI_ELFv1,
|
||||
+ UNW_PPC64_ABI_ELFv2
|
||||
+ }
|
||||
+ppc64_abi_t;
|
||||
+
|
||||
/*
|
||||
* According to David Edelsohn, GNU gcc uses R3, R4, R5, and maybe R6 for
|
||||
* passing parameters to exception handlers.
|
||||
Index: libunwind-1.1/include/tdep-ppc64/dwarf-config.h
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/include/tdep-ppc64/dwarf-config.h
|
||||
+++ libunwind-1.1/include/tdep-ppc64/dwarf-config.h
|
||||
@@ -38,7 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
|
||||
#define DWARF_REGNUM_MAP_LENGTH 115
|
||||
|
||||
/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */
|
||||
-#define dwarf_is_big_endian(addr_space) 1
|
||||
+#define dwarf_is_big_endian(addr_space) ((addr_space)->big_endian)
|
||||
|
||||
/* Convert a pointer to a dwarf_cursor structure to a pointer to
|
||||
unw_cursor_t. */
|
||||
Index: libunwind-1.1/include/tdep-ppc64/libunwind_i.h
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/include/tdep-ppc64/libunwind_i.h
|
||||
+++ libunwind-1.1/include/tdep-ppc64/libunwind_i.h
|
||||
@@ -51,6 +51,8 @@ unw_tdep_frame_t;
|
||||
struct unw_addr_space
|
||||
{
|
||||
struct unw_accessors acc;
|
||||
+ int big_endian;
|
||||
+ ppc64_abi_t abi;
|
||||
unw_caching_policy_t caching_policy;
|
||||
#ifdef HAVE_ATOMIC_OPS_H
|
||||
AO_t cache_generation;
|
||||
@@ -289,7 +291,7 @@ extern int tdep_fetch_proc_info_post (st
|
||||
#define tdep_get_as(c) ((c)->dwarf.as)
|
||||
#define tdep_get_as_arg(c) ((c)->dwarf.as_arg)
|
||||
#define tdep_get_ip(c) ((c)->dwarf.ip)
|
||||
-#define tdep_big_endian(as) 1
|
||||
+#define tdep_big_endian(as) ((as)->big_endian)
|
||||
|
||||
extern int tdep_init_done;
|
||||
|
||||
Index: libunwind-1.1/src/ppc/Gis_signal_frame.c
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/ppc/Gis_signal_frame.c
|
||||
+++ libunwind-1.1/src/ppc/Gis_signal_frame.c
|
||||
@@ -31,7 +31,7 @@ PROTECTED int
|
||||
unw_is_signal_frame (unw_cursor_t * cursor)
|
||||
{
|
||||
struct cursor *c = (struct cursor *) cursor;
|
||||
- unw_word_t w0, w1, ip;
|
||||
+ unw_word_t w0, w1, i0, i1, i2, ip;
|
||||
unw_addr_space_t as;
|
||||
unw_accessors_t *a;
|
||||
void *arg;
|
||||
@@ -60,7 +60,19 @@ unw_is_signal_frame (unw_cursor_t * curs
|
||||
if ((ret = (*a->access_mem) (as, ip, &w0, 0, arg)) < 0
|
||||
|| (ret = (*a->access_mem) (as, ip + 8, &w1, 0, arg)) < 0)
|
||||
return 0;
|
||||
- w1 >>= 32;
|
||||
- return (w0 == 0x38210080380000ac && w1 == 0x44000002);
|
||||
|
||||
+ if (tdep_big_endian (as))
|
||||
+ {
|
||||
+ i0 = w0 >> 32;
|
||||
+ i1 = w0 & 0xffffffffUL;
|
||||
+ i2 = w1 >> 32;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ i0 = w0 & 0xffffffffUL;
|
||||
+ i1 = w0 >> 32;
|
||||
+ i2 = w1 & 0xffffffffUL;
|
||||
+ }
|
||||
+
|
||||
+ return (i0 == 0x38210080 && i1 == 0x380000ac && i2 == 0x44000002);
|
||||
}
|
||||
Index: libunwind-1.1/src/ppc64/get_func_addr.c
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/ppc64/get_func_addr.c
|
||||
+++ libunwind-1.1/src/ppc64/get_func_addr.c
|
||||
@@ -31,15 +31,21 @@ int
|
||||
tdep_get_func_addr (unw_addr_space_t as, unw_word_t addr,
|
||||
unw_word_t *entry_point)
|
||||
{
|
||||
- unw_accessors_t *a;
|
||||
- int ret;
|
||||
+ if (as->abi == UNW_PPC64_ABI_ELFv1)
|
||||
+ {
|
||||
+ unw_accessors_t *a;
|
||||
+ int ret;
|
||||
+
|
||||
+ a = unw_get_accessors (as);
|
||||
+ /* Entry-point is stored in the 1st word of the function descriptor.
|
||||
+ In case that changes in the future, we'd have to update the line
|
||||
+ below and read the word at addr + offset: */
|
||||
+ ret = (*a->access_mem) (as, addr, entry_point, 0, NULL);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
+ else
|
||||
+ *entry_point = addr;
|
||||
|
||||
- a = unw_get_accessors (as);
|
||||
- /* Entry-point is stored in the 1st word of the function descriptor.
|
||||
- In case that changes in the future, we'd have to update the line
|
||||
- below and read the word at addr + offset: */
|
||||
- ret = (*a->access_mem) (as, addr, entry_point, 0, NULL);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
return 0;
|
||||
}
|
||||
Index: libunwind-1.1/src/ppc64/Ginit.c
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/ppc64/Ginit.c
|
||||
+++ libunwind-1.1/src/ppc64/Ginit.c
|
||||
@@ -210,6 +210,12 @@ HIDDEN void
|
||||
ppc64_local_addr_space_init (void)
|
||||
{
|
||||
memset (&local_addr_space, 0, sizeof (local_addr_space));
|
||||
+ local_addr_space.big_endian = (__BYTE_ORDER == __BIG_ENDIAN);
|
||||
+#if _CALL_ELF == 2
|
||||
+ local_addr_space.abi = UNW_PPC64_ABI_ELFv2;
|
||||
+#else
|
||||
+ local_addr_space.abi = UNW_PPC64_ABI_ELFv1;
|
||||
+#endif
|
||||
local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
|
||||
local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
|
||||
local_addr_space.acc.put_unwind_info = put_unwind_info;
|
||||
Index: libunwind-1.1/src/Makefile.am
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/Makefile.am
|
||||
+++ libunwind-1.1/src/Makefile.am
|
||||
@@ -330,12 +330,12 @@ libunwind_x86_64_la_SOURCES_x86_64 = $(l
|
||||
x86_64/Gstash_frame.c x86_64/Gstep.c x86_64/Gtrace.c
|
||||
|
||||
# The list of local files that go to Power 64 and 32:
|
||||
-libunwind_la_SOURCES_ppc = ppc/Lcreate_addr_space.c \
|
||||
+libunwind_la_SOURCES_ppc = \
|
||||
ppc/Lget_proc_info.c ppc/Lget_save_loc.c ppc/Linit_local.c \
|
||||
ppc/Linit_remote.c ppc/Lis_signal_frame.c
|
||||
|
||||
# The list of generic files that go to Power 64 and 32:
|
||||
-libunwind_ppc_la_SOURCES_ppc_generic = ppc/Gcreate_addr_space.c \
|
||||
+libunwind_ppc_la_SOURCES_ppc_generic = \
|
||||
ppc/Gget_proc_info.c ppc/Gget_save_loc.c ppc/Ginit_local.c \
|
||||
ppc/Ginit_remote.c ppc/Gis_signal_frame.c
|
||||
|
||||
@@ -348,6 +348,7 @@ libunwind_la_SOURCES_ppc32_common = $(li
|
||||
libunwind_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \
|
||||
$(libunwind_la_SOURCES_local) \
|
||||
$(libunwind_la_SOURCES_ppc) \
|
||||
+ ppc32/Lcreate_addr_space.c \
|
||||
ppc32/Lglobal.c ppc32/Linit.c \
|
||||
ppc32/Lregs.c ppc32/Lresume.c ppc32/Lstep.c
|
||||
|
||||
@@ -355,6 +356,7 @@ libunwind_la_SOURCES_ppc32 = $(libunwind
|
||||
libunwind_ppc32_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \
|
||||
$(libunwind_la_SOURCES_generic) \
|
||||
$(libunwind_ppc_la_SOURCES_ppc_generic) \
|
||||
+ ppc32/Gcreate_addr_space.c \
|
||||
ppc32/Gglobal.c ppc32/Ginit.c \
|
||||
ppc32/Gregs.c ppc32/Gresume.c ppc32/Gstep.c
|
||||
|
||||
@@ -367,6 +369,7 @@ libunwind_la_SOURCES_ppc64_common = $(li
|
||||
libunwind_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \
|
||||
$(libunwind_la_SOURCES_local) \
|
||||
$(libunwind_la_SOURCES_ppc) \
|
||||
+ ppc64/Lcreate_addr_space.c \
|
||||
ppc64/Lglobal.c ppc64/Linit.c \
|
||||
ppc64/Lregs.c ppc64/Lresume.c ppc64/Lstep.c
|
||||
|
||||
@@ -374,6 +377,7 @@ libunwind_la_SOURCES_ppc64 = $(libunwind
|
||||
libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \
|
||||
$(libunwind_la_SOURCES_generic) \
|
||||
$(libunwind_ppc_la_SOURCES_ppc_generic) \
|
||||
+ ppc64/Gcreate_addr_space.c \
|
||||
ppc64/Gglobal.c ppc64/Ginit.c \
|
||||
ppc64/Gregs.c ppc64/Gresume.c ppc64/Gstep.c
|
||||
|
||||
Index: libunwind-1.1/src/ppc/Gcreate_addr_space.c
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/ppc/Gcreate_addr_space.c
|
||||
+++ /dev/null
|
||||
@@ -1,56 +0,0 @@
|
||||
-/* libunwind - a platform-independent unwind library
|
||||
- Copyright (C) 2006-2007 IBM
|
||||
- Contributed by
|
||||
- Corey Ashford <cjashfor@us.ibm.com>
|
||||
- Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com>
|
||||
-
|
||||
-This file is part of libunwind.
|
||||
-
|
||||
-Permission is hereby granted, free of charge, to any person obtaining
|
||||
-a copy of this software and associated documentation files (the
|
||||
-"Software"), to deal in the Software without restriction, including
|
||||
-without limitation the rights to use, copy, modify, merge, publish,
|
||||
-distribute, sublicense, and/or sell copies of the Software, and to
|
||||
-permit persons to whom the Software is furnished to do so, subject to
|
||||
-the following conditions:
|
||||
-
|
||||
-The above copyright notice and this permission notice shall be
|
||||
-included in all copies or substantial portions of the Software.
|
||||
-
|
||||
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
-
|
||||
-#include <stdlib.h>
|
||||
-
|
||||
-#include <libunwind_i.h>
|
||||
-
|
||||
-PROTECTED unw_addr_space_t
|
||||
-unw_create_addr_space (unw_accessors_t *a, int byte_order)
|
||||
-{
|
||||
-#ifdef UNW_LOCAL_ONLY
|
||||
- return NULL;
|
||||
-#else
|
||||
- unw_addr_space_t as;
|
||||
-
|
||||
- /*
|
||||
- * Linux ppc64 supports only big-endian.
|
||||
- */
|
||||
- if (byte_order != 0 && byte_order != __BIG_ENDIAN)
|
||||
- return NULL;
|
||||
-
|
||||
- as = malloc (sizeof (*as));
|
||||
- if (!as)
|
||||
- return NULL;
|
||||
-
|
||||
- memset (as, 0, sizeof (*as));
|
||||
-
|
||||
- as->acc = *a;
|
||||
-
|
||||
- return as;
|
||||
-#endif
|
||||
-}
|
||||
Index: libunwind-1.1/src/ppc/Lcreate_addr_space.c
|
||||
===================================================================
|
||||
--- libunwind-1.1.orig/src/ppc/Lcreate_addr_space.c
|
||||
+++ /dev/null
|
||||
@@ -1,5 +0,0 @@
|
||||
-#define UNW_LOCAL_ONLY
|
||||
-#include <libunwind.h>
|
||||
-#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
|
||||
-#include "Gcreate_addr_space.c"
|
||||
-#endif
|
||||
Index: libunwind-1.1/src/ppc32/Gcreate_addr_space.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libunwind-1.1/src/ppc32/Gcreate_addr_space.c
|
||||
@@ -0,0 +1,56 @@
|
||||
+/* libunwind - a platform-independent unwind library
|
||||
+ Copyright (C) 2006-2007 IBM
|
||||
+ Contributed by
|
||||
+ Corey Ashford <cjashfor@us.ibm.com>
|
||||
+ Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com>
|
||||
+
|
||||
+This file is part of libunwind.
|
||||
+
|
||||
+Permission is hereby granted, free of charge, to any person obtaining
|
||||
+a copy of this software and associated documentation files (the
|
||||
+"Software"), to deal in the Software without restriction, including
|
||||
+without limitation the rights to use, copy, modify, merge, publish,
|
||||
+distribute, sublicense, and/or sell copies of the Software, and to
|
||||
+permit persons to whom the Software is furnished to do so, subject to
|
||||
+the following conditions:
|
||||
+
|
||||
+The above copyright notice and this permission notice shall be
|
||||
+included in all copies or substantial portions of the Software.
|
||||
+
|
||||
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+#include <libunwind_i.h>
|
||||
+
|
||||
+PROTECTED unw_addr_space_t
|
||||
+unw_create_addr_space (unw_accessors_t *a, int byte_order)
|
||||
+{
|
||||
+#ifdef UNW_LOCAL_ONLY
|
||||
+ return NULL;
|
||||
+#else
|
||||
+ unw_addr_space_t as;
|
||||
+
|
||||
+ /*
|
||||
+ * We support only big-endian on Linux ppc32.
|
||||
+ */
|
||||
+ if (byte_order != 0 && byte_order != __BIG_ENDIAN)
|
||||
+ return NULL;
|
||||
+
|
||||
+ as = malloc (sizeof (*as));
|
||||
+ if (!as)
|
||||
+ return NULL;
|
||||
+
|
||||
+ memset (as, 0, sizeof (*as));
|
||||
+
|
||||
+ as->acc = *a;
|
||||
+
|
||||
+ return as;
|
||||
+#endif
|
||||
+}
|
||||
Index: libunwind-1.1/src/ppc32/Lcreate_addr_space.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libunwind-1.1/src/ppc32/Lcreate_addr_space.c
|
||||
@@ -0,0 +1,5 @@
|
||||
+#define UNW_LOCAL_ONLY
|
||||
+#include <libunwind.h>
|
||||
+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
|
||||
+#include "Gcreate_addr_space.c"
|
||||
+#endif
|
||||
Index: libunwind-1.1/src/ppc64/Gcreate_addr_space.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libunwind-1.1/src/ppc64/Gcreate_addr_space.c
|
||||
@@ -0,0 +1,71 @@
|
||||
+/* libunwind - a platform-independent unwind library
|
||||
+ Copyright (C) 2006-2007 IBM
|
||||
+ Contributed by
|
||||
+ Corey Ashford <cjashfor@us.ibm.com>
|
||||
+ Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com>
|
||||
+
|
||||
+This file is part of libunwind.
|
||||
+
|
||||
+Permission is hereby granted, free of charge, to any person obtaining
|
||||
+a copy of this software and associated documentation files (the
|
||||
+"Software"), to deal in the Software without restriction, including
|
||||
+without limitation the rights to use, copy, modify, merge, publish,
|
||||
+distribute, sublicense, and/or sell copies of the Software, and to
|
||||
+permit persons to whom the Software is furnished to do so, subject to
|
||||
+the following conditions:
|
||||
+
|
||||
+The above copyright notice and this permission notice shall be
|
||||
+included in all copies or substantial portions of the Software.
|
||||
+
|
||||
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+#include <libunwind_i.h>
|
||||
+
|
||||
+PROTECTED unw_addr_space_t
|
||||
+unw_create_addr_space (unw_accessors_t *a, int byte_order)
|
||||
+{
|
||||
+#ifdef UNW_LOCAL_ONLY
|
||||
+ return NULL;
|
||||
+#else
|
||||
+ unw_addr_space_t as;
|
||||
+
|
||||
+ /*
|
||||
+ * We support both big- and little-endian on Linux ppc64.
|
||||
+ */
|
||||
+ if (byte_order != 0
|
||||
+ && byte_order != __LITTLE_ENDIAN
|
||||
+ && byte_order != __BIG_ENDIAN)
|
||||
+ return NULL;
|
||||
+
|
||||
+ as = malloc (sizeof (*as));
|
||||
+ if (!as)
|
||||
+ return NULL;
|
||||
+
|
||||
+ memset (as, 0, sizeof (*as));
|
||||
+
|
||||
+ as->acc = *a;
|
||||
+
|
||||
+ if (byte_order == 0)
|
||||
+ /* use host default: */
|
||||
+ as->big_endian = (__BYTE_ORDER == __BIG_ENDIAN);
|
||||
+ else
|
||||
+ as->big_endian = (byte_order == __BIG_ENDIAN);
|
||||
+
|
||||
+ /* FIXME! There is no way to specify the ABI.
|
||||
+ Default to ELFv1 on big-endian and ELFv2 on little-endian. */
|
||||
+ if (as->big_endian)
|
||||
+ as->abi = UNW_PPC64_ABI_ELFv1;
|
||||
+ else
|
||||
+ as->abi = UNW_PPC64_ABI_ELFv2;
|
||||
+
|
||||
+ return as;
|
||||
+#endif
|
||||
+}
|
||||
Index: libunwind-1.1/src/ppc64/Lcreate_addr_space.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libunwind-1.1/src/ppc64/Lcreate_addr_space.c
|
||||
@@ -0,0 +1,5 @@
|
||||
+#define UNW_LOCAL_ONLY
|
||||
+#include <libunwind.h>
|
||||
+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
|
||||
+#include "Gcreate_addr_space.c"
|
||||
+#endif
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 17 11:10:54 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Version update to 1.2-rc1, should include all our patches:
|
||||
* 0001-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||
* 0002-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||
* libunwind-1.1-expected-fails.patch
|
||||
* libunwind-CVE-2015-3239.patch
|
||||
* libunwind-aarch64.patch
|
||||
* libunwind-ppc64le.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 24 16:25:21 UTC 2016 - matwey.kornilov@gmail.com
|
||||
|
||||
|
@ -16,35 +16,20 @@
|
||||
#
|
||||
|
||||
|
||||
%define realver 1.2-rc1
|
||||
Name: libunwind
|
||||
Version: 1.1
|
||||
Version: 1.2~rc1
|
||||
Release: 0
|
||||
Summary: Unwind Library
|
||||
License: MIT
|
||||
Group: System/Base
|
||||
Url: http://savannah.nongnu.org/projects/libunwind/
|
||||
Source0: http://download.savannah.gnu.org/releases/libunwind/libunwind-%{version}.tar.gz
|
||||
Source1: http://download.savannah.gnu.org/releases/libunwind/libunwind-%{version}.tar.gz.sig
|
||||
Source0: http://download.savannah.gnu.org/releases/libunwind/libunwind-%{realver}.tar.gz
|
||||
Source1: http://download.savannah.gnu.org/releases/libunwind/libunwind-%{realver}.tar.gz.sig
|
||||
Source2: %{name}.keyring
|
||||
Source3: baselibs.conf
|
||||
Patch0: libunwind-1.1-tests.diff
|
||||
#PATCH-FIX-UPSTREAM: upstream commit ae3dd9417a3d178cf51ce744d85b695dbf025b44
|
||||
Patch1: libunwind-1.1-expected-fails.patch
|
||||
# PATCH-FIX-UPSTREAM: upstream commit ac6c0a6
|
||||
Patch2: libunwind-aarch64.patch
|
||||
# PATCH-FIX-UPSTREAM: uweigand@de.ibm.com -- submitted to libunwind-devel
|
||||
Patch3: libunwind-ppc64le.patch
|
||||
# PATCH-FIX-UPSTREAM: bnc#936786 CVE-2015-3239
|
||||
Patch4: libunwind-CVE-2015-3239.patch
|
||||
# PATCH-FIX-UPSTREAM: boo#976955
|
||||
Patch5: 0001-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||
# PATCH-FIX-UPSTREAM: boo#976955
|
||||
Patch6: 0002-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libatomic_ops-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkg-config
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: %ix86 ia64 x86_64 %arm ppc ppc64 ppc64le aarch64
|
||||
@ -56,64 +41,41 @@ call chain of a program.
|
||||
%package devel
|
||||
Summary: Unwind library
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libunwind = %{version}-%{release}
|
||||
Provides: libunwind:%{_libdir}/libunwind.so
|
||||
Requires: %{libname} = %{version}
|
||||
|
||||
%description devel
|
||||
A portable and efficient C programming interface (API) to determine the
|
||||
call-chain of a program.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%setup -q -n %{name}-%{realver}
|
||||
|
||||
%build
|
||||
autoreconf -fvi
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
%if ! 0%{?qemu_user_space_build:1}
|
||||
# run-coredump-unwind fails
|
||||
make check %{?_smp_mflags} || :
|
||||
%endif
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
mkdir -p %{buildroot}/%{_lib}
|
||||
mv %{buildroot}%{_libdir}/libunwind.so.8* %{buildroot}/%{_lib}
|
||||
ln -sf /%{_lib}/libunwind.so.8 %{buildroot}%{_libdir}/libunwind.so
|
||||
# Check that ln did not create a dangling link
|
||||
stat %{buildroot}/$(readlink -f "%{buildroot}/%{_libdir}/libunwind.so");
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
/%{_lib}/lib*
|
||||
%{_libdir}/lib*.so.*
|
||||
%{_libdir}/libunwind.so
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
%{_includedir}/*
|
||||
%{_libdir}/lib*.a
|
||||
%{_libdir}/libunwind-*.so
|
||||
%{_libdir}/pkgconfig/libunwind-generic.pc
|
||||
%{_libdir}/pkgconfig/libunwind-ptrace.pc
|
||||
%{_libdir}/pkgconfig/libunwind-setjmp.pc
|
||||
%{_libdir}/pkgconfig/libunwind.pc
|
||||
%ifarch %arm %ix86 x86_64 aarch64
|
||||
%{_libdir}/pkgconfig/libunwind-coredump.pc
|
||||
%endif
|
||||
%doc %{_mandir}/man?/*
|
||||
%{_libdir}/libunwind*.a
|
||||
%{_libdir}/libunwind*.so
|
||||
%{_libdir}/pkgconfig/libunwind*.pc
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user