diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | config.h.in | 3 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | sysdeps/x86_64/sysdep.h | 8 |
5 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 3345a1d379..055316f86e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-05-24 H.J. Lu <hongjiu.lu@intel.com> + + * config.h.in (BIND_NOW): New. + * configure.ac (BIND_NOW): New. Defined for --enable-bind-now. + * configure: Regenerated. + * sysdeps/x86_64/sysdep.h (JUMPTARGET)[BIND_NOW]: Defined to + indirect branch via the GOT slot. + 2016-05-24 Stefan Liebler <stli@linux.vnet.ibm.com> [BZ #19765] diff --git a/config.h.in b/config.h.in index 0147ba3c34..2c902b0214 100644 --- a/config.h.in +++ b/config.h.in @@ -87,6 +87,9 @@ include/libc-symbols.h that avoid PLT slots in the shared objects. */ #undef NO_HIDDEN +/* Define this to disable lazy relocations in DSOs. */ +#undef BIND_NOW + /* AArch64 big endian ABI */ #undef HAVE_AARCH64_BE diff --git a/configure b/configure index 8fe59377ea..19a4829466 100755 --- a/configure +++ b/configure @@ -3416,6 +3416,10 @@ else fi +if test "x$bindnow" = xyes; then + $as_echo "#define BIND_NOW 1" >>confdefs.h + +fi # Check whether --enable-static-nss was given. if test "${enable_static_nss+set}" = set; then : diff --git a/configure.ac b/configure.ac index 3c766b7409..123f0d26ee 100644 --- a/configure.ac +++ b/configure.ac @@ -231,6 +231,9 @@ AC_ARG_ENABLE([bind-now], [bindnow=$enableval], [bindnow=no]) AC_SUBST(bindnow) +if test "x$bindnow" = xyes; then + AC_DEFINE(BIND_NOW) +fi dnl On some platforms we cannot use dynamic loading. We must provide dnl static NSS modules. diff --git a/sysdeps/x86_64/sysdep.h b/sysdeps/x86_64/sysdep.h index fbe3560588..75ac747be8 100644 --- a/sysdeps/x86_64/sysdep.h +++ b/sysdeps/x86_64/sysdep.h @@ -90,9 +90,13 @@ lose: \ #undef JUMPTARGET #ifdef PIC -#define JUMPTARGET(name) name##@PLT +# ifdef BIND_NOW +# define JUMPTARGET(name) *name##@GOTPCREL(%rip) +# else +# define JUMPTARGET(name) name##@PLT +# endif #else -#define JUMPTARGET(name) name +# define JUMPTARGET(name) name #endif /* Local label name for asm code. */ |