6518331 Eliminate duplicate addresses from ON ELF symbol sort sections
authorab196087
Tue, 22 May 2007 11:10:09 -0700
changeset 4292 d7beef35913b
parent 4291 2650d270ece9
child 4293 3c6c7c2c4d21
6518331 Eliminate duplicate addresses from ON ELF symbol sort sections
usr/src/cmd/sgs/libelf/common/mapfile-common
usr/src/common/atomic/amd64/atomic.s
usr/src/common/atomic/i386/atomic.s
usr/src/common/atomic/sparc/atomic.s
usr/src/common/atomic/sparcv9/atomic.s
usr/src/lib/libbsm/common/mapfile-vers
usr/src/lib/libc/amd64/gen/byteorder.s
usr/src/lib/libc/amd64/mapfile-vers
usr/src/lib/libc/i386/gen/byteorder.s
usr/src/lib/libc/i386/mapfile-vers
usr/src/lib/libc/port/gen/seekdir.c
usr/src/lib/libc/port/gen/telldir.c
usr/src/lib/libc/port/mapfile-vers
usr/src/lib/libc/port/threads/scalls.c
usr/src/lib/libc/sparc/mapfile-vers
usr/src/lib/libc/sparcv9/mapfile-vers
usr/src/lib/libc_psr/sun4u/Makefile.com
usr/src/lib/libc_psr/sun4u/mapfile-memcpy
usr/src/lib/libmd/common/mapfile-vers
usr/src/lib/libproc/common/mapfile-vers
usr/src/lib/libsys/sparc/mapfile-vers
usr/src/lib/libtnfctl/mapfile-vers
usr/src/lib/libtnfprobe/probe_cntl.c
usr/src/lib/ncad_addr/amd64/mapfile-vers
usr/src/lib/ncad_addr/i386/mapfile-vers
usr/src/lib/ncad_addr/sparc/mapfile-vers
usr/src/lib/ncad_addr/sparcv9/mapfile-vers
usr/src/lib/print/libpapi-common/common/mapfile
usr/src/tools/scripts/check_rtime.1
usr/src/tools/scripts/check_rtime.pl
--- a/usr/src/cmd/sgs/libelf/common/mapfile-common	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/cmd/sgs/libelf/common/mapfile-common	Tue May 22 11:10:09 2007 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -153,10 +153,10 @@
 	_elf_fill;
 	_elf_flagdata;
 	_elf_flagehdr;
-	_elf_flagelf;
-	_elf_flagphdr;
+	_elf_flagelf =	NODYNSORT;
+	_elf_flagphdr =	NODYNSORT;
 	_elf_flagscn;
-	_elf_flagshdr;
+	_elf_flagshdr =	NODYNSORT;
 	_elf_getarhdr;
 	_elf_getarsym;
 	_elf_getbase;
@@ -182,7 +182,7 @@
 	_elf_update;
 	_elf32_fsize;
 	_elf32_xlatetof;
-	_elf32_xlatetom;
+	_elf32_xlatetom = NODYNSORT;
 	_elf_version;
 	_gelf_getdyndtflags_1;
 };
--- a/usr/src/common/atomic/amd64/atomic.s	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/common/atomic/amd64/atomic.s	Tue May 22 11:10:09 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -582,12 +581,23 @@
 
 #if !defined(_KERNEL)
 
+	/*
+	 * NOTE: membar_enter, and membar_exit are identical routines. 
+	 * We define them separately, instead of using an ALTENTRY
+	 * definitions to alias them together, so that DTrace and
+	 * debuggers will see a unique address for them, allowing 
+	 * more accurate tracing.
+	*/
+
 	ENTRY(membar_enter)
-	ALTENTRY(membar_exit)
+	mfence
+	ret
+	SET_SIZE(membar_enter)
+
+	ENTRY(membar_exit)
 	mfence
 	ret
 	SET_SIZE(membar_exit)
-	SET_SIZE(membar_enter)
 
 	ENTRY(membar_producer)
 	sfence
--- a/usr/src/common/atomic/i386/atomic.s	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/common/atomic/i386/atomic.s	Tue May 22 11:10:09 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -121,6 +120,12 @@
 	SET_SIZE(atomic_inc_uint_nv)
 	SET_SIZE(atomic_inc_32_nv)
 
+	/*
+	 * NOTE: If atomic_inc_64 and atomic_inc_64_nv are ever
+	 * separated, you need to also edit the libc i386 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_64_nv.
+	 */
 	ENTRY(atomic_inc_64)
 	ALTENTRY(atomic_inc_64_nv)
 	pushl	%edi
@@ -218,6 +223,12 @@
 	SET_SIZE(atomic_dec_uint_nv)
 	SET_SIZE(atomic_dec_32_nv)
 
+	/*
+	 * NOTE: If atomic_dec_64 and atomic_dec_64_nv are ever
+	 * separated, it is important to edit the libc i386 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_64_nv.
+	 */
 	ENTRY(atomic_dec_64)
 	ALTENTRY(atomic_dec_64_nv)
 	pushl	%edi
@@ -390,6 +401,12 @@
 	SET_SIZE(atomic_add_int_nv)
 	SET_SIZE(atomic_add_32_nv)
 
+	/*
+	 * NOTE: If atomic_add_64 and atomic_add_64_nv are ever
+	 * separated, it is important to edit the libc i386 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_64_nv.
+	 */
 	ENTRY(atomic_add_64)
 	ALTENTRY(atomic_add_64_nv)
 	pushl	%edi
@@ -460,6 +477,12 @@
 	SET_SIZE(atomic_or_uint_nv)
 	SET_SIZE(atomic_or_32_nv)
 
+	/*
+	 * NOTE: If atomic_or_64 and atomic_or_64_nv are ever
+	 * separated, it is important to edit the libc i386 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_64_nv.
+	 */
 	ENTRY(atomic_or_64)
 	ALTENTRY(atomic_or_64_nv)
 	pushl	%edi
@@ -530,6 +553,12 @@
 	SET_SIZE(atomic_and_uint_nv)
 	SET_SIZE(atomic_and_32_nv)
 
+	/*
+	 * NOTE: If atomic_and_64 and atomic_and_64_nv are ever
+	 * separated, it is important to edit the libc i386 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_64_nv.
+	 */
 	ENTRY(atomic_and_64)
 	ALTENTRY(atomic_and_64_nv)
 	pushl	%edi
@@ -682,16 +711,37 @@
 
 #if !defined(_KERNEL)
 
+	/*
+	 * NOTE: membar_enter, membar_exit, membar_producer, and 
+	 * membar_consumer are all identical routines. We define them
+	 * separately, instead of using ALTENTRY definitions to alias them
+	 * together, so that DTrace and debuggers will see a unique address
+	 * for them, allowing more accurate tracing.
+	*/
+
+
 	ENTRY(membar_enter)
-	ALTENTRY(membar_exit)
-	ALTENTRY(membar_producer)
-	ALTENTRY(membar_consumer)
+	lock
+	xorl	$0, (%esp)
+	ret
+	SET_SIZE(membar_enter)
+
+	ENTRY(membar_exit)
+	lock
+	xorl	$0, (%esp)
+	ret
+	SET_SIZE(membar_exit)
+
+	ENTRY(membar_producer)
+	lock
+	xorl	$0, (%esp)
+	ret
+	SET_SIZE(membar_producer)
+
+	ENTRY(membar_consumer)
 	lock
 	xorl	$0, (%esp)
 	ret
 	SET_SIZE(membar_consumer)
-	SET_SIZE(membar_producer)
-	SET_SIZE(membar_exit)
-	SET_SIZE(membar_enter)
 
 #endif	/* !_KERNEL */
--- a/usr/src/common/atomic/sparc/atomic.s	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/common/atomic/sparc/atomic.s	Tue May 22 11:10:09 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -49,6 +48,12 @@
 #include "../atomic_asm_weak.h"
 #endif
 
+	/*
+	 * NOTE: If atomic_inc_8 and atomic_inc_8_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_8_nv.
+	 */
 	ENTRY(atomic_inc_8)
 	ALTENTRY(atomic_inc_8_nv)
 	ALTENTRY(atomic_inc_uchar)
@@ -60,6 +65,12 @@
 	SET_SIZE(atomic_inc_8_nv)
 	SET_SIZE(atomic_inc_8)
 
+	/*
+	 * NOTE: If atomic_dec_8 and atomic_dec_8_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_8_nv.
+	 */
 	ENTRY(atomic_dec_8)
 	ALTENTRY(atomic_dec_8_nv)
 	ALTENTRY(atomic_dec_uchar)
@@ -71,6 +82,12 @@
 	SET_SIZE(atomic_dec_8_nv)
 	SET_SIZE(atomic_dec_8)
 
+	/*
+	 * NOTE: If atomic_add_8 and atomic_add_8_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_8_nv.
+	 */
 	ENTRY(atomic_add_8)
 	ALTENTRY(atomic_add_8_nv)
 	ALTENTRY(atomic_add_char)
@@ -103,6 +120,12 @@
 	SET_SIZE(atomic_add_8_nv)
 	SET_SIZE(atomic_add_8)
 
+	/*
+	 * NOTE: If atomic_inc_16 and atomic_inc_16_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_16_nv.
+	 */
 	ENTRY(atomic_inc_16)
 	ALTENTRY(atomic_inc_16_nv)
 	ALTENTRY(atomic_inc_ushort)
@@ -114,6 +137,12 @@
 	SET_SIZE(atomic_inc_16_nv)
 	SET_SIZE(atomic_inc_16)
 
+	/*
+	 * NOTE: If atomic_dec_16 and atomic_dec_16_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_16_nv.
+	 */
 	ENTRY(atomic_dec_16)
 	ALTENTRY(atomic_dec_16_nv)
 	ALTENTRY(atomic_dec_ushort)
@@ -125,6 +154,12 @@
 	SET_SIZE(atomic_dec_16_nv)
 	SET_SIZE(atomic_dec_16)
 
+	/*
+	 * NOTE: If atomic_add_16 and atomic_add_16_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_16_nv.
+	 */
 	ENTRY(atomic_add_16)
 	ALTENTRY(atomic_add_16_nv)
 	ALTENTRY(atomic_add_short)
@@ -159,6 +194,12 @@
 	SET_SIZE(atomic_add_16_nv)
 	SET_SIZE(atomic_add_16)
 
+	/*
+	 * NOTE: If atomic_inc_32 and atomic_inc_32_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_32_nv.
+	 */
 	ENTRY(atomic_inc_32)
 	ALTENTRY(atomic_inc_32_nv)
 	ALTENTRY(atomic_inc_uint)
@@ -174,6 +215,12 @@
 	SET_SIZE(atomic_inc_32_nv)
 	SET_SIZE(atomic_inc_32)
 
+	/*
+	 * NOTE: If atomic_dec_32 and atomic_dec_32_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_32_nv.
+	 */
 	ENTRY(atomic_dec_32)
 	ALTENTRY(atomic_dec_32_nv)
 	ALTENTRY(atomic_dec_uint)
@@ -189,6 +236,12 @@
 	SET_SIZE(atomic_dec_32_nv)
 	SET_SIZE(atomic_dec_32)
 
+	/*
+	 * NOTE: If atomic_add_32 and atomic_add_32_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_32_nv.
+	 */
 	ENTRY(atomic_add_32)
 	ALTENTRY(atomic_add_32_nv)
 	ALTENTRY(atomic_add_int)
@@ -216,6 +269,12 @@
 	SET_SIZE(atomic_add_32_nv)
 	SET_SIZE(atomic_add_32)
 
+	/*
+	 * NOTE: If atomic_inc_64 and atomic_inc_64_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_64_nv.
+	 */
 	ENTRY(atomic_inc_64)
 	ALTENTRY(atomic_inc_64_nv)
 	ba	add_64
@@ -223,6 +282,12 @@
 	SET_SIZE(atomic_inc_64_nv)
 	SET_SIZE(atomic_inc_64)
 
+	/*
+	 * NOTE: If atomic_dec_64 and atomic_dec_64_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_64_nv.
+	 */
 	ENTRY(atomic_dec_64)
 	ALTENTRY(atomic_dec_64_nv)
 	ba	add_64
