This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch hjl/ifunc/test updated. glibc-2.16-ports-merge-418-ga101127


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, hjl/ifunc/test has been updated
       via  a101127300a36f50a8c34d4f2ee3d07aafaa0612 (commit)
       via  fe6a5ad3c6a5af30c0c487be62065ca2ed9f36c9 (commit)
      from  6711ab3cf9bdc2fa46af1a61605117b28b3e6fd8 (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a101127300a36f50a8c34d4f2ee3d07aafaa0612

commit a101127300a36f50a8c34d4f2ee3d07aafaa0612
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Sep 23 13:59:31 2012 -0700

    Ensure GLIBC_ versions come first in libc_ifunc.map

diff --git a/ChangeLog.test-ifunc b/ChangeLog.test-ifunc
index 0467a70..cb8d519 100644
--- a/ChangeLog.test-ifunc
+++ b/ChangeLog.test-ifunc
@@ -1,5 +1,10 @@
 2012-09-23  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* scripts/versions.awk: Ensure GLIBC_ versions come always first
+	in libc_ifunc.map.
+
+2012-09-23  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* Makeconfig (link-libc-ifunc-before-gnulib): Replace libc_ifunc.so
 	with string/libc.so.
 	(run-program-prefix): Prepend $(common-objpfx)string: to
diff --git a/scripts/versions.awk b/scripts/versions.awk
index 527f818..dc0c665 100644
--- a/scripts/versions.awk
+++ b/scripts/versions.awk
@@ -145,17 +145,32 @@ END {
   if (libs["libc_ifunc"]) {
     close (tmpfile);
     # Generate libc_ifunc.map from libc and libc_ifunc versions.
+    ifuncfile = buildroot "Versions.ifunc";
     oldlib = "";
-    oldver = "";
+    last_count=1;
     while (getline < tmpfile) {
-      if ($1 != "libc" && $1 != "libc_ifunc")
+      if ($1 != "libc" && $1 != "libc_ifunc") {
+	if (oldlib == "libc_ifunc")
+	  break;
 	continue;
-      if (oldlib != "libc_ifunc") {
-        if (oldlib != "") {
-	  closeversion(oldver, veryoldver);
-	  oldver = "";
-	  close_and_move(outfile, real_outfile);
-	}
+      }
+      sub(/^libc_ifunc/,"libc",$0)
+      oldlib = "libc_ifunc";
+      # Ensure GLIBC_ versions come always first.
+      if ($2 !~ /^GLIBC/) {
+	last_versions[last_count] = $0;
+	last_count++;
+      }
+      else
+	printf("%s\n", $0) > ifuncfile;
+    }
+    for (n = 1; n < last_count; n++)
+      printf("%s\n", last_versions[n]) > ifuncfile;
+    close (ifuncfile);
+    oldlib = "";
+    oldver = "";
+    while (getline < ifuncfile) {
+      if (oldlib == "") {
 	oldlib = "libc_ifunc";
 	real_outfile = buildroot oldlib ".map";
 	outfile = real_outfile "T";

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe6a5ad3c6a5af30c0c487be62065ca2ed9f36c9

commit fe6a5ad3c6a5af30c0c487be62065ca2ed9f36c9
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Sep 23 12:58:07 2012 -0700

    Replace libc_ifunc.so with string/libc.so
    
    libc_ifunc.so must have the same soname as libc.so.  Otherwise, dlopen
    libgcc_s.so.1 won't work since libc.so is in DT_NEEDED of libgcc_s.so.1.
    We create a symlink from libc_ifunc.so to string/libc.so.6 and use
    string/libc.so.6, instead of libc.so.6, to run ifunc tests.

diff --git a/ChangeLog.test-ifunc b/ChangeLog.test-ifunc
index d2af3a3..0467a70 100644
--- a/ChangeLog.test-ifunc
+++ b/ChangeLog.test-ifunc
@@ -1,5 +1,22 @@
 2012-09-23  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* Makeconfig (link-libc-ifunc-before-gnulib): Replace libc_ifunc.so
+	with string/libc.so.
+	(run-program-prefix): Prepend $(common-objpfx)string: to
+	--library-path for ifunc tests.
+	* Makerules (build-shlib-ifunc-helper): New macro.
+	(build-shlib-ifunc): Likewise.
+	($(common-objpfx)libc_ifunc.so): Replce $(build-shlib) with
+	$(build-shlib-ifunc).
+	($(common-objpfx)libc_ifunc.so$(libc.so-version)): Renamed to ...
+	($(common-objpfx)string/libc.so$(libc.so-version)): This.
+	(common-generated): Replace libc_ifunc.so$(libc.so-version) with
+	string/libc.so$(libc.so-version).
+	* Rules ($(addprefix $(objpfx),$(binaries-shared-ifunc-tests))):
+	Replace lib% with string/lib%.
+
+2012-09-23  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* Makeconfig (+link-ifunc-tests): New macro.
 	(+link-static-ifunc-tests): Likewise.
 	(link-libc-ifunc-before-gnulib): Likwewise.
diff --git a/Makeconfig b/Makeconfig
index 951cf48..fe33a9e 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -490,7 +490,7 @@ link-libc = $(link-libc-before-gnulib) $(gnulib)
 link-libc-tests = $(link-libc-before-gnulib) $(gnulib-tests)
 # Link against libc_ifunc.so for IFUNC tests.
 link-libc-ifunc-before-gnulib = -Wl,-rpath-link=$(rpath-link) \
-	    $(common-objpfx)libc_ifunc.so$(libc.so-version) \
+	    $(common-objpfx)string/libc.so$(libc.so-version) \
 	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) \
 	    $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed)
 link-libc-ifunc = $(link-libc-ifunc-before-gnulib) $(gnulib)
@@ -611,7 +611,10 @@ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
 run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
 				   $(tests-static) $(xtests-static)),, \
 			  $(elf-objpfx)$(rtld-installed-name) \
-			  --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
+			  --library-path $(if $(filter $(notdir $(built-program-file)), \
+						       $(tests-ifunc) $(xtests-ifunc)), \
+					      $(common-objpfx)string:$(rpath-link)$(patsubst %,:%,$(sysdep-library-path)), \
+					      $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))))
 else
 run-program-prefix =
 endif
