GNU C Library master sources branch google/grte/v5-2.27/master updated. glibc-2.27-42-g259eaf2

shebs@sourceware.org shebs@sourceware.org
Wed Feb 14 18:18:00 GMT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, google/grte/v5-2.27/master has been updated
       via  259eaf23ad74ea08bf4286c8697d020756258620 (commit)
       via  79c43cc5124612db8003cf1ed8671299b7fb3388 (commit)
      from  cbed3922de9400b348d18e856550cc259896cace (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=259eaf23ad74ea08bf4286c8697d020756258620

commit 259eaf23ad74ea08bf4286c8697d020756258620
Author: Stan Shebs <stanshebs@google.com>
Date:   Wed Feb 14 09:44:15 2018 -0800

    Use LN_S in more places to forestall hard link creation

diff --git a/Makerules b/Makerules
index 9db5fb5..726d74b 100644
--- a/Makerules
+++ b/Makerules
@@ -742,7 +742,7 @@ endif
 ifeq (,$(filter sunrpc,$(subdirs)))
 $(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a
 	$(make-target-directory)
-	ln -f $< $@
+	$(LN_S) -f $< $@
 else
 $(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a \
 				    $(common-objpfx)sunrpc/librpc_compat_pic.a
@@ -1100,7 +1100,7 @@ mv -f $@.new $@
 endef
 define make-link-multidir
 $(make-target-directory)
-ln -f $(objpfx)/$(@F) $@
+$(LN_S) -f $(objpfx)/$(@F) $@
 endef
 endif
 
diff --git a/nptl/Makefile b/nptl/Makefile
index a2b3a00..40680e8 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -678,14 +678,14 @@ $(objpfx)tst-cleanup0-cmp.out: tst-cleanup0.expect $(objpfx)tst-cleanup0.out
 	$(evaluate-test)
 
 $(objpfx)crti.o: $(objpfx)pt-crti.o
-	ln -f $< $@
+	$(LN_S) -f $< $@
 
 ifneq ($(multidir),.)
 $(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
-	ln -f $< $@
+	$(LN_S) -f $< $@
 
 $(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/
-	ln -f $< $@
+	$(LN_S) -f $< $@
 endif
 
 generated += libpthread_nonshared.a \
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 54e2ac7..04f04cc 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -163,7 +163,7 @@ endif
 $(objpfx)x86_64/tst-x86_64mod-1.os: $(objpfx)tst-x86_64mod-1.os
 	$(make-target-directory)
 	rm -f $@
-	ln $< $@
+	$(LN_S) $< $@
 
 do-tests-clean common-mostlyclean: tst-x86_64-1-clean
 
@@ -174,4 +174,4 @@ tst-x86_64-1-clean:
 $(objpfx)x86_64/tst-platformmod-2.os: $(objpfx)tst-platformmod-2.os
 	$(make-target-directory)
 	rm -f $@
-	ln $< $@
+	$(LN_S) $< $@

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79c43cc5124612db8003cf1ed8671299b7fb3388

commit 79c43cc5124612db8003cf1ed8671299b7fb3388
Author: Stan Shebs <stanshebs@google.com>
Date:   Wed Feb 14 09:15:44 2018 -0800

    Add a --with-lld option to choose LLVMs lld linker

diff --git a/Makeconfig b/Makeconfig
index 695c3f8..dce9b35 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -521,8 +521,13 @@ CFLAGS-printers-tests := -O0 -ggdb3 -DIS_IN_build
 
 ifeq (yes,$(build-shared))
 # These indicate whether to link using the built ld.so or the installed one.
+ifeq ($(with-lld),no)
 installed-rtld-LDFLAGS = -Wl,-dynamic-linker=$(rtlddir)/$(rtld-installed-name)
 built-rtld-LDFLAGS = -Wl,-dynamic-linker=$(elf-objpfx)ld.so
+else
+installed-rtld-LDFLAGS = -Wl,-dynamic-linker,$(rtlddir)/$(rtld-installed-name)
+built-rtld-LDFLAGS = -Wl,-dynamic-linker,$(elf-objpfx)ld.so
+endif
 
 ifndef rtld-LDFLAGS
 rtld-LDFLAGS = $(installed-rtld-LDFLAGS)
@@ -907,6 +912,12 @@ ifeq ($(with-clang),yes)
 # Non-string format arguments come from debugging prints in ld.so.
 +cflags += -Wno-format-security
 
+ifeq ($(with-lld),yes)
+LDFLAGS.so += -fuse-ld=lld
+LDFLAGS-rtld += -fuse-ld=lld
+LDFLAGS += -fuse-ld=lld
+endif
+
 endif	# with-clang == yes
 
 +cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \
diff --git a/configure b/configure
index 8bdc71a..0c64f96 100755
--- a/configure
+++ b/configure
@@ -762,6 +762,7 @@ with_gd_lib
 with_binutils
 with_selinux
 with_clang
+with_lld
 with_headers
 with_default_link
 enable_sanity_checks
@@ -1489,6 +1490,7 @@ Optional Packages:
   --with-binutils=PATH    specify location of binutils (as and ld)
   --with-selinux          if building with SELinux support
   --with-clang            if building with clang (temporary)
+  --with-lld              if building/linking with lld (temporary)
   --with-headers=PATH     location of system headers to use (for example
                           /usr/src/linux/include) [default=compiler default]
   --with-default-link     do not use explicit linker scripts
@@ -3339,6 +3341,16 @@ fi
 config_vars="$config_vars
 with-clang = $with_clang"
 
+# Check whether --with-lld was given.
+if test "${with_lld+set}" = set; then :
+  withval=$with_lld; with_lld=$withval
+else
+  with_lld=no
+fi
+
+config_vars="$config_vars
+with-lld = $with_lld"
+
 
 # Check whether --with-headers was given.
 if test "${with_headers+set}" = set; then :
@@ -4478,6 +4490,7 @@ $as_echo "$libc_cv_prog_ld_gnu" >&6; }
 gnu_ld=$libc_cv_prog_ld_gnu
 
 
+if test "$with_clang" = no; then
 # Accept binutils 2.25 or newer.
 for ac_prog in $AS
 do
@@ -4542,7 +4555,9 @@ if test $ac_verc_fail = yes; then
   AS=: critic_missing="$critic_missing as"
 fi
 
+fi
 
+if test "$with_lld" = no; then
 if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then
   # Accept gold 1.14 or higher
   for ac_prog in $LD
@@ -4673,6 +4688,7 @@ if test $ac_verc_fail = yes; then
 fi
 
 fi
+fi
 
 # These programs are version sensitive.
 
diff --git a/configure.ac b/configure.ac
index 34b905b..9899b3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,6 +144,13 @@ AC_ARG_WITH([clang],
 	    [with_clang=$withval],
 	    [with_clang=no])
 LIBC_CONFIG_VAR([with-clang], [$with_clang])
+dnl This is a temporary hack, to help with BFD LD vs LLD debugging.
+AC_ARG_WITH([lld],
+	    AC_HELP_STRING([--with-lld],
+			   [if building/linking with lld (temporary)]),
+	    [with_lld=$withval],
+	    [with_lld=no])
+LIBC_CONFIG_VAR([with-lld], [$with_lld])
 
 AC_ARG_WITH([headers],
 	    AC_HELP_STRING([--with-headers=PATH],
@@ -928,12 +935,15 @@ AC_PROG_LN_S
 
 LIBC_PROG_BINUTILS
 
+if test "$with_clang" = no; then
 # Accept binutils 2.25 or newer.
 AC_CHECK_PROG_VER(AS, $AS, --version,
 		  [GNU assembler.* \([0-9]*\.[0-9.]*\)],
 		  [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
 		  AS=: critic_missing="$critic_missing as")
+fi
 
+if test "$with_lld" = no; then
 if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then
   # Accept gold 1.14 or higher
   AC_CHECK_PROG_VER(LD, $LD, --version,
@@ -946,6 +956,7 @@ else
 		    [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
 		    LD=: critic_missing="$critic_missing GNU ld")
 fi
+fi
 
 # These programs are version sensitive.
 AC_CHECK_TOOL_PREFIX
diff --git a/elf/Makefile b/elf/Makefile
index e460587..6aefe50 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -444,9 +444,10 @@ $(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a
 	rm -f $@.o
 	mv -f $@T $@
 
+# For lld, add to regexp below for optional address and size to be at front of line.
 $(objpfx)librtld.mk: $(objpfx)librtld.map Makefile
 	LC_ALL=C \
-	sed -n 's@^$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
+	sed -n 's@^[0-9a-f ]*$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
 	    $< | \
 	while read lib file; do \
 	  case $$lib in \
diff --git a/elf/rtld.c b/elf/rtld.c
index aaf8c32..5d4f013 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -392,7 +392,13 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
 #endif
   _dl_setup_hash (&GL(dl_rtld_map));
   GL(dl_rtld_map).l_real = &GL(dl_rtld_map);
+#if defined(__clang__)
+  /* Work around an lld complaint that _begin cannot have a reloc and
+     also be absolute because of _begin=0 on linker line.  */
+  GL(dl_rtld_map).l_map_start = (ElfW(Addr)) 0;
+#else
   GL(dl_rtld_map).l_map_start = (ElfW(Addr)) _begin;
+#endif
   GL(dl_rtld_map).l_map_end = (ElfW(Addr)) _end;
   GL(dl_rtld_map).l_text_end = (ElfW(Addr)) _etext;
   /* Copy the TLS related data if necessary.  */

-----------------------------------------------------------------------

Summary of changes:
 Makeconfig              |   11 +++++++++++
 Makerules               |    4 ++--
 configure               |   16 ++++++++++++++++
 configure.ac            |   11 +++++++++++
 elf/Makefile            |    3 ++-
 elf/rtld.c              |    6 ++++++
 nptl/Makefile           |    6 +++---
 sysdeps/x86_64/Makefile |    4 ++--
 8 files changed, 53 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources



More information about the Glibc-cvs mailing list