@@ -230,6 +295,12 @@
 	SET_SIZE(atomic_dec_64_nv)
 	SET_SIZE(atomic_dec_64)
 
+	/*
+	 * NOTE: If atomic_add_64 and atomic_add_64_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_64_nv.
+	 */
 	ENTRY(atomic_add_64)
 	ALTENTRY(atomic_add_64_nv)
 	sllx	%o1, 32, %o1		! upper 32 in %o1, lower in %o2
@@ -249,6 +320,12 @@
 	SET_SIZE(atomic_add_64_nv)
 	SET_SIZE(atomic_add_64)
 
+	/*
+	 * NOTE: If atomic_or_8 and atomic_or_8_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_8_nv.
+	 */
 	ENTRY(atomic_or_8)
 	ALTENTRY(atomic_or_8_nv)
 	ALTENTRY(atomic_or_uchar)
@@ -277,6 +354,12 @@
 	SET_SIZE(atomic_or_8_nv)
 	SET_SIZE(atomic_or_8)
 
+	/*
+	 * NOTE: If atomic_or_16 and atomic_or_16_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_16_nv.
+	 */
 	ENTRY(atomic_or_16)
 	ALTENTRY(atomic_or_16_nv)
 	ALTENTRY(atomic_or_ushort)
@@ -307,6 +390,12 @@
 	SET_SIZE(atomic_or_16_nv)
 	SET_SIZE(atomic_or_16)
 
+	/*
+	 * NOTE: If atomic_or_32 and atomic_or_32_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_32_nv.
+	 */
 	ENTRY(atomic_or_32)
 	ALTENTRY(atomic_or_32_nv)
 	ALTENTRY(atomic_or_uint)
@@ -329,6 +418,12 @@
 	SET_SIZE(atomic_or_32_nv)
 	SET_SIZE(atomic_or_32)
 
+	/*
+	 * NOTE: If atomic_or_64 and atomic_or_64_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_64_nv.
+	 */
 	ENTRY(atomic_or_64)
 	ALTENTRY(atomic_or_64_nv)
 	sllx	%o1, 32, %o1		! upper 32 in %o1, lower in %o2
@@ -347,6 +442,12 @@
 	SET_SIZE(atomic_or_64_nv)
 	SET_SIZE(atomic_or_64)
 
+	/*
+	 * NOTE: If atomic_and_8 and atomic_and_8_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_8_nv.
+	 */
 	ENTRY(atomic_and_8)
 	ALTENTRY(atomic_and_8_nv)
 	ALTENTRY(atomic_and_uchar)
@@ -375,6 +476,12 @@
 	SET_SIZE(atomic_and_8_nv)
 	SET_SIZE(atomic_and_8)
 
+	/*
+	 * NOTE: If atomic_and_16 and atomic_and_16_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_16_nv.
+	 */
 	ENTRY(atomic_and_16)
 	ALTENTRY(atomic_and_16_nv)
 	ALTENTRY(atomic_and_ushort)
@@ -405,6 +512,12 @@
 	SET_SIZE(atomic_and_16_nv)
 	SET_SIZE(atomic_and_16)
 
+	/*
+	 * NOTE: If atomic_and_32 and atomic_and_32_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_32_nv.
+	 */
 	ENTRY(atomic_and_32)
 	ALTENTRY(atomic_and_32_nv)
 	ALTENTRY(atomic_and_uint)
@@ -427,6 +540,12 @@
 	SET_SIZE(atomic_and_32_nv)
 	SET_SIZE(atomic_and_32)
 
+	/*
+	 * NOTE: If atomic_and_64 and atomic_and_64_nv are ever
+	 * separated, you need to also edit the libc sparc platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_64_nv.
+	 */
 	ENTRY(atomic_and_64)
 	ALTENTRY(atomic_and_64_nv)
 	sllx	%o1, 32, %o1		! upper 32 in %o1, lower in %o2
--- a/usr/src/common/atomic/sparcv9/atomic.s	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/common/atomic/sparcv9/atomic.s	Tue May 22 11:10:09 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -49,6 +48,12 @@
 #include "../atomic_asm_weak.h"
 #endif
 
+	/*
+	 * NOTE: If atomic_inc_8 and atomic_inc_8_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_8_nv.
+	 */
 	ENTRY(atomic_inc_8)
 	ALTENTRY(atomic_inc_8_nv)
 	ALTENTRY(atomic_inc_uchar)
@@ -60,6 +65,12 @@
 	SET_SIZE(atomic_inc_8_nv)
 	SET_SIZE(atomic_inc_8)
 
+	/*
+	 * NOTE: If atomic_dec_8 and atomic_dec_8_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_8_nv.
+	 */
 	ENTRY(atomic_dec_8)
 	ALTENTRY(atomic_dec_8_nv)
 	ALTENTRY(atomic_dec_uchar)
@@ -71,6 +82,12 @@
 	SET_SIZE(atomic_dec_8_nv)
 	SET_SIZE(atomic_dec_8)
 
+	/*
+	 * NOTE: If atomic_add_8 and atomic_add_8_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_8_nv.
+	 */
 	ENTRY(atomic_add_8)
 	ALTENTRY(atomic_add_8_nv)
 	ALTENTRY(atomic_add_char)
@@ -103,6 +120,12 @@
 	SET_SIZE(atomic_add_8_nv)
 	SET_SIZE(atomic_add_8)
 
+	/*
+	 * NOTE: If atomic_inc_16 and atomic_inc_16_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_16_nv.
+	 */
 	ENTRY(atomic_inc_16)
 	ALTENTRY(atomic_inc_16_nv)
 	ALTENTRY(atomic_inc_ushort)
@@ -114,6 +137,12 @@
 	SET_SIZE(atomic_inc_16_nv)
 	SET_SIZE(atomic_inc_16)
 
+	/*
+	 * NOTE: If atomic_dec_16 and atomic_dec_16_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_16_nv.
+	 */
 	ENTRY(atomic_dec_16)
 	ALTENTRY(atomic_dec_16_nv)
 	ALTENTRY(atomic_dec_ushort)
@@ -125,6 +154,12 @@
 	SET_SIZE(atomic_dec_16_nv)
 	SET_SIZE(atomic_dec_16)
 
+	/*
+	 * NOTE: If atomic_add_16 and atomic_add_16_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_16_nv.
+	 */
 	ENTRY(atomic_add_16)
 	ALTENTRY(atomic_add_16_nv)
 	ALTENTRY(atomic_add_short)
@@ -159,6 +194,12 @@
 	SET_SIZE(atomic_add_16_nv)
 	SET_SIZE(atomic_add_16)
 
+	/*
+	 * NOTE: If atomic_inc_32 and atomic_inc_32_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_32_nv.
+	 */
 	ENTRY(atomic_inc_32)
 	ALTENTRY(atomic_inc_32_nv)
 	ALTENTRY(atomic_inc_uint)
@@ -170,6 +211,12 @@
 	SET_SIZE(atomic_inc_32_nv)
 	SET_SIZE(atomic_inc_32)
 
+	/*
+	 * NOTE: If atomic_dec_32 and atomic_dec_32_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_32_nv.
+	 */
 	ENTRY(atomic_dec_32)
 	ALTENTRY(atomic_dec_32_nv)
 	ALTENTRY(atomic_dec_uint)
@@ -181,6 +228,12 @@
 	SET_SIZE(atomic_dec_32_nv)
 	SET_SIZE(atomic_dec_32)
 
+	/*
+	 * NOTE: If atomic_add_32 and atomic_add_32_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_32_nv.
+	 */
 	ENTRY(atomic_add_32)
 	ALTENTRY(atomic_add_32_nv)
 	ALTENTRY(atomic_add_int)
@@ -200,6 +253,12 @@
 	SET_SIZE(atomic_add_32_nv)
 	SET_SIZE(atomic_add_32)
 
+	/*
+	 * NOTE: If atomic_inc_64 and atomic_inc_64_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_inc_64_nv.
+	 */
 	ENTRY(atomic_inc_64)
 	ALTENTRY(atomic_inc_64_nv)
 	ALTENTRY(atomic_inc_ulong)
@@ -211,6 +270,12 @@
 	SET_SIZE(atomic_inc_64_nv)
 	SET_SIZE(atomic_inc_64)
 
+	/*
+	 * NOTE: If atomic_dec_64 and atomic_dec_64_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_64_nv.
+	 */
 	ENTRY(atomic_dec_64)
 	ALTENTRY(atomic_dec_64_nv)
 	ALTENTRY(atomic_dec_ulong)
@@ -222,6 +287,12 @@
 	SET_SIZE(atomic_dec_64_nv)
 	SET_SIZE(atomic_dec_64)
 
+	/*
+	 * NOTE: If atomic_add_64 and atomic_add_64_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_64_nv.
+	 */
 	ENTRY(atomic_add_64)
 	ALTENTRY(atomic_add_64_nv)
 	ALTENTRY(atomic_add_ptr)
@@ -245,6 +316,12 @@
 	SET_SIZE(atomic_add_64_nv)
 	SET_SIZE(atomic_add_64)
 
+	/*
+	 * NOTE: If atomic_or_8 and atomic_or_8_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_8_nv.
+	 */
 	ENTRY(atomic_or_8)
 	ALTENTRY(atomic_or_8_nv)
 	ALTENTRY(atomic_or_uchar)
@@ -273,6 +350,12 @@
 	SET_SIZE(atomic_or_8_nv)
 	SET_SIZE(atomic_or_8)
 
+	/*
+	 * NOTE: If atomic_or_16 and atomic_or_16_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_16_nv.
+	 */
 	ENTRY(atomic_or_16)
 	ALTENTRY(atomic_or_16_nv)
 	ALTENTRY(atomic_or_ushort)
@@ -303,6 +386,12 @@
 	SET_SIZE(atomic_or_16_nv)
 	SET_SIZE(atomic_or_16)
 
+	/*
+	 * NOTE: If atomic_or_32 and atomic_or_32_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_32_nv.
+	 */
 	ENTRY(atomic_or_32)
 	ALTENTRY(atomic_or_32_nv)
 	ALTENTRY(atomic_or_uint)
@@ -321,6 +410,12 @@
 	SET_SIZE(atomic_or_32_nv)
 	SET_SIZE(atomic_or_32)
 
+	/*
+	 * NOTE: If atomic_or_64 and atomic_or_64_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_64_nv.
+	 */
 	ENTRY(atomic_or_64)
 	ALTENTRY(atomic_or_64_nv)
 	ALTENTRY(atomic_or_ulong)
@@ -339,6 +434,12 @@
 	SET_SIZE(atomic_or_64_nv)
 	SET_SIZE(atomic_or_64)
 
+	/*
+	 * NOTE: If atomic_and_8 and atomic_and_8_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_8_nv.
+	 */
 	ENTRY(atomic_and_8)
 	ALTENTRY(atomic_and_8_nv)
 	ALTENTRY(atomic_and_uchar)
@@ -367,6 +468,12 @@
 	SET_SIZE(atomic_and_8_nv)
 	SET_SIZE(atomic_and_8)
 
+	/*
+	 * NOTE: If atomic_and_16 and atomic_and_16_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_16_nv.
+	 */
 	ENTRY(atomic_and_16)
 	ALTENTRY(atomic_and_16_nv)
 	ALTENTRY(atomic_and_ushort)
@@ -397,6 +504,12 @@
 	SET_SIZE(atomic_and_16_nv)
 	SET_SIZE(atomic_and_16)
 
+	/*
+	 * NOTE: If atomic_and_32 and atomic_and_32_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_32_nv.
+	 */
 	ENTRY(atomic_and_32)
 	ALTENTRY(atomic_and_32_nv)
 	ALTENTRY(atomic_and_uint)
@@ -415,6 +528,12 @@
 	SET_SIZE(atomic_and_32_nv)
 	SET_SIZE(atomic_and_32)
 
+	/*
+	 * NOTE: If atomic_and_64 and atomic_and_64_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_and_64_nv.
+	 */
 	ENTRY(atomic_and_64)
 	ALTENTRY(atomic_and_64_nv)
 	ALTENTRY(atomic_and_ulong)
--- a/usr/src/lib/libbsm/common/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libbsm/common/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -310,5 +310,14 @@
 	setdmapent;
 	setdmapfile;
     local:
