diff mbox

PATCH: PR libitm/64360: libitm.c/stackundo.c fails with -fpic

Message ID 20150115122320.GA28831@gmail.com
State New
Headers show

Commit Message

H.J. Lu Jan. 15, 2015, 12:23 p.m. UTC
Hi,

libitm.c/stackundo.c fails with -fpic since test1 and test2 may be
preempted with -fpic.  This patch makes those 2 functions static.
Tested on Linux/x86.  OK for trunk?

Thanks.


H.J.
----

Comments

Jeff Law Jan. 15, 2015, 5:59 p.m. UTC | #1
On 01/15/15 05:23, H.J. Lu wrote:
> Hi,
>
> libitm.c/stackundo.c fails with -fpic since test1 and test2 may be
> preempted with -fpic.  This patch makes those 2 functions static.
> Tested on Linux/x86.  OK for trunk?
>
> Thanks.
>
>
> H.J.
> ----
> diff --git a/libitm/ChangeLog b/libitm/ChangeLog
> index 74e2940..e46819c 100644
> --- a/libitm/ChangeLog
> +++ b/libitm/ChangeLog
> @@ -1,3 +1,9 @@
> +2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
> +
> +	PR libitm/64360
> +	* libitm.c/stackundo.c (test2): Make it static.
> +	(test1): Likewise.
OK.
Jeff
diff mbox

Patch

diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index 74e2940..e46819c 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,9 @@ 
+2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR libitm/64360
+	* libitm.c/stackundo.c (test2): Make it static.
+	(test1): Likewise.
+
 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
 
 	Update copyright years.
diff --git a/libitm/testsuite/libitm.c/stackundo.c b/libitm/testsuite/libitm.c/stackundo.c
index 02759d7..c7d585e 100644
--- a/libitm/testsuite/libitm.c/stackundo.c
+++ b/libitm/testsuite/libitm.c/stackundo.c
@@ -1,10 +1,10 @@ 
-int __attribute__((noinline)) test2(int x[1000])
+static int __attribute__((noinline)) test2(int x[1000])
 {
   int i;
   return x[12];
 }
 
-int __attribute__((noinline)) test1()
+static int __attribute__((noinline)) test1()
 {
   int x[1000], i;