From 6901def689b5c77465d34f07822989ec67e80c1e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 24 May 2016 08:44:10 -0700 Subject: Avoid an extra branch to PLT for -z now When --enable-bind-now is used to configure glibc build, we can avoid an extra branch to the PLT entry by using indirect branch via the GOT slot instead, which is similar to the first instructuon in the PLT entry. Changes in the shared library sizes in text sections: Shared library Before (bytes) After (bytes) libm.so 1060813 1060797 libmvec.so 160881 160805 libpthread.so 94992 94984 librt.so 25064 25048 * 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. --- configure | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure') 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 : -- cgit v1.2.3