+	# These functions are aliased to "int" versions. Let those
+	# go into .SUNW_dynsymsort, and keep these out.
+	adrm_long =	NODYNSORT;
+	adrm_u_long =	NODYNSORT;
+	adrf_long =	NODYNSORT;
+	adrf_u_long =	NODYNSORT;
+	adrm_putlong =	NODYNSORT;
+
+	# Reduce all remaining global symbols to local scope
 	*;
 };
--- a/usr/src/lib/libc/amd64/gen/byteorder.s	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/amd64/gen/byteorder.s	Tue May 22 11:10:09 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -30,6 +29,15 @@
 
 #include "SYS.h"
 
+	/*
+	 * NOTE: htonl/ntohl are identical routines, as are htons/ntohs.
+	 * As such, they could be implemented as a single routine, using
+	 * multiple ALTENTRY/SET_SIZE definitions. We don't do this so
+	 * that they will have unique addresses, allowing DTrace and
+	 * other debuggers to tell them apart. 
+	 */
+
+
 /*
  *	unsigned long htonl( hl )
  *	unsigned long ntohl( hl )
@@ -37,11 +45,15 @@
  *	reverses the byte order of 'uint32_t hl'
  */
 	ENTRY(htonl)
-	ALTENTRY(ntohl)
 	movl	%edi, %eax	/* %eax = hl */
 	bswap	%eax		/* reverses the byte order of %eax */
 	ret			/* return (%eax) */
 	SET_SIZE(htonl)
+
+	ENTRY(ntohl)
+	movl	%edi, %eax	/* %eax = hl */
+	bswap	%eax		/* reverses the byte order of %eax */
+	ret			/* return (%eax) */
 	SET_SIZE(ntohl)
 
 /*
@@ -51,10 +63,15 @@
  *	reverses the byte order in hs.
  */
 	ENTRY(htons)
-	ALTENTRY(ntohs)
 	movl	%edi, %eax	/* %eax = hs */
 	bswap	%eax		/* reverses the byte order of %eax */
 	shrl	$16, %eax	/* moves high 16-bit to low 16-bit */
 	ret			/* return (%eax) */
 	SET_SIZE(htons)
+
+	ENTRY(ntohs)
+	movl	%edi, %eax	/* %eax = hs */
+	bswap	%eax		/* reverses the byte order of %eax */
+	shrl	$16, %eax	/* moves high 16-bit to low 16-bit */
+	ret			/* return (%eax) */
 	SET_SIZE(ntohs)
--- a/usr/src/lib/libc/amd64/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/amd64/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -400,8 +400,8 @@
 	_munlock;
 	munmap;
 	_munmap;
-	_mutex_held;
-	_mutex_lock;
+	_mutex_held = NODYNSORT;
+	_mutex_lock = NODYNSORT;
 	nextafter = FUNCTION FILTER libm.so.2;
 	_nextafter = FUNCTION FILTER libm.so.2;
 	nftw;
@@ -489,7 +489,7 @@
 	_semop;
 	setbuf;
 	setcontext;
-	_setcontext;
+	_setcontext = NODYNSORT;
 	setgid;
 	_setgid;
 	setgrent;
@@ -524,7 +524,7 @@
 	_shmget;
 	_sibuf;
 	sigaction = NODIRECT;
-	_sigaction = NODIRECT;
+	_sigaction = NODIRECT NODYNSORT;
 	sigaddset;
 	_sigaddset;
 	sigaltstack;
@@ -559,7 +559,7 @@
 	sigset;
 	_sigset;
 	sigsetjmp;
-	_sigsetjmp;
+	_sigsetjmp = NODYNSORT;
 	sigsuspend;
 	_sigsuspend;
 	sleep;
@@ -764,4 +764,8 @@
 	__xtoll;
 	__xtoul;
 	__xtoull;
+
+    local:
+	_private_sysi86 = NODYNSORT;
+	___tls_get_addr = NODYNSORT;
 };
--- a/usr/src/lib/libc/i386/gen/byteorder.s	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/i386/gen/byteorder.s	Tue May 22 11:10:09 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -30,17 +29,29 @@
 
 #include "SYS.h"
 
+	/*
+	 * NOTE: htonl/ntohl are identical routines, as are htons/ntohs.
+	 * As such, they could be implemented as a single routine, using
+	 * multiple ALTENTRY/SET_SIZE definitions. We don't do this so
+	 * that they will have unique addresses, allowing DTrace and
+	 * other debuggers to tell them apart. 
+	 */
+
 /	unsigned long htonl( hl )
 /	unsigned long ntohl( hl )
 /	long hl;
 /	reverses the byte order of 'long hl'
 /
 	ENTRY(htonl)
+	movl	4(%esp), %eax	/ %eax = hl
+	bswap	%eax		/ reverses the byte order of %eax
+	ret			/ return (%eax)
+	SET_SIZE(htonl)
+
 	ENTRY(ntohl)
 	movl	4(%esp), %eax	/ %eax = hl
 	bswap	%eax		/ reverses the byte order of %eax
 	ret			/ return (%eax)
-	SET_SIZE(htonl)
 	SET_SIZE(ntohl)
 
 /	unsigned short htons( hs )
@@ -49,10 +60,15 @@
 /	reverses the byte order in hs.
 /
 	ENTRY(htons)
+	movl	4(%esp), %eax	/ %eax = hs
+	bswap	%eax		/ reverses the byte order of %eax
+	shrl	$16, %eax	/ moves high 16-bit to low 16-bit
+	ret			/ return (%eax)
+	SET_SIZE(htons)
+
 	ENTRY(ntohs)
 	movl	4(%esp), %eax	/ %eax = hs
 	bswap	%eax		/ reverses the byte order of %eax
 	shrl	$16, %eax	/ moves high 16-bit to low 16-bit
 	ret			/ return (%eax)
-	SET_SIZE(htons)
 	SET_SIZE(ntohs)
--- a/usr/src/lib/libc/i386/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/i386/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -44,10 +44,29 @@
 	posix_fallocate64;
 };
 
+SUNW_1.22.1 {
+    global:
+	# Note: atomic_[and,dec,inc,or]_64_nv are also defined
+	# by the common mapfile. Here, we add the NODYNSORT attribute
+	# to them. On this platform, they are aliases for the non-_nv
+	# versions. If that is changed, these lines should be removed.
+	atomic_and_64_nv =		NODYNSORT;
+	atomic_dec_64_nv =		NODYNSORT;
+	atomic_inc_64_nv =		NODYNSORT;
+	atomic_or_64_nv =		NODYNSORT;
+} SUNW_1.22;
+
 SUNW_1.22 {
     global:
 	alphasort64;
 	_alphasort64;
+
+	# Note: atomic_add_64_nv is also defined by the common mapfile.
+	# Here, we add the NODYNSORT attribute to it. On this platform,
+	# it is an aliases for atomic_add_64. If that is changed, this
+	# line should be removed.
+	atomic_add_64_nv = 		NODYNSORT;
+
 	dladdr = FUNCTION FILTER /usr/lib/ld.so.1;
 	dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1;
 	dlclose = FUNCTION FILTER /usr/lib/ld.so.1;
@@ -126,7 +145,7 @@
 	setrlimit64;
 	_setrlimit64;
 	s_fcntl;
-	_s_fcntl;
+	_s_fcntl = NODYNSORT;
 	s_ioctl;
 	stat64;
 	_stat64;
@@ -187,8 +206,8 @@
 	_lastbuf;
 	localtime_r;
 	__mul64;
-	_mutex_held;
-	_mutex_lock;
+	_mutex_held = NODYNSORT;
+	_mutex_lock = NODYNSORT;
 	p_online;
 	putchar_unlocked;
 	putc_unlocked;
@@ -208,7 +227,7 @@
 	srand48;
 	strtok_r;
 	_sys_buslist;
-	_syscall;
+	_syscall = NODYNSORT;
 	_sys_cldlist;
 	sys_errlist;
 	_sys_fpelist;
@@ -617,7 +636,7 @@
 	_semop;
 	setbuf;
 	setcontext;
-	_setcontext;
+	_setcontext = NODYNSORT;
 	setgid;
 	_setgid;
 	setgroups;
@@ -645,7 +664,7 @@
 	shmget;
 	_shmget;
 	sigaction = NODIRECT;
-	_sigaction = NODIRECT;
+	_sigaction = NODIRECT NODYNSORT;
 	sigaddset;
 	_sigaddset;
 	sigaltstack;
@@ -680,7 +699,7 @@
 	sigset;
 	_sigset;
 	sigsetjmp;
-	_sigsetjmp;
+	_sigsetjmp = NODYNSORT;
 	sigsuspend;
 	_sigsuspend;
 	sleep;
@@ -867,7 +886,7 @@
 	sysi86;
 	_sysi86;
 	_sys_index;
-	_sys_nerr;
+	_sys_nerr = NODYNSORT;
 	_sys_num_err;
 	___tls_get_addr;
 	__udivdi3;
@@ -902,4 +921,10 @@
 	__xtoll;
 	__xtoul;
 	__xtoull;
+
+    local:
+	__systemcall6 =		NODYNSORT;
+	_private_sysi86 =	NODYNSORT;
+	_seekdir64 =		NODYNSORT;
+	_telldir64 =		NODYNSORT;
 };
--- a/usr/src/lib/libc/port/gen/seekdir.c	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/port/gen/seekdir.c	Tue May 22 11:10:09 2007 -0700
@@ -77,7 +77,12 @@
 
 #else	/* _LP64 */
 
