[PATCH] Avoid symbol versions in rtld syscalls

Richard Henderson rth@twiddle.net
Wed May 30 19:00:00 GMT 2012


On 05/30/2012 09:16 AM, Roland McGrath wrote:
> I think if we can avoid adding single-use macros to libc-symbols.h
> that would be better.

Ok.  I've applied the following.  Re-tested on x86_64 and alpha.


r~
-------------- next part --------------
+	* sysdeps/unix/make-syscalls.sh: Protect symbol_version output
+	with #ifndef NOT_IN_libc.

 
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index cedce31..2bc7cc0 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -76,6 +76,7 @@ emit_weak_aliases()
       *@@*)
 	base=`echo $name | sed 's/@@.*//'`
 	ver=`echo $name | sed 's/.*@@//'`
+	echo "	 echo '#ifndef NOT_IN_libc'; \\"
 	if test -z "$vcount" ; then
 	  source=$strong
 	  vcount=1
@@ -85,10 +86,14 @@ emit_weak_aliases()
 	  echo "	 echo 'strong_alias ($strong, $source)'; \\"
 	fi
 	echo "	 echo 'default_symbol_version($source, $base, $ver)'; \\"
+	echo "	 echo '#else'; \\"
+	echo "	 echo 'strong_alias ($strong, $base)'; \\"
+	echo "	 echo '#endif'; \\"
 	;;
       *@*)
 	base=`echo $name | sed 's/@.*//'`
 	ver=`echo $name | sed 's/.*@//'`
+	echo "	 echo '#ifndef NOT_IN_libc'; \\"
 	if test -z "$vcount" ; then
 	  source=$strong
 	  vcount=1
@@ -98,6 +103,7 @@ emit_weak_aliases()
 	  echo "	 echo 'strong_alias ($strong, $source)'; \\"
 	fi
 	echo "	 echo 'symbol_version ($source, $base, $ver)'; \\"
+	echo "	 echo '#endif'; \\"
 	;;
       !*)
 	name=`echo $name | sed 's/.//'`


More information about the Libc-alpha mailing list