public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: check for SHARED instead of PIC where sensible
@ 2016-01-01  0:00 Étienne Buira
  2016-01-01  0:00 ` Joseph Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Étienne Buira @ 2016-01-01  0:00 UTC (permalink / raw)
  To: libc-stable

This caused build issues where jb HIDDEN_JUMPTARGET (symname) were
expanded to jb *symname@GOTPCREL(%rip), which is not encodable as Jcc
requires immediate. PIC were defined because the compiler defaulted to
-fPIC.

Only tested on Linux x86_64 without avx512.

Some test fails, but it looks unrelated.

	* sysdeps/x86_64/sysdep.h: Check for SHARED instead of PIC
	* sysdeps/x86_64/mempcpy_chk.S: ditto
	* sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S: ditto
---
 ChangeLog                                              | 7 +++++++
 sysdeps/x86_64/mempcpy_chk.S                           | 2 +-
 sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S | 2 +-
 sysdeps/x86_64/sysdep.h                                | 2 +-
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 06360aa..527c832 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-12-17  Étienne Buira <etienne.buira@gmail.com>
+
+	x86_64: check for SHARED instead of PIC where sensible
+	* sysdeps/x86_64/sysdep.h: Check for SHARED instead of PIC
+	* sysdeps/x86_64/mempcpy_chk.S: ditto
+	* sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S: ditto
+
 2016-08-02  Aurelien Jarno  <aurelien@aurel32.net>
 
 2016-08-02  Aurelien Jarno  <aurelien@aurel32.net>
diff --git a/sysdeps/x86_64/mempcpy_chk.S b/sysdeps/x86_64/mempcpy_chk.S
index 390abc6..4ed9c91 100644
--- a/sysdeps/x86_64/mempcpy_chk.S
+++ b/sysdeps/x86_64/mempcpy_chk.S
@@ -19,7 +19,7 @@
 #include <sysdep.h>
 #include "asm-syntax.h"
 
-#ifndef PIC
+#ifndef SHARED
 	/* For libc.so this is defined in memcpy.S.
 	   For libc.a, this is a separate source to avoid
 	   mempcpy bringing in __chk_fail and all routines
diff --git a/sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S b/sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S
index 9687df0..981cfde 100644
--- a/sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S
+++ b/sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S
@@ -27,7 +27,7 @@
 #endif
 
 	.section .text.avx512,"ax",@progbits
-#if defined PIC
+#if defined SHARED
 ENTRY (MEMSET_CHK)
 	cmpq	%rdx, %rcx
 	jb	HIDDEN_JUMPTARGET (__chk_fail)
diff --git a/sysdeps/x86_64/sysdep.h b/sysdeps/x86_64/sysdep.h
index 75ac747..9ae0e0f 100644
--- a/sysdeps/x86_64/sysdep.h
+++ b/sysdeps/x86_64/sysdep.h
@@ -89,7 +89,7 @@ lose:									      \
   END (name)
 
 #undef JUMPTARGET
-#ifdef PIC
+#ifdef SHARED
 # ifdef BIND_NOW
 #  define JUMPTARGET(name)	*name##@GOTPCREL(%rip)
 # else
-- 
2.10.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86_64: check for SHARED instead of PIC where sensible
  2016-01-01  0:00 [PATCH] x86_64: check for SHARED instead of PIC where sensible Étienne Buira
@ 2016-01-01  0:00 ` Joseph Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Myers @ 2016-01-01  0:00 UTC (permalink / raw)
  To: Étienne Buira; +Cc: libc-stable

libc-stable is only for cherry-picks to past release branches of changes 
that are already on master.  Only one of these changes appears to be on 
master, in a different form and with H.J. Lu's name on it.  You need to 
get the other changes on master (via proposing them on libc-alpha) before 
proposing cherry-picks to any past release branches.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-19 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-01  0:00 [PATCH] x86_64: check for SHARED instead of PIC where sensible Étienne Buira
2016-01-01  0:00 ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).