-static void
+/*
+ * Note: Instead of making this function static, we reduce it to local
+ * scope in the mapfile. That allows the linker to prevent it from
+ * appearing in the .SUNW_dynsymsort section.
+ */
+void
 seekdir64(DIR *dirp, off64_t loc)
 {
 	private_DIR	*pdirp = (private_DIR *)(uintptr_t)dirp;
--- a/usr/src/lib/libc/port/gen/telldir.c	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/port/gen/telldir.c	Tue May 22 11:10:09 2007 -0700
@@ -70,7 +70,12 @@
 
 #else
 
-static off64_t
+/*
+ * Note: Instead of making this function static, we reduce it to local
+ * scope in the mapfile. That allows the linker to prevent it from
+ * appearing in the .SUNW_dynsymsort section.
+ */
+off64_t
 telldir64(DIR *dirp)
 {
 	private_DIR	*pdirp = (private_DIR *)(uintptr_t)dirp;
--- a/usr/src/lib/libc/port/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/port/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -114,7 +114,7 @@
 	sigtimedwait;
 	sigwaitinfo;
 	strnlen;
-	thr_keycreate_once;
+	thr_keycreate_once =		NODYNSORT;
 	timer_create;
 	timer_delete;
 	timer_getoverrun;
@@ -136,14 +136,14 @@
     global:
 	atomic_add_8;
 	atomic_add_8_nv;
-	atomic_add_char;
-	atomic_add_char_nv;
-	atomic_add_int;
-	atomic_add_int_nv;
-	atomic_add_ptr;
-	atomic_add_ptr_nv;
-	atomic_add_short;
-	atomic_add_short_nv;
+	atomic_add_char =		NODYNSORT;
+	atomic_add_char_nv =		NODYNSORT;
+	atomic_add_int =		NODYNSORT;
+	atomic_add_int_nv =		NODYNSORT;
+	atomic_add_ptr =		NODYNSORT;
+	atomic_add_ptr_nv =		NODYNSORT;
+	atomic_add_short =		NODYNSORT;
+	atomic_add_short_nv =		NODYNSORT;
 	atomic_and_16;
 	atomic_and_16_nv;
 	atomic_and_32_nv;
@@ -151,23 +151,23 @@
 	atomic_and_64_nv;
 	atomic_and_8;
 	atomic_and_8_nv;
-	atomic_and_uchar;
-	atomic_and_uchar_nv;
-	atomic_and_uint_nv;
-	atomic_and_ulong;
-	atomic_and_ulong_nv;
-	atomic_and_ushort;
-	atomic_and_ushort_nv;
+	atomic_and_uchar =		NODYNSORT;
+	atomic_and_uchar_nv =		NODYNSORT;
+	atomic_and_uint_nv =		NODYNSORT;
+	atomic_and_ulong =		NODYNSORT;
+	atomic_and_ulong_nv =		NODYNSORT;
+	atomic_and_ushort =		NODYNSORT;
+	atomic_and_ushort_nv =		NODYNSORT;
 	atomic_cas_16;
 	atomic_cas_32;
 	atomic_cas_64;
 	atomic_cas_8;
-	atomic_cas_ptr;
-	atomic_cas_uchar;
-	atomic_cas_uint;
-	atomic_cas_ulong;
-	atomic_cas_ushort;
-	atomic_clear_long_excl;
+	atomic_cas_ptr =		NODYNSORT;
+	atomic_cas_uchar =		NODYNSORT;
+	atomic_cas_uint =		NODYNSORT;
+	atomic_cas_ulong =		NODYNSORT;
+	atomic_cas_ushort =		NODYNSORT;
+	atomic_clear_long_excl =	NODYNSORT;
 	atomic_dec_16;
 	atomic_dec_16_nv;
 	atomic_dec_32;
@@ -176,14 +176,14 @@
 	atomic_dec_64_nv;
 	atomic_dec_8;
 	atomic_dec_8_nv;
-	atomic_dec_uchar;
-	atomic_dec_uchar_nv;
-	atomic_dec_uint;
-	atomic_dec_uint_nv;
-	atomic_dec_ulong;
-	atomic_dec_ulong_nv;
-	atomic_dec_ushort;
-	atomic_dec_ushort_nv;
+	atomic_dec_uchar =		NODYNSORT;
+	atomic_dec_uchar_nv =		NODYNSORT;
+	atomic_dec_uint =		NODYNSORT;
+	atomic_dec_uint_nv =		NODYNSORT;
+	atomic_dec_ulong =		NODYNSORT;
+	atomic_dec_ulong_nv =		NODYNSORT;
+	atomic_dec_ushort =		NODYNSORT;
+	atomic_dec_ushort_nv =		NODYNSORT;
 	atomic_inc_16;
 	atomic_inc_16_nv;
 	atomic_inc_32;
@@ -192,14 +192,14 @@
 	atomic_inc_64_nv;
 	atomic_inc_8;
 	atomic_inc_8_nv;
-	atomic_inc_uchar;
-	atomic_inc_uchar_nv;
-	atomic_inc_uint;
-	atomic_inc_uint_nv;
-	atomic_inc_ulong;
-	atomic_inc_ulong_nv;
-	atomic_inc_ushort;
-	atomic_inc_ushort_nv;
+	atomic_inc_uchar =		NODYNSORT;
+	atomic_inc_uchar_nv =		NODYNSORT;
+	atomic_inc_uint =		NODYNSORT;
+	atomic_inc_uint_nv =		NODYNSORT;
+	atomic_inc_ulong =		NODYNSORT;
+	atomic_inc_ulong_nv =		NODYNSORT;
+	atomic_inc_ushort =		NODYNSORT;
+	atomic_inc_ushort_nv =		NODYNSORT;
 	atomic_or_16;
 	atomic_or_16_nv;
 	atomic_or_32_nv;
@@ -207,23 +207,23 @@
 	atomic_or_64_nv;
 	atomic_or_8;
 	atomic_or_8_nv;
-	atomic_or_uchar;
-	atomic_or_uchar_nv;
-	atomic_or_uint_nv;
-	atomic_or_ulong;
-	atomic_or_ulong_nv;
-	atomic_or_ushort;
-	atomic_or_ushort_nv;
-	atomic_set_long_excl;
+	atomic_or_uchar =		NODYNSORT;
+	atomic_or_uchar_nv =		NODYNSORT;
+	atomic_or_uint_nv =		NODYNSORT;
+	atomic_or_ulong =		NODYNSORT;
+	atomic_or_ulong_nv =		NODYNSORT;
+	atomic_or_ushort =		NODYNSORT;
+	atomic_or_ushort_nv =		NODYNSORT;
+	atomic_set_long_excl =		NODYNSORT;
 	atomic_swap_16;
 	atomic_swap_32;
 	atomic_swap_64;
 	atomic_swap_8;
-	atomic_swap_ptr;
-	atomic_swap_uchar;
-	atomic_swap_uint;
-	atomic_swap_ulong;
-	atomic_swap_ushort;
+	atomic_swap_ptr =		NODYNSORT;
+	atomic_swap_uchar =		NODYNSORT;
+	atomic_swap_uint =		NODYNSORT;
+	atomic_swap_ulong =		NODYNSORT;
+	atomic_swap_ushort =		NODYNSORT;
 	membar_consumer;
 	membar_enter;
 	membar_exit;
@@ -240,12 +240,12 @@
 	atomic_add_32_nv;
 	atomic_add_64;
 	atomic_add_64_nv;
-	atomic_add_long;
-	atomic_add_long_nv;
+	atomic_add_long =		NODYNSORT;
+	atomic_add_long_nv =		NODYNSORT;
 	atomic_and_32;
-	atomic_and_uint;
+	atomic_and_uint =		NODYNSORT;
 	atomic_or_32;
-	atomic_or_uint;
+	atomic_or_uint =		NODYNSORT;
 	_Exit;
 	getisax;
 	_getisax;
@@ -387,7 +387,7 @@
 	scandir;
 	_scandir;
 	schedctl_exit;
-	schedctl_init;
+	schedctl_init =			NODYNSORT;
 	schedctl_lookup;
 	sema_reltimedwait;
 	sema_timedwait;
@@ -490,7 +490,7 @@
 	getcpuid;
 	_getcpuid;
 	gethomelgroup;
-	_gethomelgroup;
+	_gethomelgroup =		NODYNSORT;
 	getpagesizes;
 	getrctl;
 	_getrctl;
@@ -846,8 +846,8 @@
 	regex;
 	resolvepath;
 	_resolvepath;
-	rwlock_destroy;
-	_rwlock_destroy;
+	rwlock_destroy =		NODYNSORT;
+	_rwlock_destroy =		NODYNSORT;
 	sema_destroy;
 	_sema_destroy;
 	_setjmp;
@@ -975,7 +975,7 @@
 	setreuid;
 	setstate;
 	srandom;
-	thr_min_stack;
+	thr_min_stack =			NODYNSORT;
 	thr_stksegment;
 	ualarm;
 	usleep;
@@ -986,10 +986,10 @@
 SUNW_0.8 {		# SunOS 5.4 (Solaris 2.4)
     global:
 	addsev;
-	cond_broadcast;
-	cond_destroy;
+	cond_broadcast =		NODYNSORT;
+	cond_destroy =			NODYNSORT;
 	cond_init;
-	cond_signal;
+	cond_signal =			NODYNSORT;
 	cond_timedwait;
 	cond_wait;
 	confstr;
@@ -1001,24 +1001,24 @@
 	iconv_close;
 	iconv_open;
 	lfmt;
-	mutex_destroy;
+	mutex_destroy = 		NODYNSORT;
 	mutex_init;
-	mutex_lock;
-	mutex_trylock;
-	mutex_unlock;
+	mutex_lock =			NODYNSORT;
+	mutex_trylock =			NODYNSORT;
+	mutex_unlock =			NODYNSORT;
 	pfmt;
 	regcomp;
 	regerror;
 	regexec;
 	regfree;
 	rwlock_init;
-	rw_rdlock;
+	rw_rdlock =			NODYNSORT;
 	rw_read_held;
-	rw_tryrdlock;
-	rw_trywrlock;
-	rw_unlock;
+	rw_tryrdlock =			NODYNSORT;
+	rw_trywrlock =			NODYNSORT;
+	rw_unlock =			NODYNSORT;
 	rw_write_held;
-	rw_wrlock;
+	rw_wrlock =			NODYNSORT;
 	sema_held;
 	sema_init;
 	sema_post;
@@ -1030,18 +1030,18 @@
 	strptime;
 	thr_continue;
 	thr_create;
-	thr_exit;
+	thr_exit =			NODYNSORT;
 	thr_getconcurrency;
 	thr_getprio;
 	thr_getspecific;
 	thr_join;
-	thr_keycreate;
-	thr_kill;
-	thr_self;
+	thr_keycreate =			NODYNSORT;
+	thr_kill =			NODYNSORT;
+	thr_self =			NODYNSORT;
 	thr_setconcurrency;
-	thr_setprio;
-	thr_setspecific;
-	thr_sigsetmask;
+	thr_setprio =			NODYNSORT;
+	thr_setspecific =		NODYNSORT;
+	thr_sigsetmask =		NODYNSORT;
 	thr_suspend;
 	thr_yield;
 	vlfmt;
@@ -1096,7 +1096,7 @@
 	fgetspent_r;
 	_filbuf;
 	finite;
-	fork1;
+	fork1 =				NODYNSORT;
 	fpclass;
 	fpgetmask;
 	fpgetsticky;
@@ -1286,108 +1286,108 @@
 	__assert_c99;
 	_assfail;
 	_atoll;
-	_atomic_add_16;
-	_atomic_add_16_nv;
-	_atomic_add_32;
-	_atomic_add_32_nv;
-	_atomic_add_64;
-	_atomic_add_64_nv;
-	_atomic_add_8;
-	_atomic_add_8_nv;
-	_atomic_add_char;
-	_atomic_add_char_nv;
-	_atomic_add_int;
-	_atomic_add_int_nv;
-	_atomic_add_long;
-	_atomic_add_long_nv;
-	_atomic_add_ptr;
-	_atomic_add_ptr_nv;
-	_atomic_add_short;
-	_atomic_add_short_nv;
-	_atomic_and_16;
-	_atomic_and_16_nv;
-	_atomic_and_32;
-	_atomic_and_32_nv;
-	_atomic_and_64;
-	_atomic_and_64_nv;
-	_atomic_and_8;
-	_atomic_and_8_nv;
-	_atomic_and_uchar;
-	_atomic_and_uchar_nv;
-	_atomic_and_uint;
-	_atomic_and_uint_nv;
-	_atomic_and_ulong;
-	_atomic_and_ulong_nv;
-	_atomic_and_ushort;
-	_atomic_and_ushort_nv;
-	_atomic_cas_16;
-	_atomic_cas_32;
-	_atomic_cas_64;
-	_atomic_cas_8;
-	_atomic_cas_ptr;
-	_atomic_cas_uchar;
-	_atomic_cas_uint;
-	_atomic_cas_ulong;
-	_atomic_cas_ushort;
-	_atomic_clear_long_excl;
-	_atomic_dec_16;
-	_atomic_dec_16_nv;
-	_atomic_dec_32;
-	_atomic_dec_32_nv;
-	_atomic_dec_64;
-	_atomic_dec_64_nv;
-	_atomic_dec_8;
-	_atomic_dec_8_nv;
-	_atomic_dec_uchar;
-	_atomic_dec_uchar_nv;
-	_atomic_dec_uint;
-	_atomic_dec_uint_nv;
-	_atomic_dec_ulong;
-	_atomic_dec_ulong_nv;
-	_atomic_dec_ushort;
-	_atomic_dec_ushort_nv;
-	_atomic_inc_16;
-	_atomic_inc_16_nv;
-	_atomic_inc_32;
-	_atomic_inc_32_nv;
-	_atomic_inc_64;
-	_atomic_inc_64_nv;
-	_atomic_inc_8;
-	_atomic_inc_8_nv;
-	_atomic_inc_uchar;
-	_atomic_inc_uchar_nv;
-	_atomic_inc_uint;
-	_atomic_inc_uint_nv;
-	_atomic_inc_ulong;
-	_atomic_inc_ulong_nv;
-	_atomic_inc_ushort;
-	_atomic_inc_ushort_nv;
-	_atomic_or_16;
-	_atomic_or_16_nv;
-	_atomic_or_32;
-	_atomic_or_32_nv;
-	_atomic_or_64;
-	_atomic_or_64_nv;
-	_atomic_or_8;
-	_atomic_or_8_nv;
-	_atomic_or_uchar;
-	_atomic_or_uchar_nv;
-	_atomic_or_uint;
-	_atomic_or_uint_nv;
-	_atomic_or_ulong;
-	_atomic_or_ulong_nv;
-	_atomic_or_ushort;
-	_atomic_or_ushort_nv;
-	_atomic_set_long_excl;
-	_atomic_swap_16;
-	_atomic_swap_32;
-	_atomic_swap_64;
-	_atomic_swap_8;
-	_atomic_swap_ptr;
-	_atomic_swap_uchar;
-	_atomic_swap_uint;
-	_atomic_swap_ulong;
-	_atomic_swap_ushort;
+	_atomic_add_16 =		NODYNSORT;
+	_atomic_add_16_nv =		NODYNSORT;
+	_atomic_add_32 =		NODYNSORT;
+	_atomic_add_32_nv =		NODYNSORT;
+	_atomic_add_64 =		NODYNSORT;
+	_atomic_add_64_nv =		NODYNSORT;
+	_atomic_add_8 =			NODYNSORT;
+	_atomic_add_8_nv =		NODYNSORT;
+	_atomic_add_char =		NODYNSORT;
+	_atomic_add_char_nv =		NODYNSORT;
+	_atomic_add_int =		NODYNSORT;
+	_atomic_add_int_nv =		NODYNSORT;
+	_atomic_add_long =		NODYNSORT;
+	_atomic_add_long_nv =		NODYNSORT;
+	_atomic_add_ptr =		NODYNSORT;
+	_atomic_add_ptr_nv =		NODYNSORT;
+	_atomic_add_short =		NODYNSORT;
+	_atomic_add_short_nv =		NODYNSORT;
+	_atomic_and_16 =		NODYNSORT;
+	_atomic_and_16_nv =		NODYNSORT;
+	_atomic_and_32 =		NODYNSORT;
+	_atomic_and_32_nv =		NODYNSORT;
+	_atomic_and_64 =		NODYNSORT;
+	_atomic_and_64_nv =		NODYNSORT;
+	_atomic_and_8 =			NODYNSORT;
+	_atomic_and_8_nv =		NODYNSORT;
+	_atomic_and_uchar =		NODYNSORT;
+	_atomic_and_uchar_nv =		NODYNSORT;
+	_atomic_and_uint =		NODYNSORT;
+	_atomic_and_uint_nv =		NODYNSORT;
+	_atomic_and_ulong =		NODYNSORT;
+	_atomic_and_ulong_nv =		NODYNSORT;
+	_atomic_and_ushort =		NODYNSORT;
+	_atomic_and_ushort_nv =		NODYNSORT;
+	_atomic_cas_16 =		NODYNSORT;
+	_atomic_cas_32 =		NODYNSORT;
+	_atomic_cas_64 =		NODYNSORT;
+	_atomic_cas_8 =			NODYNSORT;
+	_atomic_cas_ptr =		NODYNSORT;
+	_atomic_cas_uchar =		NODYNSORT;
+	_atomic_cas_uint =		NODYNSORT;
+	_atomic_cas_ulong =		NODYNSORT;
+	_atomic_cas_ushort =		NODYNSORT;
+	_atomic_clear_long_excl = 	NODYNSORT;
+	_atomic_dec_16 =		NODYNSORT;
+	_atomic_dec_16_nv =		NODYNSORT;
+	_atomic_dec_32 =		NODYNSORT;
+	_atomic_dec_32_nv =		NODYNSORT;
+	_atomic_dec_64 =		NODYNSORT;
+	_atomic_dec_64_nv =		NODYNSORT;
+	_atomic_dec_8 =			NODYNSORT;
+	_atomic_dec_8_nv =		NODYNSORT;
+	_atomic_dec_uchar =		NODYNSORT;
+	_atomic_dec_uchar_nv =		NODYNSORT;
+	_atomic_dec_uint =		NODYNSORT;
+	_atomic_dec_uint_nv =		NODYNSORT;
+	_atomic_dec_ulong =		NODYNSORT;
+	_atomic_dec_ulong_nv =		NODYNSORT;
+	_atomic_dec_ushort =		NODYNSORT;
+	_atomic_dec_ushort_nv =		NODYNSORT;
+	_atomic_inc_16 =		NODYNSORT;
+	_atomic_inc_16_nv =		NODYNSORT;
+	_atomic_inc_32 =		NODYNSORT;
+	_atomic_inc_32_nv =		NODYNSORT;
+	_atomic_inc_64 =		NODYNSORT;
+	_atomic_inc_64_nv =		NODYNSORT;
+	_atomic_inc_8 =			NODYNSORT;
+	_atomic_inc_8_nv =		NODYNSORT;
+	_atomic_inc_uchar =		NODYNSORT;
+	_atomic_inc_uchar_nv =		NODYNSORT;
+	_atomic_inc_uint =		NODYNSORT;
+	_atomic_inc_uint_nv =		NODYNSORT;
+	_atomic_inc_ulong =		NODYNSORT;
+	_atomic_inc_ulong_nv =		NODYNSORT;
+	_atomic_inc_ushort =		NODYNSORT;
+	_atomic_inc_ushort_nv =		NODYNSORT;
+	_atomic_or_16 =			NODYNSORT;
+	_atomic_or_16_nv =		NODYNSORT;
+	_atomic_or_32 =			NODYNSORT;
+	_atomic_or_32_nv =		NODYNSORT;
+	_atomic_or_64 =			NODYNSORT;
+	_atomic_or_64_nv =		NODYNSORT;
+	_atomic_or_8 =			NODYNSORT;
+	_atomic_or_8_nv =		NODYNSORT;
+	_atomic_or_uchar =		NODYNSORT;
+	_atomic_or_uchar_nv =		NODYNSORT;
+	_atomic_or_uint =		NODYNSORT;
+	_atomic_or_uint_nv =		NODYNSORT;
+	_atomic_or_ulong =		NODYNSORT;
+	_atomic_or_ulong_nv =		NODYNSORT;
+	_atomic_or_ushort =		NODYNSORT;
+	_atomic_or_ushort_nv =		NODYNSORT;
+	_atomic_set_long_excl =		NODYNSORT;
+	_atomic_swap_16 =		NODYNSORT;
+	_atomic_swap_32 =		NODYNSORT;
+	_atomic_swap_64 =		NODYNSORT;
+	_atomic_swap_8 =		NODYNSORT;
+	_atomic_swap_ptr =		NODYNSORT;
+	_atomic_swap_uchar =		NODYNSORT;
+	_atomic_swap_uint =		NODYNSORT;
+	_atomic_swap_ulong =		NODYNSORT;
+	_atomic_swap_ushort =		NODYNSORT;
 	_autofssys;
 	_brk;
 	__btowc_dense;
@@ -1406,11 +1406,11 @@
 	_clock_settime;
 	_closelog;
 	__collate_init;
-	_cond_broadcast;
-	_cond_destroy;
+	_cond_broadcast =		NODYNSORT;
+	_cond_destroy =			NODYNSORT;
 	_cond_init;
 	_cond_reltimedwait;
-	_cond_signal;
+	_cond_signal =			NODYNSORT;
 	_cond_timedwait;
 	_cond_wait;
 	core_get_default_content;
@@ -1465,18 +1465,18 @@
 	_defread;
 	_delete;
 	_dgettext;
-	_door_bind;
-	_door_call;
+	_door_bind = 			NODYNSORT;
+	_door_call = 			NODYNSORT;
 	_door_create;
 	_door_cred;
-	_door_getparam;
-	_door_info;
+	_door_getparam = 		NODYNSORT;
+	_door_info = NODYNSORT;
 	_door_return;
-	_door_revoke;
+	_door_revoke = 			NODYNSORT;
 	_door_server_create;
-	_door_setparam;
+	_door_setparam = 		NODYNSORT;
 	_door_ucred;
-	_door_unbind;
+	_door_unbind = 			NODYNSORT;
 	_doprnt;
 	_doscan;
 	_double_to_decimal;
@@ -1523,10 +1523,10 @@
 	__fnmatch_C;
 	__fnmatch_sb;
 	__fnmatch_std;
-	_fork1;
+	_fork1 =			NODYNSORT;
 	_forkall;
-	_forkallx;
-	_forkx;
+	_forkallx =			NODYNSORT;
+	_forkx =			NODYNSORT;
 	_fpclass;
 	_fpgetmask;
 	_fpgetround;
@@ -1627,7 +1627,7 @@
 	__lc_time;
 	_ldivide;
 	_lexp10;
-	_lgrp_home_fast;
+	_lgrp_home_fast =		NODYNSORT;
 	_lgrpsys;
 	__libc_threaded;
 	_lib_version = NODIRECT;
@@ -1703,9 +1703,9 @@
 	__mbtowc_sb;
 	mcfiller;
 	_membar_consumer;
-	_membar_enter;
-	_membar_exit;
-	_membar_producer;
+	_membar_enter =			NODYNSORT;
+	_membar_exit =			NODYNSORT;
+	_membar_producer =		NODYNSORT;
 	__messages_init;
 	_mincore;
 	_mkarglst;
@@ -1721,16 +1721,16 @@
 	_msgctl64;
 	__multi_innetgr;
 	_munlockall;
-	_mutex_destroy;
+	_mutex_destroy =		NODYNSORT;
 	__mutex_destroy;
 	mutex_held;
-	__mutex_held;
-	_mutex_init;
+	__mutex_held =			NODYNSORT;
+	_mutex_init =			NODYNSORT;
 	__mutex_init;
 	__mutex_lock;
-	_mutex_trylock;
+	_mutex_trylock =		NODYNSORT;
 	__mutex_trylock;
-	_mutex_unlock;
+	_mutex_unlock =			NODYNSORT;
 	__mutex_unlock;
 	_nanosleep;
 	__nan_read;
@@ -1817,7 +1817,7 @@
 	pset_assign_forced;
 	_psiginfo;
 	_psignal;
-	_pthread_atfork;
+	_pthread_atfork =		NODYNSORT;
 	_pthread_attr_destroy;
 	_pthread_attr_getdetachstate;
 	_pthread_attr_getguardsize;
@@ -1852,25 +1852,25 @@
 	_pthread_condattr_init;
 	_pthread_condattr_setclock;
 	_pthread_condattr_setpshared;
-	_pthread_cond_broadcast;
-	_pthread_cond_destroy;
+	_pthread_cond_broadcast =	NODYNSORT;
+	_pthread_cond_destroy =		NODYNSORT;
 	_pthread_cond_init;
 	_pthread_cond_reltimedwait_np;
-	_pthread_cond_signal;
+	_pthread_cond_signal =		NODYNSORT;
 	_pthread_cond_timedwait;
 	_pthread_cond_wait;
 	_pthread_create;
-	_pthread_detach;
+	_pthread_detach =		NODYNSORT;
 	_pthread_equal;
-	_pthread_exit;
+	_pthread_exit =			NODYNSORT;
 	_pthread_getconcurrency;
 	_pthread_getschedparam;
 	_pthread_getspecific;
 	_pthread_join;
-	_pthread_key_create;
-	_pthread_key_create_once_np;
-	_pthread_key_delete;
-	_pthread_kill;
+	_pthread_key_create =		NODYNSORT;
+	_pthread_key_create_once_np =	NODYNSORT;
+	_pthread_key_delete =		NODYNSORT;
+	_pthread_kill =			NODYNSORT;
 	__pthread_min_stack;
 	_pthread_mutexattr_destroy;
 	_pthread_mutexattr_getprioceiling;
@@ -1885,40 +1885,40 @@
 	_pthread_mutexattr_setrobust_np;
 	_pthread_mutexattr_settype;
 	_pthread_mutex_consistent_np;
-	_pthread_mutex_destroy;
+	_pthread_mutex_destroy =	NODYNSORT;
 	_pthread_mutex_getprioceiling;
 	_pthread_mutex_init;
-	_pthread_mutex_lock;
+	_pthread_mutex_lock =		NODYNSORT;
 	_pthread_mutex_reltimedlock_np;
 	_pthread_mutex_setprioceiling;
 	_pthread_mutex_timedlock;
-	_pthread_mutex_trylock;
-	_pthread_mutex_unlock;
+	_pthread_mutex_trylock =	NODYNSORT;
+	_pthread_mutex_unlock =		NODYNSORT;
 	_pthread_once;
 	_pthread_rwlockattr_destroy;
 	_pthread_rwlockattr_getpshared;
 	_pthread_rwlockattr_init;
 	_pthread_rwlockattr_setpshared;
-	_pthread_rwlock_destroy;
-	_pthread_rwlock_init;
-	_pthread_rwlock_rdlock;
+	_pthread_rwlock_destroy =	NODYNSORT;
+	_pthread_rwlock_init =		NODYNSORT;
+	_pthread_rwlock_rdlock =	NODYNSORT;
 	_pthread_rwlock_reltimedrdlock_np;
 	_pthread_rwlock_reltimedwrlock_np;
 	_pthread_rwlock_timedrdlock;
 	_pthread_rwlock_timedwrlock;
-	_pthread_rwlock_tryrdlock;
-	_pthread_rwlock_trywrlock;
-	_pthread_rwlock_unlock;
-	_pthread_rwlock_wrlock;
-	_pthread_self;
+	_pthread_rwlock_tryrdlock =	NODYNSORT;
+	_pthread_rwlock_trywrlock =	NODYNSORT;
+	_pthread_rwlock_unlock =	NODYNSORT;
+	_pthread_rwlock_wrlock =	NODYNSORT;
+	_pthread_self =			NODYNSORT;
 	_pthread_setcancelstate;
 	_pthread_setcanceltype;
 	_pthread_setcleanupinit;
 	_pthread_setconcurrency;
 	_pthread_setschedparam;
-	_pthread_setschedprio;
-	_pthread_setspecific;
-	_pthread_sigmask;
+	_pthread_setschedprio =		NODYNSORT;
+	_pthread_setspecific =		NODYNSORT;
+	_pthread_sigmask =		NODYNSORT;
 	_pthread_spin_destroy;
 	_pthread_spin_init;
 	_pthread_spin_lock;
@@ -1958,17 +1958,17 @@
 	_resume;
 	_resume_ret;
 	_rpcsys;
-	_rwlock_init;
-	_rw_rdlock;
-	_rw_tryrdlock;
-	_rw_trywrlock;
-	_rw_unlock;
-	_rw_wrlock;
+	_rwlock_init =			NODYNSORT;
+	_rw_rdlock =			NODYNSORT;
+	_rw_tryrdlock =			NODYNSORT;
+	_rw_trywrlock =			NODYNSORT;
+	_rw_unlock =			NODYNSORT;
+	_rw_wrlock =			NODYNSORT;
 	_sbrk_grow_aligned;
 	_sbrk_unlocked;
 	_schedctl_exit;
 	_schedctl_init;
-	_schedctl_lookup;
+	_schedctl_lookup =		NODYNSORT;
 	scrwidth;
 	_seconvert;
 	_seed48;
@@ -2089,7 +2089,7 @@
 	_thr_create;
 	_thr_detach;
 	__threaded;
-	_thr_exit;
+	_thr_exit =			NODYNSORT;
 	_thr_getconcurrency;
 	_thr_get_inf_read;
 	_thr_get_nan_read;
@@ -2098,23 +2098,23 @@
 	thr_getstate;
 	_thr_getstate;
 	_thr_join;
-	_thr_keycreate;
-	_thr_keycreate_once;
+	_thr_keycreate =		NODYNSORT;
+	_thr_keycreate_once =		NODYNSORT;
 	_thr_key_delete;
-	_thr_kill;
+	_thr_kill =			NODYNSORT;
 	_thr_main;
-	_thr_min_stack;
+	_thr_min_stack =		NODYNSORT;
 	thr_mutators_barrier;
 	_thr_mutators_barrier;
 	thr_probe_getfunc_addr;
 	thr_probe_setup;
 	_thr_schedctl;
-	_thr_self;
+	_thr_self =			NODYNSORT;
 	_thr_setconcurrency;
 	thr_setmutator;
 	_thr_setmutator;
-	_thr_setprio;
-	_thr_setspecific;
+	_thr_setprio =			NODYNSORT;
+	_thr_setspecific =		NODYNSORT;
 	thr_setstate;
 	_thr_setstate;
 	thr_sighndlrinfo;
@@ -2251,5 +2251,42 @@
 	zone_shutdown;
 	zone_version;
     local:
+	__imax_lldiv =			NODYNSORT;
+	_private_execve =		NODYNSORT;
+	_private_exit =			NODYNSORT;
+	_private_forkallx =		NODYNSORT;
+	_private_forkx =		NODYNSORT;
+	_private_geteuid =		NODYNSORT;
+	_private_getcontext =		NODYNSORT;
+	_private_getgid =		NODYNSORT;
+	_private_getpid =		NODYNSORT;
+	_private_getrlimit =		NODYNSORT;
+	_private_getuid =		NODYNSORT;
+	_private_lwp_mutex_lock =	NODYNSORT;
+	_private_lwp_mutex_unlock =	NODYNSORT;
+	_private_mmap =			NODYNSORT;
+	_private_mprotect =		NODYNSORT;
+	_private_munmap =		NODYNSORT;
+	_private_mutex_destroy =	NODYNSORT;
+	_private_mutex_init =		NODYNSORT;
+	_private_mutex_lock =		NODYNSORT;
+	_private_mutex_trylock =	NODYNSORT;
+	_private_mutex_unlock =		NODYNSORT;
+	_private_memcpy =		NODYNSORT;
+	_private_memset =		NODYNSORT;
+	_private_pthread_atfork =	NODYNSORT;
+	_private_setgid =		NODYNSORT;
+	_private_setpgid =		NODYNSORT;
+	_private_setuid =		NODYNSORT;
+	_private_setustack =		NODYNSORT;
+	_private_sigaddset =		NODYNSORT;
+	_private_sigdelset =		NODYNSORT;
+	_private_sigemptyset =		NODYNSORT;
+	_private_sigfillset =		NODYNSORT;
+	_private_sigismember =		NODYNSORT;
+	_private_testcancel =		NODYNSORT;
+	_ti_thr_self  =			NODYNSORT;
+	rw_read_is_held =		NODYNSORT;
+	rw_write_is_held =		NODYNSORT;
 	*;
 };
--- a/usr/src/lib/libc/port/threads/scalls.c	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/port/threads/scalls.c	Tue May 22 11:10:09 2007 -0700
@@ -105,9 +105,14 @@
 	sigon(self);
 }
 
+/*
+ * Note: Instead of making this function static, we reduce it to local
+ * scope in the mapfile. That allows the linker to prevent it from
+ * appearing in the .SUNW_dynsymsort section.
+ */
 #pragma weak forkx = _private_forkx
 #pragma weak _forkx = _private_forkx
-static pid_t
+pid_t
 _private_forkx(int flags)
 {
 	ulwp_t *self = curthread;
@@ -226,7 +231,7 @@
  */
 #pragma weak forkallx = _private_forkallx
 #pragma weak _forkallx = _private_forkallx
-static pid_t
+pid_t
 _private_forkallx(int flags)
 {
 	ulwp_t *self = curthread;
--- a/usr/src/lib/libc/sparc/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/sparc/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -44,10 +44,45 @@
 	posix_fallocate64;
 };
 
+SUNW_1.22.1 {
+    global:
+	# Note: The atomic_OP_WIDTH_nv symbols defined here are also defined
+	# by the common mapfile. Here, we add the NODYNSORT attribute
+	# to them. On this platform, they are aliases for the non-_nv
+	# versions. If that is changed, these lines should be removed.
+	atomic_add_8_nv =		NODYNSORT;
+	atomic_and_8_nv =		NODYNSORT;
+	atomic_and_16_nv =		NODYNSORT;
+	atomic_and_32_nv =		NODYNSORT;
+	atomic_and_64_nv =		NODYNSORT;
+	atomic_dec_8_nv =		NODYNSORT;
+	atomic_dec_16_nv =		NODYNSORT;
+	atomic_dec_32_nv =		NODYNSORT;
+	atomic_dec_64_nv =		NODYNSORT;
+	atomic_inc_8_nv =		NODYNSORT;
+	atomic_inc_16_nv =		NODYNSORT;
+	atomic_inc_32_nv =		NODYNSORT;
+	atomic_inc_64_nv =		NODYNSORT;
+	atomic_or_8_nv =		NODYNSORT;
+	atomic_or_16_nv =		NODYNSORT;
+	atomic_or_32_nv =		NODYNSORT;
+	atomic_or_64_nv =		NODYNSORT;
+} SUNW_1.22;
+
+
 SUNW_1.22 {
     global:
 	alphasort64;
 	_alphasort64;
+
+	# Note: atomic_add_[16,32,64]_nv are also defined by the common
+	# mapfile. Here, we add the NODYNSORT attribute to them. On this
+	# platform, they are aliases for the non-_nv versions. If that is
+	# changed, these lines should be removed.
+	atomic_add_16_nv =		NODYNSORT;
+	atomic_add_32_nv =		NODYNSORT;
+	atomic_add_64_nv =		NODYNSORT;
+
 	dladdr = FUNCTION FILTER /usr/lib/ld.so.1;
 	dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1;
 	dlclose = FUNCTION FILTER /usr/lib/ld.so.1;
@@ -133,7 +168,7 @@
 	setrlimit64;
 	_setrlimit64;
 	s_fcntl;
-	_s_fcntl;
+	_s_fcntl = NODYNSORT;
 	s_ioctl;
 	stat64;
 	_stat64;
@@ -156,8 +191,8 @@
 	file_to_decimal;
 	_flsbuf;
 	_lastbuf;
-	_mutex_held;
-	_mutex_lock;
+	_mutex_held = NODYNSORT;
+	_mutex_lock = NODYNSORT;
 	p_online;
 	_rw_read_held;
 	_rw_write_held;
@@ -245,7 +280,7 @@
 	_sysinfo;
 	ttyname_r;
 	__udiv64;
-	__umul64;
+	__umul64 = NODYNSORT;		# Same address as __mul64
 	__urem64;
 } SYSVABI_1.3;
 
@@ -257,7 +292,8 @@
 	.stret1;
 	.stret2;
 	.stret4;
-	.stret8;
+	# .stret4 and .stret8 are the same thing
+	.stret8 = NODYNSORT;
 	.udiv;
 	.umul;
 	.urem;
@@ -663,7 +699,7 @@
 	_semop;
 	setbuf;
 	setcontext;
-	_setcontext;
+	_setcontext = NODYNSORT;
 	setgid;
 	_setgid;
 	setgroups;
@@ -691,7 +727,7 @@
 	shmget;
 	_shmget;
 	sigaction = NODIRECT;
-	_sigaction = NODIRECT;
+	_sigaction = NODIRECT NODYNSORT;
 	sigaddset;
 	_sigaddset;
 	sigaltstack;
@@ -726,7 +762,7 @@
 	sigset;
 	_sigset;
 	sigsetjmp;
-	_sigsetjmp;
+	_sigsetjmp = NODYNSORT;
 	sigsuspend;
 	_sigsuspend;
 	sleep;
@@ -923,7 +959,7 @@
 	_sys_errlist;
 	_sys_errs;
 	_sys_index;
-	_sys_nerr;
+	_sys_nerr = NODYNSORT;
 	_sys_num_err;
 	_syssun;
 	__ucmpdi2;
@@ -948,4 +984,10 @@
 	_wscanf_c89;
 	_xregs_clrptr;
 	__yday_to_month;
+
+    local:
+	__cerror =		NODYNSORT;
+	__cerror64 =		NODYNSORT;
+	_seekdir64 =		NODYNSORT;
+	_telldir64 =		NODYNSORT;
 };
--- a/usr/src/lib/libc/sparcv9/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc/sparcv9/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -25,8 +25,42 @@
 # ident	"%Z%%M%	%I%	%E% SMI"
 #
 
+SUNW_1.22.1 {
+    global:
+	# Note: The atomic_OP_WIDTH_nv symbols defined here are also defined
+	# by the common mapfile. Here, we add the NODYNSORT attribute
+	# to them. On this platform, they are aliases for the non-_nv
+	# versions. If that is changed, these lines should be removed.
+	atomic_add_8_nv =		NODYNSORT;
+	atomic_and_8_nv =		NODYNSORT;
+	atomic_and_16_nv =		NODYNSORT;
+	atomic_and_32_nv =		NODYNSORT;
+	atomic_and_64_nv =		NODYNSORT;
+	atomic_dec_8_nv =		NODYNSORT;
+	atomic_dec_16_nv =		NODYNSORT;
+	atomic_dec_32_nv =		NODYNSORT;
+	atomic_dec_64_nv =		NODYNSORT;
+	atomic_inc_8_nv =		NODYNSORT;
+	atomic_inc_16_nv =		NODYNSORT;
+	atomic_inc_32_nv =		NODYNSORT;
+	atomic_inc_64_nv =		NODYNSORT;
+	atomic_or_8_nv =		NODYNSORT;
+	atomic_or_16_nv =		NODYNSORT;
+	atomic_or_32_nv =		NODYNSORT;
+	atomic_or_64_nv =		NODYNSORT;
+} SUNW_1.22;
+
+
 SUNW_1.22 {
     global:
+	# Note: atomic_add_[16,32,64]_nv are also defined by the common
+	# mapfile. Here, we add the NODYNSORT attribute to them. On this
+	# platform, they are aliases for the non-_nv versions. If that is
+	# changed, these lines should be removed.
+	atomic_add_16_nv =		NODYNSORT;
+	atomic_add_32_nv =		NODYNSORT;
+	atomic_add_64_nv =		NODYNSORT;
+
 	dladdr = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
 	dladdr1 = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
 	dlclose = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
@@ -62,11 +96,14 @@
 	_addseverity;
 	alarm;
 	_alarm;
-	__align_cpy_1;
+	# __align_cpy_1 is an alias for memcpy. Filter it out of
+	# the .SUNW_dynsymsort section
+	__align_cpy_1 = NODYNSORT;
 	__align_cpy_16;
 	__align_cpy_2;
 	__align_cpy_4;
-	__align_cpy_8;
+	# __align_cpy_8 is same as __align_cpy_16
+	__align_cpy_8 = NODYNSORT;
 	_altzone;
 	asctime;
 	asctime_r;
@@ -399,8 +436,8 @@
 	_munlock;
 	munmap;
 	_munmap;
-	_mutex_held;
-	_mutex_lock;
+	_mutex_held = NODYNSORT;
+	_mutex_lock = NODYNSORT;
 	nextafter = FUNCTION FILTER libm.so.2;
 	_nextafter = FUNCTION FILTER libm.so.2;
 	nftw;
@@ -515,7 +552,7 @@
 	_semop;
 	setbuf;
 	setcontext;
-	_setcontext;
+	_setcontext = NODYNSORT;
 	setgid;
 	_setgid;
 	setgrent;
@@ -550,7 +587,7 @@
 	_shmget;
 	_sibuf;
 	sigaction = NODIRECT;
-	_sigaction = NODIRECT;
+	_sigaction = NODIRECT NODYNSORT;
 	sigaddset;
 	_sigaddset;
 	sigaltstack;
@@ -585,7 +622,7 @@
 	sigset;
 	_sigset;
 	sigsetjmp;
-	_sigsetjmp;
+	_sigsetjmp = NODYNSORT;
 	sigsuspend;
 	_sigsuspend;
 	sleep;
@@ -773,4 +810,7 @@
 	_syssun;
 	_xregs_clrptr;
 	__yday_to_month;
+
+    local:
+	__cerror =		NODYNSORT;
 };
--- a/usr/src/lib/libc_psr/sun4u/Makefile.com	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libc_psr/sun4u/Makefile.com	Tue May 22 11:10:09 2007 -0700
@@ -50,7 +50,8 @@
 ASDEFS		= -D__STDC__ -D_ASM $(CPPFLAGS)
 ASFLAGS		= -P $(ASDEFS)
 
-MAPFILES	= ../../sun4u/mapfile-vers $(MAPFILE.FLT)
+MAPFILES	= ../../sun4u/mapfile-vers ../../sun4u/mapfile-memcpy \
+			$(MAPFILE.FLT)
 
 #
 # Used when building links in /platform/$(PLATFORM)/lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc_psr/sun4u/mapfile-memcpy	Tue May 22 11:10:09 2007 -0700
@@ -0,0 +1,37 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# ident	"%Z%%M%	%I%	%E% SMI"
+#
+
+# This mapfile is used along with mapfile-vers for the sun4u
+# libc_psr. Some of the other versions of sun4u libc_psr also use
+# mapfile-vers, but the contents of this file do not apply to them.
+
+SUNWprivate_1.1 {
+    local:
+	# __align_cpy_1 is an alias for memcpy. Filter it out of
+	# the .SUNW_dynsymsort section.
+	__align_cpy_1 = NODYNSORT;
+};
--- a/usr/src/lib/libmd/common/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libmd/common/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -19,12 +19,25 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
 #
 
+# Note:
+#
+#	SHA256Update, SHA384Update, and SHA512Update are all
+#	weak aliases for SHA2Update.
+#
+#	SHA256Final, SHA384Final, and SHA512Final are all
+#	weak aliases for SHA2Final
+#
+# We use NODYNSORT to keep the weak aliases out of the .SUNW_dymsymsort
+# ELF section. As a result, ld will put the two main symbols in.
+#
+
+
 SUNW_1.1 {
     global:
 	MD4Final;
@@ -37,18 +50,18 @@
 	SHA1Final;
 	SHA1Init;
 	SHA1Update;
-	SHA256Final;
+	SHA256Final =	NODYNSORT;
 	SHA256Init;
-	SHA256Update;
+	SHA256Update =	NODYNSORT;
 	SHA2Final;
 	SHA2Init;
 	SHA2Update;
-	SHA384Final;
+	SHA384Final =	NODYNSORT;
 	SHA384Init;
-	SHA384Update;
-	SHA512Final;
+	SHA384Update =	NODYNSORT;
+	SHA512Final =	NODYNSORT;
 	SHA512Init;
-	SHA512Update;
+	SHA512Update =	NODYNSORT;
     local:
 	*;
 };
--- a/usr/src/lib/libproc/common/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libproc/common/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -243,15 +243,15 @@
 	ps_pbrandname;
 	ps_pcontinue;
 	ps_pdmodel;
-	ps_pdread;
-	ps_pdwrite;
+	ps_pdread = NODYNSORT;		# Alias of ps_pread
+	ps_pdwrite = NODYNSORT;		# Alias of ps_pwrite
 	ps_pglobal_lookup;
 	ps_pglobal_sym;
 	ps_plog;
 	ps_pread;
 	ps_pstop;
-	ps_ptread;
-	ps_ptwrite;
+	ps_ptread = NODYNSORT;		# Alias of ps_pread
+	ps_ptwrite = NODYNSORT;		# Alias of ps_pwrite
 	ps_pwrite;
 	Pstack_iter;
 	Pstate;
--- a/usr/src/lib/libsys/sparc/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libsys/sparc/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -1,13 +1,12 @@
 #
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # CDDL HEADER START
 #
 # The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
 #
 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 # or http://www.opensolaris.org/os/licensing.
@@ -304,7 +303,7 @@
 	_mkdir;
 	_mknod;
 	_mlock;
-	_mmap;
+	_mmap = NODYNSORT;
 	_mount;
 	_mprotect;
 	_msgctl;
--- a/usr/src/lib/libtnfctl/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libtnfctl/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -61,5 +61,12 @@
 	_tnfctl_externally_traced_pid;
 	_tnfctl_internal_tracing_flag;
     local:
+	# dlclose/_dlclose and dlopen/_dlopen are aliases of each other
+	# Prevent the underscore version from going into the SUNW_dynsymsort
+	# section.
+	_dlclose = NODYNSORT;
+	_dlopen =NODYNSORT;
+
+	# Redunce all remaining globals to local scope
 	*;
 };