diff --git a/Makerules b/Makerules
index fb2a7cd..cd109ba 100644
--- a/Makerules
+++ b/Makerules
@@ -455,6 +455,17 @@ $(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
 	  -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
 endef
 
+# Build libc_ifunc.so with the same soname as libc.so.
+define build-shlib-ifunc-helper
+$(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
+	  $(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) $(config-LDFLAGS) \
+	  $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
+	  $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
+	  -Wl,-soname=libc.so$(libc.so-version) \
+	  $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
+	  -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
+endef
+
 ifeq (yes,$(use-default-link))
 # If the linker is good enough, we can let it use its default linker script.
 shlib-lds =
@@ -504,6 +515,11 @@ $(build-shlib-helper) -o $@ $(shlib-lds-flags) \
 	  $(csu-objpfx)abi-note.o $(build-shlib-objlist)
 endef
 
+define build-shlib-ifunc
+$(build-shlib-ifunc-helper) -o $@ $(shlib-lds-flags) \
+	  $(csu-objpfx)abi-note.o $(build-shlib-objlist)
+endef
+
 define build-module-helper
 $(LINK.o) -shared $(static-libgcc) $(sysdep-LDFLAGS) $(config-LDFLAGS) \
 	  $(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) \
@@ -587,7 +603,7 @@ $(common-objpfx)libc_ifunc.so: $(elfobjdir)/soinit.os \
 			       $(elfobjdir)/sofini.os \
 			       $(elfobjdir)/interp.os $(elfobjdir)/ld.so \
 			       $(shlib-lds)
-	$(build-shlib)
+	$(build-shlib-ifunc)
 ifeq ($(versioning),yes)
 $(common-objpfx)libc.so: $(common-objpfx)libc.map
 $(common-objpfx)libc_ifunc.so: $(common-objpfx)libc_ifunc.map
@@ -597,9 +613,9 @@ ifdef libc.so-version
 $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
 	$(make-link)
 common-generated += libc.so$(libc.so-version)
-$(common-objpfx)libc_ifunc.so$(libc.so-version): $(common-objpfx)libc_ifunc.so
+$(common-objpfx)string/libc.so$(libc.so-version): $(common-objpfx)libc_ifunc.so
 	$(make-link)
-common-generated += libc_ifunc.so$(libc.so-version)
+common-generated += string/libc.so$(libc.so-version)
 endif
 endif
 
diff --git a/Rules b/Rules
index c436b43..aebb987 100644
--- a/Rules
+++ b/Rules
@@ -151,7 +151,7 @@ endif
 
 ifneq "$(strip $(binaries-shared-ifunc-tests))" ""
 $(addprefix $(objpfx),$(binaries-shared-ifunc-tests)): %: %.o \
-  $(sort $(filter $(common-objpfx)lib%,$(link-libc-ifunc))) \
+  $(sort $(filter $(common-objpfx)string/lib%, $(link-libc-ifunc))) \
   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
 	$(+link-ifunc-tests)
 endif

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

Summary of changes:
 ChangeLog.test-ifunc |   22 ++++++++++++++++++++++
 Makeconfig           |    7 +++++--
 Makerules            |   22 +++++++++++++++++++---
 Rules                |    2 +-
 scripts/versions.awk |   31 +++++++++++++++++++++++--------
 5 files changed, 70 insertions(+), 14 deletions(-)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]