[dts+el7] [x86*] Bundle libipt - fix its initialization (RH BZ 1256513).

This commit is contained in:
Jan Kratochvil 2016-08-23 09:22:28 +02:00
parent b4d85c5451
commit 92d45fce5d
3 changed files with 30 additions and 2 deletions

View File

@ -2,7 +2,7 @@ Index: gdb-7.11.1/gdb/nat/linux-btrace.h
===================================================================
--- gdb-7.11.1.orig/gdb/nat/linux-btrace.h 2016-02-10 04:19:39.000000000 +0100
+++ gdb-7.11.1/gdb/nat/linux-btrace.h 2016-08-19 20:49:18.735477251 +0200
@@ -28,6 +28,176 @@
@@ -28,6 +28,177 @@
# include <linux/perf_event.h>
#endif
@ -11,6 +11,7 @@ Index: gdb-7.11.1/gdb/nat/linux-btrace.h
+# error "PERF_ATTR_SIZE_VER5_BUNDLE && !HAVE_LINUX_PERF_EVENT_H"
+#endif
+#ifndef PERF_ATTR_SIZE_VER5
+#define PERF_ATTR_SIZE_VER5
+#define perf_event_mmap_page perf_event_mmap_page_bundle
+// kernel-headers-3.10.0-493.el7.x86_64/usr/include/linux/perf_event.h
+/*
@ -205,3 +206,16 @@ Index: gdb-7.11.1/gdb/configure.ac
#endif
]]), [perf_event=yes], [perf_event=no])
if test "$perf_event" != yes; then
--- gdb-7.11.1/gdb/gdb.c-orig 2016-02-10 04:19:39.000000000 +0100
+++ gdb-7.11.1/gdb/gdb.c 2016-08-23 09:15:13.169650953 +0200
@@ -25,6 +25,10 @@ main (int argc, char **argv)
{
struct captured_main_args args;
+ // RHEL DTS bundle:
+ extern void __libipt_init(void);
+ __libipt_init();
+
memset (&args, 0, sizeof args);
args.argc = argc;
args.argv = argv;

View File

@ -27,7 +27,7 @@ Version: 7.11.1
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 80%{?dist}
Release: 81%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
Group: Development/Debuggers
@ -1457,6 +1457,9 @@ then
fi
%changelog
* Tue Aug 23 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-81.fc24
- [dts+el7] [x86*] Bundle libipt - fix its initialization (RH BZ 1256513).
* Mon Aug 22 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-80.fc24
- [dts] Upgrade libstdc++-v3-python to 6.1.1-20160817.

View File

@ -9,3 +9,14 @@
${LIBIPT_FILES}
)
--- processor-trace-1.5/libipt/src/posix/init.c-orig 2016-04-07 08:52:14.000000000 +0200
+++ processor-trace-1.5/libipt/src/posix/init.c 2016-08-23 09:04:11.540176668 +0200
@@ -29,7 +29,7 @@
#include "pt_ild.h"
-static void __attribute__((constructor)) init(void)
+void __libipt_init(void)
{
/* Initialize the Intel(R) Processor Trace instruction decoder. */
pt_ild_init();