--- a/usr/src/lib/libtnfprobe/probe_cntl.c	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/libtnfprobe/probe_cntl.c	Tue May 22 11:10:09 2007 -0700
@@ -473,9 +473,13 @@
  * interpose function is required for x86;  if the 512 byte 'slop skip'
  * is ever removed from the i386 door_return, then it will also need
  * interpose function intervention.
+ *
+ * Note: Instead of making this function static, we reduce it to local
+ * scope in the mapfile. That allows the linker to prevent it from
+ * appearing in the .SUNW_dynsymsort section.
  */
 #pragma weak thr_stksegment = _tnf_thr_stksegment
-static int
+int
 _tnf_thr_stksegment(stack_t *s)
 {
 	static tnf_thr_stksegment_func_t real_thr_stksegment = NULL;
--- a/usr/src/lib/ncad_addr/amd64/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/ncad_addr/amd64/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -27,5 +27,8 @@
 
 SUNW_0.7 {
     global:
-	bind;
+	# Bind is intended to interpose on the real system call. However,
+	# we want debuggers to see its real name (nca_bind), so use NODYNSORT
+	# to prevent "bind" from going into the ELF .SUNW_dynsymsort section
+	bind = NODYNSORT;
 };
--- a/usr/src/lib/ncad_addr/i386/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/ncad_addr/i386/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -27,5 +27,8 @@
 
 SUNW_0.7 {
     global:
-	bind;
+	# Bind is intended to interpose on the real system call. However,
+	# we want debuggers to see its real name (nca_bind), so use NODYNSORT
+	# to prevent "bind" from going into the ELF .SUNW_dynsymsort section
+	bind = NODYNSORT;
 };
--- a/usr/src/lib/ncad_addr/sparc/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/ncad_addr/sparc/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -32,5 +32,8 @@
 
 SISCD_2.3 {
     global:
-	bind;
+	# Bind is intended to interpose on the real system call. However,
+	# we want debuggers to see its real name (nca_bind), so use NODYNSORT
+	# to prevent "bind" from going into the ELF .SUNW_dynsymsort section
+	bind = NODYNSORT;
 };
--- a/usr/src/lib/ncad_addr/sparcv9/mapfile-vers	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/ncad_addr/sparcv9/mapfile-vers	Tue May 22 11:10:09 2007 -0700
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -27,5 +27,8 @@
 
 SUNW_0.7 {
     global:
-	bind;
+	# Bind is intended to interpose on the real system call. However,
+	# we want debuggers to see its real name (nca_bind), so use NODYNSORT
+	# to prevent "bind" from going into the ELF .SUNW_dynsymsort section
+	bind = NODYNSORT;
 };
--- a/usr/src/lib/print/libpapi-common/common/mapfile	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/lib/print/libpapi-common/common/mapfile	Tue May 22 11:10:09 2007 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -64,58 +64,58 @@
         papiAttributeListFree;
 
 	# PAPI Service Calls
-        papiServiceCreate;
-        papiServiceDestroy;
-        papiServiceSetUserName;
-        papiServiceSetPassword;
-        papiServiceSetEncryption;
-        papiServiceSetAuthCB;
-        papiServiceSetAppData;
-        papiServiceGetUserName;
-        papiServiceGetPassword;
+        papiServiceCreate =		NODYNSORT;
+        papiServiceDestroy =		NODYNSORT;
+        papiServiceSetUserName =	NODYNSORT;
+        papiServiceSetPassword =	NODYNSORT;
+        papiServiceSetEncryption =	NODYNSORT;
+        papiServiceSetAuthCB =		NODYNSORT;
+        papiServiceSetAppData =		NODYNSORT;
+        papiServiceGetUserName =	NODYNSORT;
+        papiServiceGetPassword =	NODYNSORT;
         papiServiceGetEncryption;
-        papiServiceGetAppData;
-        papiServiceGetServiceName;
-        papiServiceGetAttributeList;
-        papiServiceGetStatusMessage;
+        papiServiceGetAppData =		NODYNSORT;
+        papiServiceGetServiceName =	NODYNSORT;
+        papiServiceGetAttributeList =	NODYNSORT;
+        papiServiceGetStatusMessage =	NODYNSORT;
 
 	# PAPI Printer Calls
-        papiPrintersList;
-        papiPrinterQuery;
-        papiPrinterAdd;
-        papiPrinterModify;
-        papiPrinterRemove;
-        papiPrinterDisable;
-        papiPrinterEnable;
-        papiPrinterPause;
-        papiPrinterResume;
-        papiPrinterPurgeJobs;
-        papiPrinterListJobs;
-        papiPrinterGetAttributeList;
-        papiPrinterFree;
-        papiPrinterListFree;
+        papiPrintersList =		NODYNSORT;
+        papiPrinterQuery =		NODYNSORT;
+        papiPrinterAdd =		NODYNSORT;
+        papiPrinterModify =		NODYNSORT;
+        papiPrinterRemove =		NODYNSORT;
+        papiPrinterDisable =		NODYNSORT;
+        papiPrinterEnable =		NODYNSORT;
+        papiPrinterPause =		NODYNSORT;
+        papiPrinterResume =		NODYNSORT;
+        papiPrinterPurgeJobs =		NODYNSORT;
+        papiPrinterListJobs =		NODYNSORT;
+        papiPrinterGetAttributeList =	NODYNSORT;
+        papiPrinterFree =		NODYNSORT;
+        papiPrinterListFree =		NODYNSORT;
 
 	# PAPI Job Calls
-        papiJobSubmit;
-        papiJobSubmitByReference;
-        papiJobValidate;
-        papiJobStreamOpen;
-        papiJobStreamWrite;
-        papiJobStreamClose;
-        papiJobQuery;
-        papiJobModify;
-        papiJobMove;
-        papiJobCancel;
-        papiJobHold;
-        papiJobRelease;
-        papiJobRestart;
-        papiJobPromote;
-        papiJobGetAttributeList;
-        papiJobGetPrinterName;
+        papiJobSubmit =			NODYNSORT;
+        papiJobSubmitByReference =	NODYNSORT;
+        papiJobValidate =		NODYNSORT;
+        papiJobStreamOpen =		NODYNSORT;
+        papiJobStreamWrite =		NODYNSORT;
+        papiJobStreamClose =		NODYNSORT;
+        papiJobQuery =			NODYNSORT;
+        papiJobModify =			NODYNSORT;
+        papiJobMove =			NODYNSORT;
+        papiJobCancel =			NODYNSORT;
+        papiJobHold =			NODYNSORT;
+        papiJobRelease =		NODYNSORT;
+        papiJobRestart =		NODYNSORT;
+        papiJobPromote =		NODYNSORT;
+        papiJobGetAttributeList =	NODYNSORT;
+        papiJobGetPrinterName =		NODYNSORT;
         papiJobGetId;
-        papiJobGetJobTicket;
-        papiJobFree;
-        papiJobListFree;
+        papiJobGetJobTicket =		NODYNSORT;
+        papiJobFree =			NODYNSORT;
+        papiJobListFree =		NODYNSORT;
 
 	# Misc. PAPI Calls
         papiStatusString;
@@ -125,10 +125,10 @@
 
 SUNWprivate_1.0 { # Misc. semi-private supporting calls
     global:
-        papiServiceSetPeer;
-        papiJobCreate;
-        papiJobStreamAdd;
-        papiJobCommit;
+        papiServiceSetPeer =		NODYNSORT;
+        papiJobCreate =			NODYNSORT;
+        papiJobStreamAdd =		NODYNSORT;
+        papiJobCommit =			NODYNSORT;
 
 	#     URI
         uri_from_string;
@@ -141,7 +141,7 @@
         list_concatenate;
 
 	#	NS
-	getprinterbyname;
+	getprinterbyname =		NODYNSORT;
 
 	#    extra Attribute Calls
         copy_attributes;
--- a/usr/src/tools/scripts/check_rtime.1	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/tools/scripts/check_rtime.1	Tue May 22 11:10:09 2007 -0700
@@ -1,13 +1,12 @@
 .\" ident	"%Z%%M%	%I%	%E% SMI"
-.\" Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+.\" Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 .\" Use is subject to license terms.
 .\"
 .\" CDDL HEADER START
 .\"
 .\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License, Version 1.0 only
-.\" (the "License").  You may not use this file except in compliance
-.\" with the License.
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
 .\"
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 .\" or http://www.opensolaris.org/os/licensing.
@@ -22,7 +21,7 @@
 .\"
 .\" CDDL HEADER END
 .\"
-.TH check_rtime 1 "30 Aug 2005"
+.TH check_rtime 1 "23 Apr 2007"
 .SH NAME
 .I check_rtime
 \- check ELF runtime attributes
@@ -129,8 +128,9 @@
 .I check_rtime
 uses \fBelfdump(1)\fP to look for a concatenated relocation
 section in shared objects, the existence of text relocations,
-whether debugging or symbol table information exists, and whether
-applications have a non-executable stack defined.
+whether debugging or symbol table information exists, whether
+applications have a non-executable stack defined, and for duplicate
+entries in the symbol sorting sections.
 These checks are carried out for the following reasons:
 .TP 4
 \(bu
@@ -228,6 +228,38 @@
 	<no -Mmapfile_noexdata?>
 .RE
 .sp
+.TP
+\(bu
+Solaris ELF files contain symbol sort sections used by DTrace to
+map addresses in memory to the related function or variable symbols. There
+are two such sections, \fI.SUNW_dynsymsort\fP for
+regular symbols, and \fI.SUNW_dyntlssort\fP for thread
+local symbols. To ensure that the best
+names are shown for each
+such address, and that the same name is given across Solaris releases,
+.I check_rtime
+enforces the rule that only one symbol can appear in the sort sections for
+any given address.
+There are two common ways in which multiple symbols 
+or a given address occur in the ON distribution. The first is from
+code written in assembly language. The second is as a 
+result of using \fB#pragma weak\fP in C to create weak symbols. The
+best solution to this
+situation is to modify the code to avoid symbol aliasing. Alternatively,
+the \fBNODYNSORT\fP mapfile attribute can be used to eliminate the unwanted
+symbol.
+.sp
+Duplicate entries in a symbol sort section are
+displayed in one of the following ways, depending on
+whether the section is for regular, or thread local symbols:
+.sp
+.RS 6
+foo: .SUNW_dynsymsort: duplicate ADDRESS: sym1, sym2
+.br
+foo: .SUNW_dyntlssort: duplicate OFFSET: sym1, sym2
+.RE
+
+.sp
 .LP
 .I check_rtime also
 uses \fBelfdump(1)\fP
--- a/usr/src/tools/scripts/check_rtime.pl	Tue May 22 10:56:13 2007 -0700
+++ b/usr/src/tools/scripts/check_rtime.pl	Tue May 22 11:10:09 2007 -0700
@@ -64,7 +64,7 @@
 use vars  qw($SkipStabFiles $SkipNoExStkFiles $SkipCrleConf);
 use vars  qw($UnusedNoise $Prog $Mach $Isalist $Env $Ena64 $Tmpdir $Error);
 use vars  qw($UnusedFiles $UnusedPaths $LddNoU $Crle32 $Crle64 $Conf32 $Conf64);
-use vars  qw($SkipInterps $OldDeps %opt);
+use vars  qw($SkipInterps $SkipSymSort $OldDeps %opt);
 
 use strict;
 
@@ -239,6 +239,25 @@
 	)$
 }x;
 
+# Files for which we skip checking of duplicate addresses in the
+# symbol sort sections. Such exceptions should be rare --- most code will
+# not have duplicate addresses, since it takes assember or a "#pragma weak"
+# to do such aliasing in C. C++ is different: The compiler generates aliases
+# for implementation reasons, and the mangled names used to encode argument
+# and return value types are difficult to handle well in mapfiles.
+# Furthermore, the Sun compiler and gcc use different and incompatible
+# name mangling conventions. Since ON must be buildable by either, we
+# would have to maintain two sets of mapfiles for each such object.
+# C++ use is rare in ON, so this is not worth pursuing.
+#
+$SkipSymSort = qr{ ^.*(?:
+	opt/SUNWdtrt/tst/common/pid/tst.weak2.exe |	# DTrace test
+	lib/amd64/libnsl\.so\.1 |			# C++
+	lib/sparcv9/libnsl\.so\.1 |			# C++
+	lib/sparcv9/libfru\.so\.1			# C++
+	)$
+}x;
+
 use Getopt::Std;
 
 # -----------------------------------------------------------------------------
@@ -441,7 +460,7 @@
 sub ProcFile {
 	my($FullPath, $RelPath, $File, $Secure) = @_;
 	my(@Elf, @Ldd, $Dyn, $Intp, $Dll, $Ttl, $Sym, $Interp, $Stack);
-	my($Sun, $Relsz, $Pltsz, $Uns, $Tex, $Stab, $Strip, $Lddopt);
+	my($Sun, $Relsz, $Pltsz, $Uns, $Tex, $Stab, $Strip, $Lddopt, $SymSort);
 	my($Val, $Header, $SkipLdd, $IsX86, $RWX);
 
 	# Ignore symbolic links.
@@ -746,7 +765,7 @@
 	# Reuse the elfdump(1) data to investigate additional dynamic linking
 	# information.
 
-	$Sun = $Relsz = $Pltsz = $Dyn = $Stab = 0;
+	$Sun = $Relsz = $Pltsz = $Dyn = $Stab = $SymSort = 0;
 	$Tex = $Strip = 1;
 
 	$Header = 'None';
@@ -763,6 +782,10 @@
 			} elsif (($Stab == 0) && ($Line =~ /\.stab/)) {
 				# This object contain .stabs sections
 				$Stab = 1;
+			} elsif (($SymSort == 0) &&
+				 ($Line =~ /\.SUNW_dyn(sym)|(tls)sort/)) {
+				# This object contains a symbol sort section
+				$SymSort = 1;
 			}
 
 			if (($Strip == 1) && ($Line =~ /\.symtab/)) {
@@ -861,6 +884,93 @@
 		OutMsg($Ttl++, $RelPath,
 		    "\tsymbol table should not be stripped\t<remove -s?>");
 	}
+
+	# If there are symbol sort sections in this object, report on
+	# any that have duplicate addresses.
+	ProcSymSort($FullPath, $RelPath, \$Ttl) if $SymSort;
+}
+
+
+## ProcSymSortOutMsg(RefTtl, RelPath, secname, addr, names...)
+#
+# Call OutMsg for a duplicate address error in a symbol sort
+# section
+#
+sub ProcSymSortOutMsg {
+	my($RefTtl, $RelPath, $secname, $addr, @names) = @_;
+
+	OutMsg($$RefTtl++, $RelPath,
+	    "$secname: duplicate $addr: ". join(', ', @names));
+}
+
+
+
+## ProcSymSort(FullPath, RelPath)
+#
+# Examine the symbol sort sections for the given object and report
+# on any duplicate addresses found.  Ideally, mapfile directives
+# should be used when building objects that have multiple symbols
+# with the same address so that only one of them appears in the sort
+# section. This saves space, reduces user confusion, and ensures that
+# libproc and debuggers always display public names instead of symbols
+# that are merely implementation details.
+#
+sub ProcSymSort {
+
+	my($FullPath, $RelPath, $RefTtl) = @_;
+
+	# If this object is exempt from checking, return quietly
+	return if ($FullPath =~ $SkipSymSort);
+
+
+	open(SORT, "elfdump -S $FullPath|") ||
+	    die "$Prog: Unable to execute elfdump (symbol sort sections)\n";
+
+	my $line;
+	my $last_addr;
+	my @dups = ();
+	my $secname;
+	while ($line = <SORT>) {
+		chomp $line;
+		
+		next if ($line eq '');
+
+		# If this is a header line, pick up the section name
+		if ($line =~ /^Symbol Sort Section:\s+([^\s]+)\s+/) {
+			$secname = $1;
+
+			# Every new section is followed by a column header line
+			$line = <SORT>;		# Toss header line
+
+			# Flush anything left from previous section
+			ProcSymSortOutMsg($RefTtl, $RelPath, $secname,
+			    $last_addr, @dups) if (scalar(@dups) > 1);
+
+			# Reset variables for new sort section
+			$last_addr = '';
+			@dups = ();
+
+			next;
+		}
+
+		# Process symbol line
+		my @fields = split /\s+/, $line;
+		my $new_addr = $fields[2]; 
+		my $new_name = $fields[9]; 
+		if ($new_addr eq $last_addr) {
+			push @dups, $new_name;
+		} else {
+			ProcSymSortOutMsg($RefTtl, $RelPath, $secname,
+			    $last_addr, @dups) if (scalar(@dups) > 1);
+			@dups = ( $new_name );
+			$last_addr = $new_addr; 
+		}
+	}
+
+	ProcSymSortOutMsg($RefTtl, $RelPath, $secname, $last_addr, @dups)
+		if (scalar(@dups) > 1);
+	
+	close SORT;
 }