about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog101
-rw-r--r--Makeconfig12
-rw-r--r--Makefile26
-rw-r--r--Makerules8
-rw-r--r--Versions.def66
-rw-r--r--argp/Versions11
-rw-r--r--assert/Versions6
-rw-r--r--catgets/Versions9
-rw-r--r--csu/Versions29
-rw-r--r--ctype/Versions13
-rw-r--r--db/Versions (renamed from db/libdb.map)10
-rw-r--r--debug/Versions9
-rw-r--r--dirent/Versions40
-rw-r--r--elf/Makefile2
-rw-r--r--elf/Versions35
-rw-r--r--elf/dl-load.c19
-rw-r--r--elf/libdl.map7
-rw-r--r--elf/rtld.c20
-rw-r--r--gmon/Versions15
-rw-r--r--grp/Versions19
-rw-r--r--hesiod/Versions (renamed from hesiod/libnss_hesiod.map)10
-rw-r--r--hurd/Versions (renamed from hurd/libhurduser.map)153
-rw-r--r--hurd/libmachuser.map113
-rw-r--r--iconv/Versions9
-rw-r--r--inet/Versions58
-rw-r--r--intl/Versions21
-rw-r--r--io/Versions83
-rw-r--r--libc.map629
-rw-r--r--libio/Versions103
-rw-r--r--linuxthreads/Versions (renamed from linuxthreads/libpthread.map)35
-rw-r--r--locale/Versions29
-rw-r--r--locale/libBrokenLocale.map7
-rw-r--r--login/Versions41
-rw-r--r--login/libutil.map7
-rw-r--r--malloc/Versions47
-rw-r--r--math/Versions (renamed from math/libm.map)49
-rw-r--r--md5-crypt/Makefile2
-rw-r--r--md5-crypt/Versions (renamed from md5-crypt/libcrypt.map)10
-rw-r--r--misc/Versions102
-rw-r--r--nis/Makefile1
-rw-r--r--nis/Versions121
-rw-r--r--nis/libnsl.map62
-rw-r--r--nis/libnss_compat.map11
-rw-r--r--nis/libnss_nis.map25
-rw-r--r--nis/libnss_nisplus.map32
-rw-r--r--nss/Versions (renamed from nss/libnss_files.map)41
-rw-r--r--nss/libnss_db.map20
-rw-r--r--posix/Versions80
-rw-r--r--pwd/Versions15
-rw-r--r--resolv/Versions (renamed from resolv/libresolv.map)38
-rw-r--r--resolv/libnss_dns.map9
-rw-r--r--resource/Versions25
-rw-r--r--rt/Versions (renamed from rt/librt.map)11
-rw-r--r--setjmp/Versions16
-rw-r--r--shadow/Versions27
-rw-r--r--signal/Versions44
-rw-r--r--socket/Versions35
-rw-r--r--stdio-common/Versions35
-rw-r--r--stdio/Versions6
-rw-r--r--stdlib/Versions86
-rw-r--r--streams/Versions15
-rw-r--r--string/Versions53
-rw-r--r--sunrpc/Versions99
-rw-r--r--sysdeps/alpha/Versions7
-rw-r--r--sysdeps/alpha/fpu/Versions6
-rw-r--r--sysdeps/generic/elf/backtracesyms.c4
-rw-r--r--sysdeps/i386/Versions6
-rw-r--r--sysdeps/sparc/Versions5
-rw-r--r--sysdeps/unix/sysv/Versions5
-rw-r--r--sysdeps/unix/sysv/linux/Versions76
-rw-r--r--sysdeps/unix/sysv/linux/alpha/Versions49
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/Versions7
-rw-r--r--sysdeps/unix/sysv/linux/mips/Versions9
-rw-r--r--sysvipc/Versions12
-rw-r--r--termios/Versions18
-rw-r--r--time/Versions52
-rw-r--r--versions.awk105
-rw-r--r--wcsmbs/Versions23
-rw-r--r--wctype/Versions20
80 files changed, 2260 insertions, 1020 deletions
diff --git a/ChangeLog b/ChangeLog
index 703423c5b9..e2a6f836f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,106 @@
+1998-07-02 21:51  Ulrich Drepper  <drepper@cygnus.com>
+
+	* Makeconfig: Define list of subdirs as all-subdirs and make subdirs
+	a copy.
+	* Makefile: Add rules to generate map files.
+	(distribute): Remove libc.map, add Versions.def and versions.awk.
+	* Makerules: Change rules to find map files on common-objpfx.
+	* elf/Makefile: Likewise.
+	* md5-crypt/Makefile: Likewise.
+	* nis/Makefile (libnsl-map): Remove.
+	* Versions.def: New file.
+	* versions.awk: New file.
+	* argp/Versions: New file.
+	* assert/Versions: New file.
+	* catgets/Versions: New file.
+	* csu/Versions: New file.
+	* ctype/Versions: New file.
+	* db/Versions: New file.
+	* debug/Versions: New file.
+	* dirent/Versions: New file.
+	* elf/Versions: New file.
+	* gmon/Versions: New file.
+	* grp/Versions: New file.
+	* hesiod/Versions: New file.
+	* hurd/Versions: New file.
+	* iconv/Versions: New file.
+	* inet/Versions: New file.
+	* intl/Versions: New file.
+	* io/Versions: New file.
+	* libio/Versions: New file.
+	* linuxthreads/Versions: New file.
+	* locale/Versions: New file.
+	* login/Versions: New file.
+	* malloc/Versions: New file.
+	* math/Versions: New file.
+	* md5-crypt/Versions: New file.
+	* misc/Versions: New file.
+	* nis/Versions: New file.
+	* nss/Versions: New file.
+	* posix/Versions: New file.
+	* pwd/Versions: New file.
+	* resolv/Versions: New file.
+	* resource/Versions: New file.
+	* rt/Versions: New file.
+	* setjmp/Versions: New file.
+	* shadow/Versions: New file.
+	* signal/Versions: New file.
+	* socket/Versions: New file.
+	* stdio/Versions: New file.
+	* stdio-common/Versions: New file.
+	* stdlib/Versions: New file.
+	* streams/Versions: New file.
+	* string/Versions: New file.
+	* sunrpc/Versions: New file.
+	* sysdeps/alpha/Versions: New file.
+	* sysdeps/alpha/fpu/Versions: New file.
+	* sysdeps/i386/Versions: New file.
+	* sysdeps/sparc/Versions: New file.
+	* sysdeps/unix/sysv/Versions: New file.
+	* sysdeps/unix/sysv/linux/Versions: New file.
+	* sysdeps/unix/sysv/linux/alpha/Versions: New file.
+	* sysdeps/unix/sysv/linux/i386/Versions: New file.
+	* sysdeps/unix/sysv/linux/mips/Versions: New file.
+	* sysvipc/Versions: New file.
+	* termios/Versions: New file.
+	* time/Versions: New file.
+	* wcsmbs/Versions: New file.
+	* wctype/Versions: New file.
+	* libc.map: Removed.
+	* db/libdb.map: Removed.
+	* elf/libdl.map: Removed.
+	* hesiod/libnss_hesiod.map: Removed.
+	* hurd/libhurduser.map: Removed.
+	* hurd/libmachuser.map: Removed.
+	* linuxthreads/libpthread.map: Removed.
+	* locale/libBrokenLocale.map: Removed.
+	* login/libutil.map: Removed.
+	* math/libm.map: Removed.
+	* md5-crypt/libcrypt.map: Removed.
+	* nis/libnsl.map: Removed.
+	* nis/libnsl_compat.map: Removed.
+	* nis/libnss_nis.map: Removed.
+	* nis/libnss_nisplus.map: Removed.
+	* nss/libnss_db.map: Removed.
+	* nss/libnss_files.map: Removed.
+	* resolv/libnss_dns.map: Removed.
+	* resolv/libresolv.map: Removed.
+	* rt/librt.map: Removed.
+
+	* elf/dl-load.c (fillin_rpath): Fix test for trusted directory.
+	Fix typos.
+
+	* elf/rtld.c (process_dl_debug): Recognize 'all'.
+	(process_envvars): LD_BIND_NOW must be followed by y, Y, or 1.
+
+	* sysdeps/generic/elf/backtracesyms.c: Allocate string memory of
+	correct size.
+
 1998-07-01  Ulrich Drepper  <drepper@cygnus.com>
 
+	* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Fix typo
+	in comment.
+
 	* nscd/nscd.c: Include unistd.h.
 
 1998-07-01 09:32  Ulrich Drepper  <drepper@cygnus.com>
diff --git a/Makeconfig b/Makeconfig
index 137e6c10e1..ee1cc6e79b 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -756,11 +756,13 @@ sysdep-subdirs := $(subst $(\n), ,$(sysdep-subdirs))
 endif
 
 # These are the subdirectories containing the library source.
-subdirs = csu assert ctype db2 locale intl catgets math setjmp signal stdlib \
-	  stdio-common $(stdio) malloc string wcsmbs time dirent grp pwd \
-	  posix io termios resource misc socket sysvipc gmon gnulib iconv \
-	  iconvdata wctype manual shadow md5-crypt po argp $(add-ons) nss \
-	  localedata timezone rt debug $(sysdep-subdirs) $(binfmt-subdir)
+all-subdirs = csu assert ctype db2 locale intl catgets math setjmp signal   \
+	      stdlib stdio-common $(stdio) malloc string wcsmbs time dirent \
+	      grp pwd posix io termios resource misc socket sysvipc gmon    \
+	      gnulib iconv iconvdata wctype manual shadow md5-crypt po argp \
+	      $(add-ons) nss localedata timezone rt debug $(sysdep-subdirs) \
+	      $(binfmt-subdir)
+subdirs = $(all-subdirs)
 
 # The mach and hurd subdirectories have many generated header files which
 # much of the rest of the library depends on, so it is best to build them
diff --git a/Makefile b/Makefile
index 8152e59c5f..c36f1acf59 100644
--- a/Makefile
+++ b/Makefile
@@ -77,6 +77,10 @@ ifeq (yes,$(build-shared))
 install-others += $(inst_includedir)/gnu/lib-names.h
 endif
 
+ifeq ($(versioning),yes)
+lib-noranlib: $(common-objpfx)sysd-versions
+endif
+
 include Makerules
 
 ifeq ($(build-programs),yes)
@@ -241,12 +245,12 @@ parent_echo-distinfo:
 distribute  :=	README README.libm INSTALL FAQ FAQ.in NOTES NEWS BUGS	\
 		PROJECTS COPYING.LIB COPYING ChangeLog ChangeLog.[0-9]	\
 		Makefile Makeconfig Makerules Rules Make-dist MakeTAGS	\
-		extra-lib.mk o-iterator.mk libc.map configure		\
-		configure.in aclocal.m4 config.h.in config.make.in	\
-		config-name.in Makefile.in sysdep.h set-hooks.h		\
-		libc-symbols.h version.h shlib-versions rpm/Makefile	\
-		rpm/template rpm/rpmrc glibcbug.in abi-tags stub-tag.h	\
-		test-skeleton.c include/des.h				\
+		extra-lib.mk o-iterator.mk configure configure.in	\
+		aclocal.m4 config.h.in config.make.in config-name.in	\
+		Makefile.in sysdep.h set-hooks.h libc-symbols.h		\
+		version.h shlib-versions rpm/Makefile rpm/template	\
+		rpm/rpmrc glibcbug.in abi-tags stub-tag.h		\
+		test-skeleton.c include/des.h Versions.def versions.awk \
 		$(addprefix scripts/,					\
 			    rellns-sh config.sub config.guess		\
 			    mkinstalldirs move-if-change install-sh	\
@@ -311,3 +315,13 @@ headers2_0 := 	__math.h bytesex.h confname.h direntry.h elfclass.h  	\
 .PHONY: remove-old-headers
 remove-old-headers:
 	rm -f $(addprefix $(inst_includedir)/, $(headers2_0))
+
+# Generate version maps.
+ifeq ($(versioning),yes)
+$(common-objpfx)sysd-versions: versions.awk \
+			       $(wildcard $(all-subdirs:%=%/Versions)) \
+			       $(wildcard $(+sysdep_dirs:%=%/Versions))
+	$(AWK) -v 'buildroot=$(common-objpfx)' -f $^
+	rm -f $@
+	echo > $@
+endif
diff --git a/Makerules b/Makerules
index 824a933284..72caf6046c 100644
--- a/Makerules
+++ b/Makerules
@@ -325,8 +325,8 @@ ifeq (yes,$(build-shared))
 # Reference map file only when versioning is selected and a map file name
 # is given.
 ifeq ($(versioning),yes)
-map-file = $(firstword $(wildcard \
-		$($(@F:.so=-map)) $(@F:.so=.map) $(..)$(@F:.so=.map)))
+map-file = $(firstword $(wildcard $($(@F:.so=-map)) \
+				  $(common-objpfx)$(@F:.so=.map)))
 load-map-file = $(map-file:%=-Wl,--version-script=%)
 endif
 
@@ -345,7 +345,7 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS)  \
 	  $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
 	  -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
 	  -Wl,--whole-archive \
-	  $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
+	  $(filter-out $(map-file) $(@F:.so=.map) $(+preinit) $(+postinit),$^) \
 	  $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
 endef
 
@@ -386,7 +386,7 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
 			 $(common-objpfx)libc_pic.os \
 			 $(elfobjdir)/sofini.os \
 			 $(elfobjdir)/interp.os $(elfobjdir)/ld.so \
-			 $(..)libc.map
+			 $(common-objpfx)libc.map
 	$(build-shlib)
 common-generated += libc.so libc_pic.os
 ifdef libc.so-version
diff --git a/Versions.def b/Versions.def
new file mode 100644
index 0000000000..233119bf14
--- /dev/null
+++ b/Versions.def
@@ -0,0 +1,66 @@
+libBrokenLocale {
+  GLIBC_2.0
+}
+libc {
+  GLIBC_2.0
+  GLIBC_2.1 GLIBC_2.0
+}
+libcrypt {
+  GLIBC_2.0
+}
+libdb {
+  GLIBC_2.0
+}
+libdl {
+  GLIBC_2.0
+  GLIBC_2.1 GLIBC_2.0
+}
+libhurduser {
+  GLIBC_2.0
+}
+libm {
+  GLIBC_2.0
+  GLIBC_2.1 GLIBC_2.0
+}
+libmachuser {
+  GLIBC_2.0
+}
+libnsl {
+  GLIBC_2.0
+  GLIBC_2.1 GLIBC_2.0
+}
+libnss_compat {
+  GLIBC_2.0
+}
+libnss_db {
+  GLIBC_2.0
+}
+libnss_dns {
+  GLIBC_2.0
+}
+libnss_files {
+  GLIBC_2.0
+  GLIBC_2.1 GLIBC_2.0
+}
+libnss_hesiod {
+  GLIBC_2.1
+}
+libnss_nis {
+  GLIBC_2.0
+}
+libnss_nisplus {
+  GLIBC_2.0
+}
+libpthread {
+  GLIBC_2.0
+  GLIBC_2.1 GLIBC_2.0
+}
+libresolv {
+  GLIBC_2.0
+}
+librt {
+  GLIBC_2.1
+}
+libutil {
+  GLIBC_2.0
+}
diff --git a/argp/Versions b/argp/Versions
new file mode 100644
index 0000000000..bf13642066
--- /dev/null
+++ b/argp/Versions
@@ -0,0 +1,11 @@
+libc {
+  GLIBC_2.1 {
+    # variables in normal name space
+    argp_err_exit_status; argp_program_bug_address; argp_program_version;
+    argp_program_version_hook;
+
+    # a*
+    argp_error; argp_failure; argp_help; argp_parse; argp_state_help;
+    argp_usage;
+  }
+}
diff --git a/assert/Versions b/assert/Versions
new file mode 100644
index 0000000000..0761373f0e
--- /dev/null
+++ b/assert/Versions
@@ -0,0 +1,6 @@
+libc {
+  GLIBC_2.0 {
+    # functions used in inline functions or macros
+    __assert_fail; __assert_perror_fail;
+  }
+}
diff --git a/catgets/Versions b/catgets/Versions
new file mode 100644
index 0000000000..f225be2634
--- /dev/null
+++ b/catgets/Versions
@@ -0,0 +1,9 @@
+libc {
+  GLIBC_2.0 {
+    # functions with required interface outside normal name space
+    __open_catalog;
+
+    # c*
+    catclose; catgets; catopen;
+  }
+}
diff --git a/csu/Versions b/csu/Versions
new file mode 100644
index 0000000000..5cae3c47d0
--- /dev/null
+++ b/csu/Versions
@@ -0,0 +1,29 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    _errno; __environ; _environ;
+
+    # helper functions
+    __errno_location; __libc_init_first; __libc_start_main;
+
+    # Exception handling support functions from libgcc
+    __register_frame; __register_frame_table; __deregister_frame;
+    __register_frame_info; __deregister_frame_info;
+
+    # variables in normal name space
+    environ; errno;
+
+    # b*
+    brk;
+
+    # s*
+    sbrk;
+  }
+  GLIBC_2.1 {
+    # global variables
+    __libc_stack_end;
+
+    # New special glibc functions.
+    gnu_get_libc_release; gnu_get_libc_version;
+  }
+}
diff --git a/ctype/Versions b/ctype/Versions
new file mode 100644
index 0000000000..6e7ed9b345
--- /dev/null
+++ b/ctype/Versions
@@ -0,0 +1,13 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    __ctype_b; __ctype_tolower; __ctype_toupper;
+
+    # i*
+    isalnum; isalpha; isascii; isblank; iscntrl; isdigit; isgraph; islower;
+    isprint; ispunct; isspace; isupper; isxdigit;
+
+    # t*
+    toascii; tolower; toupper;
+  }
+}
diff --git a/db/libdb.map b/db/Versions
index 01414a1708..65c1ae7586 100644
--- a/db/libdb.map
+++ b/db/Versions
@@ -1,12 +1,10 @@
-GLIBC_2.0 {
-  global:
+libdb {
+  GLIBC_2.0 {
     # the real DB entry point.
     dbopen; __dbopen;
 
     # The compatibility functions.
     dbm_clearerr; dbm_close; dbm_delete; dbm_dirfno; dbm_error;
     dbm_fetch; dbm_firstkey; dbm_nextkey; dbm_open; dbm_store;
-
-  local:
-    *;
-};
+  }
+}
diff --git a/debug/Versions b/debug/Versions
new file mode 100644
index 0000000000..28518d5084
--- /dev/null
+++ b/debug/Versions
@@ -0,0 +1,9 @@
+libc {
+  GLIBC_2.1 {
+    # functions used in other libraries
+    __backtrace; __backtrace_symbols;
+
+    # b*
+    backtrace; backtrace_symbols;
+  }
+}
diff --git a/dirent/Versions b/dirent/Versions
new file mode 100644
index 0000000000..aa7693e8be
--- /dev/null
+++ b/dirent/Versions
@@ -0,0 +1,40 @@
+libc {
+  GLIBC_2.0 {
+    # a*
+    alphasort;
+
+    # c*
+    closedir;
+
+    # d*
+    dirfd;
+
+    # g*
+    getdirentries;
+
+    # o*
+    opendir;
+
+    # r*
+    readdir; readdir_r; rewinddir;
+
+    # s*
+    scandir; seekdir;
+
+    # t*
+    telldir;
+  }
+  GLIBC_2.1 {
+    # a*
+    alphasort64;
+
+    # r*
+    readdir64; readdir64_r;
+
+    # s*
+    scandir64;
+
+    # v*
+    versionsort; versionsort64;
+  }
+}
diff --git a/elf/Makefile b/elf/Makefile
index dedc3d5074..243761cd04 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -35,7 +35,7 @@ elide-routines.os = $(dl-routines) dl-support enbl-secure
 # ld.so uses those routines, plus some special stuff for being the program
 # interpreter and operating independent of libc.
 rtld-routines	:= rtld $(dl-routines) dl-sysdep dl-minimal
-ld-map		= $(..)libc.map
+ld-map		= $(common-objpfx)libc.map
 distribute	= $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
 		  dl-hash.h soinit.c sofini.c ldd.sh.in ldd.bash.in eval.c \
 		  genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \
diff --git a/elf/Versions b/elf/Versions
new file mode 100644
index 0000000000..d908c59fd4
--- /dev/null
+++ b/elf/Versions
@@ -0,0 +1,35 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    _dl_debug_impcalls; _dl_debug_fd;
+
+    # functions used in other libraries
+    _dl_open; _dl_close; _dl_addr; _dl_sysdep_output; _dl_debug_message;
+
+    # Those are in the dynamic linker, but used by libc.so.
+    __libc_enable_secure; _dl_catch_error; _dl_check_all_versions;
+    _dl_debug_initialize; _dl_debug_state; _dl_default_scope;
+    _dl_global_scope_end; _dl_init_next; _dl_lookup_symbol;
+    _dl_map_object; _dl_map_object_deps; _dl_object_relocation_scope;
+    _dl_relocate_object; _dl_signal_error; _dl_starting_up;
+    _dl_sysdep_start; _r_debug;
+    _dl_global_scope; _dl_lookup_symbol_skip;
+    _dl_lookup_versioned_symbol; _dl_lookup_versioned_symbol_skip;
+  }
+  GLIBC_2.1 {
+    # global variables
+    _dl_profile; _dl_profile_map; _dl_profile_output; _dl_start_profile;
+
+    # functions used in other libraries
+    _dl_mcount; _dl_mcount_wrapper;
+  }
+}
+
+libdl {
+  GLIBC_2.0 {
+    dladdr; dlclose; dlerror; dlopen; dlsym;
+  }
+  GLIBC_2.1 {
+    dlvsym;
+  }
+}
diff --git a/elf/dl-load.c b/elf/dl-load.c
index ad981bc238..b14e52f101 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -204,13 +204,14 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
 	{
 	  const char **trun = trusted;
 
-	  /* All trusted directory must be complete name.  */
+	  /* All trusted directories must be complete names.  */
 	  if (cp[0] != '/')
 	    continue;
 
 	  while (*trun != NULL
 		 && (memcmp (*trun, cp, len) != 0
-		     || ((*trun)[len] != '/' && (*trun)[len + 1] != '\0')))
+		     || (*trun)[len] != '/'
+		     || (*trun)[len + 1] != '\0'))
 	    ++trun;
 
 	  if (*trun == NULL)
@@ -392,7 +393,7 @@ _dl_init_paths (const char *llp)
   if (rtld_search_dirs[0] == NULL)
     _dl_signal_error (ENOMEM, NULL, "cannot create cache for search path");
 
-  pelem = all_dirs= rtld_search_dirs[0];
+  pelem = all_dirs = rtld_search_dirs[0];
   for (strp = system_dirs; *strp != NULL; ++strp, pelem += round_size)
     {
       size_t cnt;
@@ -904,12 +905,13 @@ open_path (const char *name, size_t namelen, int preloaded,
       return -1;
     }
 
-  buf = __alloca (max_dirnamelen + max_capstrlen + namelen + 1);
+  buf = __alloca (max_dirnamelen + max_capstrlen + namelen);
   do
     {
       struct r_search_path_elem *this_dir = *dirs;
       size_t buflen = 0;
       size_t cnt;
+      char *edp;
 
       /* If we are debugging the search for libraries print the path
 	 now if it hasn't happened now.  */
@@ -919,6 +921,7 @@ open_path (const char *name, size_t namelen, int preloaded,
 	  print_search_path (dirs, current_what, this_dir->where);
 	}
 
+      edp = (char *) __mempcpy (buf, this_dir->dirname, this_dir->dirnamelen);
       for (cnt = 0; fd == -1 && cnt < ncapstr; ++cnt)
 	{
 	  /* Skip this directory if we know it does not exist.  */
@@ -926,8 +929,7 @@ open_path (const char *name, size_t namelen, int preloaded,
 	    continue;
 
 	  buflen =
-	    ((char *) __mempcpy (__mempcpy (__mempcpy (buf, this_dir->dirname,
-						       this_dir->dirnamelen),
+	    ((char *) __mempcpy (__mempcpy (edp,
 					    capstr[cnt].str, capstr[cnt].len),
 				 name, namelen)
 	     - buf);
@@ -946,12 +948,11 @@ open_path (const char *name, size_t namelen, int preloaded,
 		   test whether there is any directory at all.  */
 		struct stat st;
 
-		buf[this_dir->dirnamelen
-		    + MAX (capstr[cnt].len - 1, 0)] = '\0';
+		buf[buflen - namelen - 1] = '\0';
 
 		if (__xstat (_STAT_VER, buf, &st) != 0
 		    || ! S_ISDIR (st.st_mode))
-		  /* The directory does not exist ot it is no directory.  */
+		  /* The directory does not exist or it is no directory.  */
 		  this_dir->status[cnt] = nonexisting;
 		else
 		  this_dir->status[cnt] = existing;
diff --git a/elf/libdl.map b/elf/libdl.map
deleted file mode 100644
index 4bd2145a47..0000000000
--- a/elf/libdl.map
+++ /dev/null
@@ -1,7 +0,0 @@
-GLIBC_2.0 {
-  global:
-    dladdr; dlclose; dlerror; dlopen; dlsym; dlvsym;
-
-  local:
-    *;
-};
diff --git a/elf/rtld.c b/elf/rtld.c
index 5bd4b7cd97..bf4a142dba 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -968,6 +968,22 @@ process_dl_debug (const char *dl_debug)
 
 	  switch (len)
 	    {
+	    case 3:
+	      /* This option is not documented since it is not generally
+		 useful.  */
+	      if (memcmp (dl_debug, "all", 3) == 0)
+		{
+		  _dl_debug_libs = 1;
+		  _dl_debug_impcalls = 1;
+		  _dl_debug_reloc = 1;
+		  _dl_debug_files = 1;
+		  _dl_debug_symbols = 1;
+		  _dl_debug_bindings = 1;
+		  _dl_debug_versions = 1;
+		  any_debug = 1;
+		}
+	      break;
+
 	    case 4:
 	      if (memcmp (dl_debug, "help", 4) == 0)
 		{
@@ -1117,7 +1133,9 @@ process_envvars (enum mode *modep, int *lazyp)
 
 	case 8:
 	  /* Do we bind early?  */
-	  if (memcmp (&envline[3], "BIND_NOW", 8) == 0)
+	  if (memcmp (&envline[3], "BIND_NOW", 8) == 0
+	      && (envline[12] == '1' || envline[12] == 'y'
+		  || envline[12] == 'Y'))
 	    bind_now = 1;
 	  break;
 
diff --git a/gmon/Versions b/gmon/Versions
new file mode 100644
index 0000000000..d546690b8e
--- /dev/null
+++ b/gmon/Versions
@@ -0,0 +1,15 @@
+libc {
+  GLIBC_2.0 {
+    # functions with special/multiple interfaces
+    _mcount;
+
+    # Profiling support
+    __monstartup; _mcleanup; __profile_frequency;
+
+    # m*
+    moncontrol; monstartup;
+
+    # p*
+    profil; profil_counter;
+  }
+}
diff --git a/grp/Versions b/grp/Versions
new file mode 100644
index 0000000000..1e13e5574c
--- /dev/null
+++ b/grp/Versions
@@ -0,0 +1,19 @@
+libc {
+  GLIBC_2.0 {
+    # e*
+    endgrent;
+
+    # f*
+    fgetgrent; fgetgrent_r;
+
+    # g*
+    getgrent; getgrent_r; getgrgid; getgrgid_r; getgrnam; getgrnam_r;
+    getgroups;
+
+    # i*
+    initgroups;
+
+    # s*
+    setgrent; setgroups;
+  }
+}
diff --git a/hesiod/libnss_hesiod.map b/hesiod/Versions
index d05ad373a8..eeb0d576a5 100644
--- a/hesiod/libnss_hesiod.map
+++ b/hesiod/Versions
@@ -1,12 +1,10 @@
-GLIBC_2.1 {
-  global:
+libnss_hesiod {
+  GLIBC_2.1 {
     _nss_hesiod_setpwent; _nss_hesiod_endpwent;
     _nss_hesiod_getpwnam_r; _nss_hesiod_getpwuid;
     _nss_hesiod_setgrent; _nss_hesiod_endgrent;
     _nss_hesiod_getgrnam_r; _nss_hesiod_getgrgid;
     _nss_hesiod_setservent; _nss_hesiod_endservent;
     _nss_hesiod_getservbyname_r;
-
-  local:
-    *;
-};
+  }
+}
diff --git a/hurd/libhurduser.map b/hurd/Versions
index 005b397f2c..5b4ab6179c 100644
--- a/hurd/libhurduser.map
+++ b/hurd/Versions
@@ -1,6 +1,42 @@
-GLIBC_2.0 {
-  global:
+libc {
+  GLIBC_2.0 {
+    # Hurd-specific variables
+    __hurd_sigthread_stack_base; __hurd_sigthread_stack_end;
+    __hurd_sigthread_variables;
+    __hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset;
 
+    # Internal functions referenced by libmachuser and libhurduser.
+    __mach_msg;
+    __mig_allocate; __mig_deallocate;
+    __mig_get_reply_port; __mig_put_reply_port; __mig_dealloc_reply_port;
+    _S_catch_exception_raise;
+    _S_msg_add_auth; _S_msg_del_auth;
+    _S_msg_describe_ports;
+    _S_msg_get_dtable; _S_msg_set_dtable;
+    _S_msg_get_env_variable; _S_msg_set_env_variable;
+    _S_msg_get_environment; _S_msg_set_environment;
+    _S_msg_get_fd; _S_msg_set_fd;
+    _S_msg_get_init_int; _S_msg_set_init_int;
+    _S_msg_get_init_ints; _S_msg_set_init_ints;
+    _S_msg_get_init_port; _S_msg_set_init_port;
+    _S_msg_get_init_ports; _S_msg_set_init_ports;
+    _S_msg_proc_newids; _S_msg_report_wait;
+    _S_msg_sig_post; _S_msg_sig_post_untraced;
+    _hurd_intr_rpc_mach_msg; _hurdsig_fault_catch_exception_raise;
+
+    # Placeholders for the Hurd libthreads implementation.
+    cthread_getspecific; cthread_keycreate; cthread_setspecific;
+    __libc_getspecific;
+
+    # Function versions of Hurd macros.
+    __mutex_init; __mutex_trylock;
+    __mutex_lock; __mutex_unlock;
+    __mutex_lock_solid; __mutex_unlock_solid;
+  }
+}
+
+libhurduser {
+  GLIBC_2.0 {
     # These functions are used internally by libc.
     _S_msg_server; __auth_getids; __auth_makeauth;
     __auth_user_authenticate; __crash_dump_task; __dir_link;
@@ -149,7 +185,114 @@ GLIBC_2.0 {
     tioctl_tiocsetd; tioctl_tiocsig; tioctl_tiocspgrp;
     tioctl_tiocstart; tioctl_tiocsti; tioctl_tiocstop;
     tioctl_tiocswinsz; tioctl_tiocucntl;
+  }
+}
+libmachuser {
+  GLIBC_2.0 {
+    # These functions are used internally by libc.
+    _S_exc_server; __host_adjust_time; __host_get_time; __host_info;
+    __host_set_time; __mach_port_allocate_name_rpc;
+    __mach_port_allocate_rpc; __mach_port_deallocate_rpc;
+    __mach_port_destroy; __mach_port_extract_right;
+    __mach_port_get_refs; __mach_port_insert_right_rpc;
+    __mach_port_mod_refs; __mach_port_move_member; __mach_port_names;
+    __mach_port_set_qlimit; __task_create_rpc;
+    __task_disable_pc_sampling; __task_enable_pc_sampling;
+    __task_get_special_port; __task_priority; __task_resume;
+    __task_set_special_port_rpc; __task_suspend_rpc;
+    __task_terminate_rpc; __task_threads; __thread_abort;
+    __thread_create; __thread_depress_abort_rpc; __thread_get_state;
+    __thread_resume; __thread_set_special_port; __thread_set_state;
+    __thread_suspend; __thread_terminate; __vm_allocate_rpc;
+    __vm_deallocate_rpc; __vm_map_rpc; __vm_protect; __vm_read;
+    __vm_region; __vm_statistics; __vm_write;
+
+    # functions in normal name space
+    # Please keep them sorted by name!
+
+    # d*
+    default_pager_info; default_pager_object_create;
+    default_pager_object_pages; default_pager_objects;
+    default_pager_paging_file; default_pager_register_fileserver;
+    device_close; device_get_status; device_map; device_open;
+    device_open_request; device_read; device_read_inband;
+    device_read_request; device_read_request_inband; device_set_filter;
+    device_set_status; device_write; device_write_inband;
+    device_write_request; device_write_request_inband;
+    dp_helper_paging_space;
+
+    # e*
+    exception_raise;
+
+    # h*
+    host_adjust_time; host_get_boot_info; host_get_time; host_info;
+    host_kernel_version; host_processor_set_priv; host_processor_sets;
+    host_processors; host_reboot; host_set_time;
+
+    # m*
+    mach_port_allocate_name_rpc; mach_port_allocate_rpc;
+    mach_port_deallocate_rpc; mach_port_destroy;
+    mach_port_extract_right; mach_port_get_receive_status;
+    mach_port_get_refs; mach_port_get_set_status;
+    mach_port_insert_right_rpc; mach_port_mod_refs;
+    mach_port_move_member; mach_port_names; mach_port_rename;
+    mach_port_request_notification; mach_port_set_mscount;
+    mach_port_set_qlimit; mach_port_set_seqno; mach_port_type;
+    mach_ports_lookup; mach_ports_register;
+    memory_object_change_attributes; memory_object_change_completed;
+    memory_object_copy; memory_object_create;
+    memory_object_data_error; memory_object_data_initialize;
+    memory_object_data_provided; memory_object_data_request;
+    memory_object_data_return; memory_object_data_supply;
+    memory_object_data_unavailable; memory_object_data_unlock;
+    memory_object_data_write; memory_object_destroy;
+    memory_object_get_attributes; memory_object_init;
+    memory_object_lock_completed; memory_object_lock_request;
+    memory_object_ready; memory_object_set_attributes;
+    memory_object_supply_completed; memory_object_terminate;
+
+    # o*
+    old_mach_port_get_receive_status;
+
+    # p*
+    processor_assign; processor_control; processor_exit;
+    processor_get_assignment; processor_info; processor_set_create;
+    processor_set_default; processor_set_destroy; processor_set_info;
+    processor_set_max_priority; processor_set_policy_disable;
+    processor_set_policy_enable; processor_set_tasks;
+    processor_set_threads; processor_start;
+
+    # t*
+    task_assign; task_assign_default; task_create_rpc;
+    task_disable_pc_sampling; task_enable_pc_sampling;
+    task_get_assignment; task_get_emulation_vector;
+    task_get_sampled_pcs; task_get_special_port; task_info;
+    task_priority; task_ras_control; task_resume; task_set_emulation;
+    task_set_emulation_vector; task_set_special_port_rpc;
+    task_suspend_rpc; task_terminate_rpc; task_threads; thread_abort;
+    thread_assign; thread_assign_default; thread_create;
+    thread_depress_abort_rpc; thread_disable_pc_sampling;
+    thread_enable_pc_sampling; thread_get_assignment;
+    thread_get_sampled_pcs; thread_get_special_port; thread_get_state;
+    thread_info; thread_max_priority; thread_policy; thread_priority;
+    thread_resume; thread_set_special_port; thread_set_state;
+    thread_suspend; thread_terminate; thread_wire;
+
+    # v*
+    vm_allocate_rpc; vm_copy; vm_deallocate_rpc; vm_inherit;
+    vm_machine_attribute; vm_map_rpc; vm_protect; vm_read; vm_region;
+    vm_set_default_memory_manager; vm_statistics; vm_wire; vm_write;
+
+    # x*
+    xxx_cpu_control; xxx_device_get_status; xxx_device_set_filter;
+    xxx_device_set_status; xxx_host_info;
+    xxx_memory_object_lock_request; xxx_processor_set_default_priv;
+    xxx_slot_info; xxx_task_get_emulation_vector; xxx_task_info;
+    xxx_task_set_emulation_vector; xxx_thread_get_state;
+    xxx_thread_info; xxx_thread_set_state;
 
-  local:
-    *;
-};
+    # y*
+    yyy_host_info; yyy_processor_control; yyy_processor_info;
+    yyy_processor_set_info;
+  }
+}
diff --git a/hurd/libmachuser.map b/hurd/libmachuser.map
deleted file mode 100644
index d14797f748..0000000000
--- a/hurd/libmachuser.map
+++ /dev/null
@@ -1,113 +0,0 @@
-# libmachuser.map - symbol version and export information for libmachuser.so
-GLIBC_2.0 {
-  global:
-
-    # These functions are used internally by libc.
-    _S_exc_server; __host_adjust_time; __host_get_time; __host_info;
-    __host_set_time; __mach_port_allocate_name_rpc;
-    __mach_port_allocate_rpc; __mach_port_deallocate_rpc;
-    __mach_port_destroy; __mach_port_extract_right;
-    __mach_port_get_refs; __mach_port_insert_right_rpc;
-    __mach_port_mod_refs; __mach_port_move_member; __mach_port_names;
-    __mach_port_set_qlimit; __task_create_rpc;
-    __task_disable_pc_sampling; __task_enable_pc_sampling;
-    __task_get_special_port; __task_priority; __task_resume;
-    __task_set_special_port_rpc; __task_suspend_rpc;
-    __task_terminate_rpc; __task_threads; __thread_abort;
-    __thread_create; __thread_depress_abort_rpc; __thread_get_state;
-    __thread_resume; __thread_set_special_port; __thread_set_state;
-    __thread_suspend; __thread_terminate; __vm_allocate_rpc;
-    __vm_deallocate_rpc; __vm_map_rpc; __vm_protect; __vm_read;
-    __vm_region; __vm_statistics; __vm_write;
-
-    # functions in normal name space
-    # Please keep them sorted by name!
-
-    # d*
-    default_pager_info; default_pager_object_create;
-    default_pager_object_pages; default_pager_objects;
-    default_pager_paging_file; default_pager_register_fileserver;
-    device_close; device_get_status; device_map; device_open;
-    device_open_request; device_read; device_read_inband;
-    device_read_request; device_read_request_inband; device_set_filter;
-    device_set_status; device_write; device_write_inband;
-    device_write_request; device_write_request_inband;
-    dp_helper_paging_space;
-
-    # e*
-    exception_raise;
-
-    # h*
-    host_adjust_time; host_get_boot_info; host_get_time; host_info;
-    host_kernel_version; host_processor_set_priv; host_processor_sets;
-    host_processors; host_reboot; host_set_time;
-
-    # m*
-    mach_port_allocate_name_rpc; mach_port_allocate_rpc;
-    mach_port_deallocate_rpc; mach_port_destroy;
-    mach_port_extract_right; mach_port_get_receive_status;
-    mach_port_get_refs; mach_port_get_set_status;
-    mach_port_insert_right_rpc; mach_port_mod_refs;
-    mach_port_move_member; mach_port_names; mach_port_rename;
-    mach_port_request_notification; mach_port_set_mscount;
-    mach_port_set_qlimit; mach_port_set_seqno; mach_port_type;
-    mach_ports_lookup; mach_ports_register;
-    memory_object_change_attributes; memory_object_change_completed;
-    memory_object_copy; memory_object_create;
-    memory_object_data_error; memory_object_data_initialize;
-    memory_object_data_provided; memory_object_data_request;
-    memory_object_data_return; memory_object_data_supply;
-    memory_object_data_unavailable; memory_object_data_unlock;
-    memory_object_data_write; memory_object_destroy;
-    memory_object_get_attributes; memory_object_init;
-    memory_object_lock_completed; memory_object_lock_request;
-    memory_object_ready; memory_object_set_attributes;
-    memory_object_supply_completed; memory_object_terminate;
-
-    # o*
-    old_mach_port_get_receive_status;
-
-    # p*
-    processor_assign; processor_control; processor_exit;
-    processor_get_assignment; processor_info; processor_set_create;
-    processor_set_default; processor_set_destroy; processor_set_info;
-    processor_set_max_priority; processor_set_policy_disable;
-    processor_set_policy_enable; processor_set_tasks;
-    processor_set_threads; processor_start;
-
-    # t*
-    task_assign; task_assign_default; task_create_rpc;
-    task_disable_pc_sampling; task_enable_pc_sampling;
-    task_get_assignment; task_get_emulation_vector;
-    task_get_sampled_pcs; task_get_special_port; task_info;
-    task_priority; task_ras_control; task_resume; task_set_emulation;
-    task_set_emulation_vector; task_set_special_port_rpc;
-    task_suspend_rpc; task_terminate_rpc; task_threads; thread_abort;
-    thread_assign; thread_assign_default; thread_create;
-    thread_depress_abort_rpc; thread_disable_pc_sampling;
-    thread_enable_pc_sampling; thread_get_assignment;
-    thread_get_sampled_pcs; thread_get_special_port; thread_get_state;
-    thread_info; thread_max_priority; thread_policy; thread_priority;
-    thread_resume; thread_set_special_port; thread_set_state;
-    thread_suspend; thread_terminate; thread_wire;
-
-    # v*
-    vm_allocate_rpc; vm_copy; vm_deallocate_rpc; vm_inherit;
-    vm_machine_attribute; vm_map_rpc; vm_protect; vm_read; vm_region;
-    vm_set_default_memory_manager; vm_statistics; vm_wire; vm_write;
-
-    # x*
-    xxx_cpu_control; xxx_device_get_status; xxx_device_set_filter;
-    xxx_device_set_status; xxx_host_info;
-    xxx_memory_object_lock_request; xxx_processor_set_default_priv;
-    xxx_slot_info; xxx_task_get_emulation_vector; xxx_task_info;
-    xxx_task_set_emulation_vector; xxx_thread_get_state;
-    xxx_thread_info; xxx_thread_set_state;
-
-    # y*
-    yyy_host_info; yyy_processor_control; yyy_processor_info;
-    yyy_processor_set_info;
-
-  local:
-    *;
-};
diff --git a/iconv/Versions b/iconv/Versions
new file mode 100644
index 0000000000..25d16429f8
--- /dev/null
+++ b/iconv/Versions
@@ -0,0 +1,9 @@
+libc {
+  GLIBC_2.1 {
+    # global variables
+    __gconv_alias_db; __gconv_nmodules; __gconv_modules_db;
+
+    # i*
+    iconv_open; iconv; iconv_close;
+  }
+}
diff --git a/inet/Versions b/inet/Versions
new file mode 100644
index 0000000000..3d2e4c7320
--- /dev/null
+++ b/inet/Versions
@@ -0,0 +1,58 @@
+libc {
+  GLIBC_2.0 {
+    # functions with required interface outside normal name space
+    __ivaliduser; __check_rhosts_file; __rcmd_errstr;
+
+    # functions used in other libraries
+    __internal_endnetgrent; __internal_getnetgrent_r;
+    __internal_setnetgrent;
+
+    # variables in normal name space
+    rexecoptions;
+
+    # e*
+    endaliasent; endhostent; endnetent; endnetgrent; endprotoent; endrpcent;
+    endservent;
+
+    # e*
+    ether_aton; ether_aton_r; ether_hostton; ether_line; ether_ntoa;
+    ether_ntoa_r; ether_ntohost;
+
+    # g*
+    getaliasbyname; getaliasbyname_r; getaliasent; getaliasent_r;
+    getdomainname; gethostbyaddr; gethostbyaddr_r; gethostbyname;
+    gethostbyname2; gethostbyname2_r; gethostbyname_r; gethostent;
+    gethostent_r; getnetbyaddr; getnetbyaddr_r; getnetbyname;
+    getnetbyname_r; getnetent; getnetent_r; getnetgrent; getnetgrent_r;
+    getprotobyname; getprotobyname_r; getprotobynumber;
+    getprotobynumber_r; getprotoent; getprotoent_r; getrpcbyname;
+    getrpcbyname_r; getrpcbynumber; getrpcbynumber_r; getrpcent; getrpcent_r;
+    getrpcport; getservbyname; getservbyname_r; getservbyport;
+    getservbyport_r; getservent; getservent_r;
+
+    # h*
+    htonl; htons;
+
+    # i*
+    inet_addr; inet_aton; inet_lnaof; inet_makeaddr; inet_netof; inet_network;
+    inet_nsap_addr; inet_nsap_ntoa; inet_ntoa; inet_ntop; inet_pton; innetgr;
+    iruserok;
+
+    # n*
+    ntohl; ntohs;
+
+    # r*
+    rcmd; rexec; rresvport; ruserok; ruserpass;
+
+    # s*
+    setaliasent; setnetent; setnetgrent; setprotoent; setrpcent; setservent;
+  }
+  GLIBC_2.1 {
+    # variables in normal name space
+    in6addr_any; in6addr_loopback;
+
+    # i*
+    if_freenameindex; if_indextoname; if_nameindex; if_nametoindex;
+    inet6_isipv4mapped;
+  }
+}
diff --git a/intl/Versions b/intl/Versions
new file mode 100644
index 0000000000..acf0ce0ed9
--- /dev/null
+++ b/intl/Versions
@@ -0,0 +1,21 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    _nl_msg_cat_cntr; _nl_default_dirname; _nl_domain_bindings;
+
+    # functions used in inline functions or macros
+    __dcgettext;
+
+    # functions used in other libraries
+    __dgettext;
+
+    # b*
+    bindtextdomain;
+
+    # d*
+    dcgettext; dgettext; gettext;
+
+    # t*
+    textdomain;
+  }
+}
diff --git a/io/Versions b/io/Versions
new file mode 100644
index 0000000000..7892eebd0a
--- /dev/null
+++ b/io/Versions
@@ -0,0 +1,83 @@
+libc {
+  GLIBC_2.0 {
+    # functions which have an additional interface since they are
+    # are cancelable.
+    __libc_open; __libc_close; __libc_read; __libc_write;
+    __libc_lseek; __libc_fcntl;
+
+    # functions used in inline functions or macros
+    __xstat; __fxstat; __lxstat; __xmknod; __write; __close; __fcntl;
+    __lseek; __open; __read;
+
+    # a*
+    access;
+
+    # c*
+    chdir; chmod; chown; close; creat;
+
+    # d*
+    dup; dup2;
+
+    # e*
+    euidaccess;
+
+    # f*
+    fchdir; fchmod; fchown; fcntl; flock; fstatfs; fts_children; fts_close;
+    fts_open; fts_read; fts_set; ftw;
+
+    # g*
+    get_current_dir_name; getcwd; getwd;
+
+    # i*
+    isatty;
+
+    # l*
+    lchown; link; lockf; lseek;
+
+    # m*
+    mkdir; mkfifo;
+
+    # o*
+    open;
+
+    # p*
+    pipe; poll;
+
+    # r*
+    read; readlink; rmdir;
+
+    # s*
+    statfs; symlink;
+
+    # t*
+    ttyname; ttyname_r;
+
+    # u*
+    umask; unlink; utime;
+
+    # w*
+    write;
+  }
+  GLIBC_2.1 {
+    # functions used in other libraries
+    __xstat64; __fxstat64; __lxstat64; __poll;
+
+    # c*
+    creat64;
+
+    # f*
+    fstatfs64; fstatvfs; fstatvfs64; ftw64;
+
+    # l*
+    lockf64; lseek64;
+
+    # n*
+    nftw; nftw64;
+
+    # o*
+    open64;
+
+    # s*
+    statfs64; statvfs; statvfs64;
+  }
+}
diff --git a/libc.map b/libc.map
deleted file mode 100644
index 1917fcbac7..0000000000
--- a/libc.map
+++ /dev/null
@@ -1,629 +0,0 @@
-GLIBC_2.0 {
-  global:
-    # global variables
-    _errno; _h_errno; _itoa_lower_digits; _itoa_upper_digits;
-    __ctype_b; __ctype_tolower; __ctype_toupper;
-    _nl_msg_cat_cntr; __environ; _environ; _res;
-    ___brk_addr; __curbrk; _nl_current_LC_CTYPE; _libc_intl_domainname;
-    _sys_errlist; _sys_nerr; _sys_siglist; __progname; _nl_default_dirname;
-    _nl_domain_bindings; __timezone; __daylight; __tzname;
-    _nl_current_LC_COLLATE; __collate_element_hash;
-    __collate_element_strings; __collate_symbol_classes;
-    __collate_symbol_hash; __collate_symbol_strings;
-    _obstack;
-    __progname_full; __progname; _dl_debug_impcalls; _dl_debug_fd;
-
-    _IO_list_all; _IO_stderr_; _IO_stdin_; _IO_stdout_;
-
-    # This is for sparc only.
-    .div; .mul; .rem; .udiv; .umul; .urem;
-
-    # For alpha, unfortunately in wider use.
-    _inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse;
-    _hae_shift;
-
-    # helper functions
-    __errno_location; __libc_init_first; __h_errno_location; __libc_start_main;
-
-    # functions with special/multiple interfaces
-    __sigsetjmp; _setjmp; __sigaddset; __sigdelset; __sigismember;
-    __sysv_signal; __bsd_getpgrp; _longjmp; _mcount;
-    __divqu; __remqu; __divqs; __remqs; __divlu; __remlu; __divls;
-    __remls; __divl; __reml; __divq; __remq; __divqu; __remqu;
-    __setpgid; __getpgid; __adjtimex;
-
-    # functions which have an additional interface since they are
-    # are cancelable.
-    __libc_wait; __libc_waitpid; __libc_pause; __libc_nanosleep;
-    __libc_open; __libc_close; __libc_read; __libc_write;
-    __libc_lseek; __libc_fcntl; __libc_tcdrain; __libc_fsync;
-    __libc_msync; __libc_system; __libc_accept; __libc_send; __libc_recvfrom;
-    __libc_recvmsg; __libc_sendmsg; __libc_recv; __libc_sendto; __libc_connect;
-
-    # interface of malloc functions
-    __libc_calloc; __libc_free; __libc_mallinfo; __libc_malloc;
-    __libc_mallopt; __libc_memalign; __libc_pvalloc; __libc_realloc;
-    __libc_valloc;
-    __malloc_initialize_hook; __free_hook; __malloc_hook; __realloc_hook;
-    __memalign_hook; __after_morecore_hook;
-    __malloc_initialized; __default_morecore; __morecore; __sbrk;
-    __getpagesize;
-
-    # functions with required interface outside normal name space
-    _exit; __ivaliduser; __open_catalog;
-    __argz_count; __argz_stringify; __argz_next;
-    __check_rhosts_file; __rcmd_errstr; __xpg_basename;
-
-    # functions from the experimental locale implementation
-    __*_l; __newlocale; __duplocale; __freelocale;
-
-    # functions used in inline functions or macros
-    __strto*_internal; __wcsto*_internal; __getdelim;
-    __isnan; __isnanf; __isnanl; __finite; __finitef; __finitel;
-    __isinf; __isinff; __isinfl;
-    __cmsg_nxthdr;
-    _obstack_allocated_p; _obstack_begin; _obstack_begin_1;
-    _obstack_free; _obstack_memory_used; _obstack_newchunk;
-    __assert_fail; __assert_perror_fail;
-    _IO_getc; _IO_peekc_unlocked; _IO_putc; _IO_feof; _IO_ferror;
-    __xstat; __fxstat; __lxstat;  __xmknod;
-    __dcgettext; __uflow; __underflow; __overflow; __iswctype; __sigpause;
-    __ctype_get_mb_cur_max; __bzero;
-    __strtok_r;
-
-    # functions used in other libraries
-    __printf_fp; __stpncpy; __stpcpy; __strdup; __mempcpy;
-    __nss_passwd_lookup; __nss_group_lookup; __nss_next;
-    _nss_files_parse_grent; _nss_files_parse_pwent; _nss_files_parse_spent;
-    __nss_database_lookup; __internal_endnetgrent; __internal_getnetgrent_r;
-    __internal_setnetgrent; __gmtime_r; __secure_getenv;
-    __select; __sched_get_priority_max; __sched_get_priority_min;
-    __sched_getparam; __sched_getscheduler; __sched_setscheduler;
-    __sched_yield; __on_exit; __gettimeofday; __fork; __clone;
-    __nss_configure_lookup; _dl_open; _dl_close; _dl_addr;
-    __vsscanf; __vfscanf; __vsnprintf;
-    _rpc_dtablesize; _null_auth; _seterr_reply;
-    __res_randomid;  __getpid;
-    __strcasecmp; __strerror_r; __write; _dl_sysdep_output;
-    _dl_debug_message;
-    __ffs;
-    __close; __connect; __fcntl; __lseek; __open; __read; __send; __wait;
-    __ieee_get_fp_control; __ieee_set_fp_control;
-    __dgettext; __sigaction;
-
-    # libio
-    _IO_adjust_column; _IO_clearerr; _IO_default_doallocate;
-    _IO_default_finish; _IO_default_pbackfail; _IO_default_uflow;
-    _IO_default_xsgetn; _IO_default_xsputn; _IO_do_write;
-    _IO_doallocbuf; _IO_fclose; _IO_fdopen; _IO_feof; _IO_ferror;
-    _IO_fflush; _IO_fgetc; _IO_fgetpos; _IO_fgets; _IO_file_attach;
-    _IO_file_close; _IO_file_close_it; _IO_file_doallocate;
-    _IO_file_fopen; _IO_file_init; _IO_file_jumps; _IO_file_open;
-    _IO_file_overflow; _IO_file_read; _IO_file_seek; _IO_file_seekoff;
-    _IO_file_setbuf; _IO_file_stat; _IO_file_sync; _IO_file_underflow;
-    _IO_file_write; _IO_file_xsputn; _IO_fileno; _IO_flockfile;
-    _IO_flush_all; _IO_flush_all_linebuffered; _IO_fopen; _IO_fprintf;
-    _IO_fputs; _IO_fread; _IO_free_backup_area; _IO_freopen;
-    _IO_fscanf; _IO_fseek; _IO_fsetpos; _IO_ftell; _IO_ftrylockfile;
-    _IO_funlockfile; _IO_fwrite; _IO_getc; _IO_getline; _IO_gets;
-    _IO_init; _IO_init_marker; _IO_link_in; _IO_marker_delta;
-    _IO_marker_difference; _IO_padn; _IO_pclose; _IO_peekc_locked;
-    _IO_perror; _IO_popen; _IO_printf; _IO_proc_close; _IO_proc_open;
-    _IO_putc; _IO_puts; _IO_remove_marker; _IO_rewind; _IO_scanf;
-    _IO_seekmark; _IO_seekoff; _IO_seekpos; _IO_setb; _IO_setbuf;
-    _IO_setbuffer; _IO_setlinebuf; _IO_setvbuf; _IO_sgetn;
-    _IO_sprintf; _IO_sputbackc; _IO_sscanf; _IO_str_init_readonly;
-    _IO_str_init_static; _IO_str_overflow; _IO_str_pbackfail;
-    _IO_str_seekoff; _IO_str_underflow; _IO_sungetc;
-    _IO_switch_to_get_mode; _IO_un_link; _IO_ungetc;
-    _IO_unsave_markers; _IO_vfprintf; _IO_vfscanf; _IO_vsprintf;
-
-    # Exception handling support functions from libgcc
-    __register_frame; __register_frame_table; __deregister_frame;
-    __register_frame_info; __deregister_frame_info;
-
-    # Profiling support
-    __monstartup; _mcleanup; __profile_frequency;
-
-    # Hurd-specific variables
-    __hurd_sigthread_stack_base; __hurd_sigthread_stack_end;
-    __hurd_sigthread_variables;
-    __hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset;
-
-    # functions from stdio
-    __fillbf; __flshfp;
-
-    # Internal functions referenced by libmachuser and libhurduser.
-    __mach_msg;
-    __mig_allocate; __mig_deallocate;
-    __mig_get_reply_port; __mig_put_reply_port; __mig_dealloc_reply_port;
-    _S_catch_exception_raise;
-    _S_msg_add_auth; _S_msg_del_auth;
-    _S_msg_describe_ports;
-    _S_msg_get_dtable; _S_msg_set_dtable;
-    _S_msg_get_env_variable; _S_msg_set_env_variable;
-    _S_msg_get_environment; _S_msg_set_environment;
-    _S_msg_get_fd; _S_msg_set_fd;
-    _S_msg_get_init_int; _S_msg_set_init_int;
-    _S_msg_get_init_ints; _S_msg_set_init_ints;
-    _S_msg_get_init_port; _S_msg_set_init_port;
-    _S_msg_get_init_ports; _S_msg_set_init_ports;
-    _S_msg_proc_newids; _S_msg_report_wait;
-    _S_msg_sig_post; _S_msg_sig_post_untraced;
-    _hurd_intr_rpc_mach_msg; _hurdsig_fault_catch_exception_raise;
-
-    # Placeholders for the Hurd libthreads implementation.
-    cthread_getspecific; cthread_keycreate; cthread_setspecific;
-    __libc_getspecific;
-
-    # Function versions of Hurd macros.
-    __mutex_init; __mutex_trylock;
-    __mutex_lock; __mutex_unlock;
-    __mutex_lock_solid; __mutex_unlock_solid;
-
-    # variables in normal name space
-    argp_err_exit_status; argp_program_bug_address; argp_program_version;
-    argp_program_version_hook;
-    daylight;
-    environ;
-    errno; error_message_count; error_one_per_line; error_print_progname;
-    h_errlist; h_errno; h_nerr;
-    loc1; loc2; locs;
-    mallwatch;
-    obstack_alloc_failed_handler; obstack_exit_failure;
-    optarg; opterr; optind; optopt;
-    program_invocation_name; program_invocation_short_name;
-    re_max_failures;  re_syntax_options; rexecoptions; rpc_createerr;
-    stderr; stdin; stdout; svc_fdset; svcauthdes_stats;
-    sys_errlist; sys_nerr; sys_sigabbrev; sys_siglist;
-    timezone; tzname;
-
-    # functions in normal name space
-    # Please keep them sorted by name!
-
-    # a*
-    a64l; abort; abs; accept; access; acct; addmntent; adjtime; adjtimex;
-    advance; alarm; alphasort;
-
-    argz_add; argz_add_sep; argz_append; argz_count; argz_create;
-    argz_create_sep; argz_delete; argz_extract; argz_insert; argz_next;
-    argz_replace; argz_stringify;
-
-    asctime; asctime_r; asprintf; atexit; atof; atoi; atol; atoll;
-    authnone_create; authunix_create; authunix_create_default;
-
-    # b*
-    basename; bcmp; bcopy; bdflush; bind; bindresvport;
-    bindtextdomain; brk; bsd_signal; bsearch; btowc; bus_base; bus_base_sparse;
-    bzero;
-
-    # c*
-    cachectl; cacheflush; calloc; callrpc; canonicalize_file_name;
-    catclose; catgets; catopen;
-    cfgetispeed; cfgetospeed; cfmakeraw; cfree;
-    cfsetispeed; cfsetospeed; cfsetspeed; chdir; chflags; chmod; chown;
-    chroot; clearenv; clearerr; clearerr_unlocked;
-
-    clnt_broadcast; clnt_create; clnt_pcreateerror; clnt_perrno;
-    clnt_perror; clnt_spcreateerror; clnt_sperrno; clnt_sperror;
-    clntraw_create; clnttcp_create; clntudp_bufcreate; clntudp_create;
-
-    clock; clone; close; closedir; closelog; confstr; connect; copysign;
-    copysignf; copysignl; creat; create_module; ctermid; ctime;
-    ctime_r; cuserid;
-
-    # d*
-    daemon; dcgettext; delete_module; dgettext;
-    difftime; dirfd; dirname; div; dprintf; drand48; drand48_r; dup; dup2;
-    dysize;
-
-    # e*
-    ecvt; ecvt_r; endaliasent; endfsent; endgrent; endhostent;
-    endmntent; endnetent; endnetgrent; endprotoent; endpwent; endrpcent;
-    endservent; endspent; endttyent; endusershell; endutent;
-    envz_add; envz_entry; envz_get; envz_merge; envz_remove;
-    envz_strip; erand48; erand48_r; err; error; error_at_line; errx;
-
-    ether_aton; ether_aton_r; ether_hostton; ether_line; ether_ntoa;
-    ether_ntoa_r; ether_ntohost;
-
-    euidaccess; execl; execle; execlp; execv; execve; execvp; exit;
-
-    # f*
-    fchdir; fchflags; fchmod; fchown; fclose; fcloseall; fcntl; fcvt;
-    fcvt_r; fdatasync; fdopen; feof; feof_locked; feof_unlocked; ferror;
-    ferror_locked; ferror_unlocked; fexecve; fflush; fflush_locked;
-    fflush_unlocked; ffs;
-    fgetc; fgetgrent; fgetgrent_r; fgetpos; fgetpwent; fgetpwent_r; fgets;
-    fgetspent; fgetspent_r; fileno; fileno_locked; fileno_unlocked; finite;
-    finitef; finitel; flock; flockfile; fnmatch; fopen; fopencookie;
-    fork; fpathconf; fprintf; fputc; fputc_locked; fputc_unlocked; fputs;
-    fread; free; freeaddrinfo; freopen; frexp; frexpf; frexpl; fscanf; fseek;
-    fsetpos; fstatfs; fsync; ftell; ftime; ftok; ftruncate; ftrylockfile;
-    fts_children; fts_close; fts_open; fts_read; fts_set; ftw;
-    funlockfile; fwrite;
-
-    # g*
-    gcvt; get_avphys_pages; get_current_dir_name;
-    get_kernel_syms; get_myaddress; get_nprocs; get_nprocs_conf;
-    get_phys_pages; getaddrinfo; getaliasbyname; getaliasbyname_r;
-    getaliasent; getaliasent_r; getc; getc_locked; getc_unlocked; getchar;
-    getchar_unlocked; getcwd; getdelim; getdirentries;
-    getdomainname; getdtablesize; getegid; getenv; geteuid; getfsent;
-    getfsfile; getfsspec; getgid; getgrent; getgrent_r; getgrgid;
-    getgrgid_r; getgrnam; getgrnam_r; getgroups; gethostbyaddr;
-    gethostbyaddr_r; gethostbyname; gethostbyname2; gethostbyname2_r;
-    gethostbyname_r; gethostent; gethostent_r; gethostid; gethostname;
-    getitimer; getline; getlogin; getlogin_r; getmntent; getmntent_r;
-    getnetbyaddr; getnetbyaddr_r; getnetbyname;
-    getnetbyname_r; getnetent; getnetent_r; getnetgrent; getnetgrent_r;
-    getopt; getopt_long; getopt_long_only; getpagesize;
-    getpass; getpeername; getpgid; getpgrp; getpid; getppid; getpriority;
-    getprotobyname; getprotobyname_r; getprotobynumber;
-    getprotobynumber_r; getprotoent; getprotoent_r; getpublickey;
-    getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r;
-    getresgid; getresuid;
-    getrlimit; getrpcbyname; getrpcbyname_r; getrpcbynumber;
-    getrpcbynumber_r; getrpcent; getrpcent_r; getrpcport; getrusage; gets;
-    getsecretkey; getservbyname; getservbyname_r; getservbyport;
-    getservbyport_r; getservent; getservent_r; getsid; getsockname;
-    getsockopt; getspent; getspent_r; getspnam; getspnam_r; getsubopt;
-    gettext; gettimeofday; getttyent; getttynam; getuid; getusershell;
-    getutent; getutent_r; getutid; getutid_r; getutline; getutline_r;
-    getw; getwd; glob; glob_pattern_p;
-    globfree; gmtime; gmtime_r; group_member; gsignal; gtty;
-
-    # h*
-    hae_shift; hasmntopt; hcreate; hcreate_r; hdestroy; hdestroy_r; herror;
-    hsearch; hsearch_r; hstrerror; htonl; htons;
-
-    # i*
-    inb; index; inet_addr; inet_aton; inet_lnaof; inet_makeaddr;
-    inet_netof; inet_network; inet_nsap_addr; inet_nsap_ntoa; inet_ntoa;
-    inet_ntop; inet_pton; init_module; initgroups; initstate; initstate_r;
-    inl; innetgr; insque; inw; ioctl; ioperm; iopl; iruserok;
-
-    isalnum; isalpha; isascii; isatty; isblank; iscntrl; isdigit;
-    isfdtype; isgraph; isinf; isinff; isinfl; islower; isnan; isnanf;
-    isnanl; isprint; ispunct; isspace; isupper; iswalnum; iswalpha;
-    iswcntrl; iswctype; iswdigit; iswgraph; iswlower; iswprint;
-    iswpunct; iswspace; iswupper; iswxdigit; isxdigit;
-
-    # j*
-    jrand48; jrand48_r;
-
-    # k*
-    kill; killpg; klogctl;
-
-    # l*
-    l64a; labs; lchown; lckpwdf; lcong48; lcong48_r; ldexp; ldexpf;
-    ldexpl; ldiv; lfind; link; listen; llabs; lldiv; llseek; localeconv;
-    localtime; localtime_r; lockf; longjmp; lrand48; lrand48_r;
-    lsearch; lseek;
-
-    # m*
-    madvise;
-
-    mallinfo; malloc; malloc_get_state; malloc_set_state;
-    malloc_stats; malloc_trim; malloc_usable_size; mallopt;
-
-    mblen; mbrlen; mbrtowc; mbsinit; mbsnrtowcs; mbsrtowcs; mbstowcs;
-    mbtowc; mcheck; mcount;
-
-    memalign; memccpy; memchr; memcmp; memcpy; memfrob; memmem;
-    memmove; memset;
-
-    mkdir; mkfifo; mkstemp; mktemp; mktime; mlock;
-    mlockall; mmap; modf; modff; modfl; moncontrol; monstartup; mount;
-    mprobe; mprotect; mrand48; mrand48_r; mremap; msgctl; msgget; msgrcv;
-    msgsnd; msync; mtrace; munlock; munlockall; munmap; muntrace;
-
-    # n*
-    nanosleep; nfsservctl; nice; nl_langinfo; nrand48; nrand48_r;
-    ntohl; ntohs;
-
-    # o*
-    obstack_free; obstack_printf; obstack_vprintf; on_exit; open;
-    open_memstream; opendir; openlog; outb; outl; outw;
-
-    # p*
-    parse_printf_format; pathconf; pause; pciconfig_read;
-    pciconfig_write; pclose; perror;
-    personality; pipe; pmap_getmaps; pmap_getport; pmap_rmtcall; pmap_set;
-    pmap_unset; poll; popen; prctl; printf; profil; profil_counter;
-    pselect; psignal;
-
-    pthread_attr_destroy;
-    pthread_attr_getdetachstate; pthread_attr_getinheritsched;
-    pthread_attr_getschedparam; pthread_attr_getschedpolicy;
-    pthread_attr_getscope; pthread_attr_init; pthread_attr_setdetachstate;
-    pthread_attr_setinheritsched; pthread_attr_setschedparam;
-    pthread_attr_setschedpolicy; pthread_attr_setscope;
-    pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init;
-    pthread_cond_signal; pthread_cond_wait; pthread_condattr_destroy;
-    pthread_condattr_init; pthread_equal; pthread_exit;
-    pthread_getschedparam; pthread_mutex_destroy; pthread_mutex_init;
-    pthread_mutex_lock; pthread_mutex_unlock;
-    pthread_mutexattr_getkind_np; pthread_mutexattr_setkind_np;
-    pthread_self; pthread_setcancelstate; pthread_setcanceltype;
-    pthread_setschedparam;
-
-    ptrace; putc; putc_locked; putc_unlocked; putchar; putchar_unlocked;
-    putenv; putpwent; puts; putspent; pututline; putw; pvalloc;
-
-    # q*
-    qecvt; qecvt_r; qfcvt; qfcvt_r; qgcvt; qsort; query_module; quotactl;
-
-    # r*
-    raise; rand; rand_r; random; random_r; rcmd;
-
-    re_comp; re_compile_fastmap; re_compile_pattern; re_exec; re_match;
-    re_match_2; re_search; re_search_2; re_set_registers; re_set_syntax;
-
-    read; readdir; readdir_r; readlink; readv;
-    realloc; realpath; reboot; recv; recvfrom; recvmsg; regcomp; regerror;
-    regexec; regfree; register_printf_function; registerrpc; remove; remque;
-    rename; res_init; revoke; rewind; rewinddir; rexec; rindex; rmdir; rpmatch;
-    rresvport; ruserok; ruserpass;
-
-    # s*
-    sbrk; scalbn; scalbnf; scalbnl; scandir; scanf;
-
-    sched_get_priority_max; sched_get_priority_min; sched_getparam;
-    sched_getscheduler; sched_rr_get_interval; sched_setparam;
-    sched_setscheduler; sched_yield;
-
-    seed48; seed48_r; seekdir; select;
-    semctl; semget; semop; send; sendmsg; sendto; setaliasent; setbuf;
-    setbuffer; setcontext;
-    setdomainname; setegid; setenv; seteuid; setfsent;
-    setfsgid; setfsuid; setgid; setgrent; setgroups; sethae; sethostent;
-    sethostid; sethostname; setitimer; setjmp; setlinebuf; setlocale;
-    setlogin; setlogmask; setmntent; setnetent; setnetgrent; setpgid;
-    setpgrp; setpriority; setprotoent; setpwent; setregid; setresgid;
-    setresuid; setreuid; setrlimit; setrpcent; setservent;
-    setsid; setsockopt; setspent;
-    setstate; setstate_r; settimeofday; setttyent; setuid; setusershell;
-    setutent; setvbuf; sgetspent; sgetspent_r; shmat; shmctl;
-    shmdt; shmget; shutdown;
-
-    sigaction; sigaddset; sigaltstack; sigandset; sigblock; sigdelset;
-    sigemptyset; sigfillset; siggetmask; siginterrupt; sigisemptyset;
-    sigismember; siglongjmp; signal; sigorset; sigpause; sigpending;
-    sigprocmask; sigreturn; sigsetmask; sigstack; sigsuspend; sigvec;
-    sigwait;
-
-    sleep; snprintf; socket; socketpair; sprintf; srand; srand48;
-    srand48_r; srandom; srandom_r; sscanf; ssignal; sstk; statfs;
-    step; stime; stpcpy; stpncpy; strcasecmp; strcat;
-    strchr; strcmp; strcoll;
-    strcpy; strcspn; strdup; strerror; strerror_r; strfmon; strfry;
-    strftime; strlen; strncasecmp; strncat; strncmp; strncpy; strndup;
-    strnlen; strpbrk; strptime; strrchr; strsep; strsignal; strspn;
-    strstr; strtod; strtof; strtok; strtok_r; strtol; strtold; strtoll;
-    strtoq; strtoul; strtoull; strtouq; strxfrm; stty;
-
-    svc_exit; svc_getreq; svc_getreqset; svc_register; svc_run;
-    svc_sendreply; svc_unregister; svcerr_auth; svcerr_decode;
-    svcerr_noproc; svcerr_noprog; svcerr_progvers; svcerr_systemerr;
-    svcerr_weakauth; svcfd_create; svcraw_create; svctcp_create;
-    svcudp_bufcreate; svcudp_create; svcudp_enablecache;
-
-    swab; swapoff; swapon; symlink; sync;
-    syscall; sysconf; sysctl; sysinfo; syslog; sysmips;
-    system;
-
-    # t*
-    tcdrain; tcflow; tcflush; tcgetattr; tcgetpgrp; tcsendbreak;
-    tcsetattr; tcsetpgrp; tdelete; telldir; tempnam; textdomain;
-    tfind; time; timegm; timelocal; times; tmpfile; tmpnam;
-    tmpnam_r;
-
-    toascii; tolower; toupper; towctrans; towlower; towupper;
-    tr_break; truncate; tsearch; ttyname; ttyname_r; ttyslot;
-    twalk; tzset;
-
-    # u*
-    ualarm; ulckpwdf; ulimit; umask; umount; uname; ungetc; unlink;
-    unsetenv; updwtmp; uselib; usleep; ustat; utime; utimes; utmpname;
-
-    # v*
-    valloc; vasprintf; vdprintf; verr; verrx; vfork; vfprintf; vfscanf;
-    vhangup; vlimit; vm86; vprintf; vscanf; vsnprintf; vsprintf; vsscanf;
-    vsyslog; vtimes; vwarn; vwarnx;
-
-    # w*
-    wait; wait3; wait4; waitpid; warn; warnx;
-
-    wcpcpy; wcpncpy; wcrtomb; wcscat; wcschr; wcscmp; wcscoll;
-    wcscpy; wcscspn; wcsdup; wcslen; wcsncat; wcsncmp;
-    wcsncpy; wcsnrtombs; wcspbrk; wcsrchr; wcsrtombs; wcsspn; wcsstr;
-    wcstod; wcstof; wcstok; wcstol; wcstold; wcstombs; wcstoq; wcstoul;
-    wcstouq; wcswidth; wcsxfrm; wctob; wctomb; wctrans; wctype; wcwidth;
-
-    wmemchr; wmemcmp; wmemcpy; wmemmove; wmemset;
-
-    write; writev;
-
-    # x*
-    xdr_accepted_reply; xdr_array; xdr_authunix_parms; xdr_bool; xdr_bytes;
-    xdr_callhdr; xdr_callmsg; xdr_char; xdr_cryptkeyarg; xdr_cryptkeyarg2;
-    xdr_cryptkeyres; xdr_des_block; xdr_double; xdr_enum; xdr_float;
-    xdr_free; xdr_int; xdr_key_netstarg; xdr_key_netstres; xdr_keybuf;
-    xdr_keystatus; xdr_long; xdr_netobj; xdr_opaque; xdr_opaque_auth;
-    xdr_pmap; xdr_pmaplist; xdr_pointer; xdr_reference; xdr_rejected_reply;
-    xdr_replymsg; xdr_rmtcall_args; xdr_rmtcallres; xdr_short; xdr_string;
-    xdr_u_char; xdr_u_int; xdr_u_long; xdr_u_short; xdr_union; xdr_vector;
-    xdr_void; xdr_wrapstring; xdrmem_create; xdrrec_create;
-    xdrrec_endofrecord; xdrrec_eof; xdrrec_skiprecord; xdrstdio_create;
-    xencrypt; xprt_register; xprt_unregister;
-
-    # Those are in the dynamic linker, but used by libc.so.
-    __libc_enable_secure; _dl_catch_error; _dl_check_all_versions;
-    _dl_debug_initialize; _dl_debug_state; _dl_default_scope;
-    _dl_global_scope_end; _dl_init_next; _dl_lookup_symbol;
-    _dl_map_object; _dl_map_object_deps; _dl_object_relocation_scope;
-    _dl_relocate_object; _dl_signal_error; _dl_starting_up;
-    _dl_sysdep_start; _r_debug;
-    _dl_global_scope; _dl_lookup_symbol_skip;
-    _dl_lookup_versioned_symbol; _dl_lookup_versioned_symbol_skip;
-
-  local:
-    *;
-};
-
-GLIBC_2.1 {
-  global:
-    # global variables
-    _IO_2_1_stdin_; _IO_2_1_stdout_; _IO_2_1_stderr_;
-    __gconv_alias_db; __gconv_nmodules; __gconv_modules_db;
-    _dl_profile; _dl_profile_map; _dl_profile_output; _dl_start_profile;
-    __libc_stack_end;
-
-    # This is for ix86 only.
-    _fp_hw;
-
-    # variables in normal name space
-    getdate_err; in6addr_any; in6addr_loopback;
-
-    # functions used in inline functions or macros
-    __signbit; __signbitf; __signbitl; __libc_sa_len;
-
-    # functions used in other libraries
-    _IO_fclose; _IO_fopen; _IO_fdopen; __asprintf; __strcasestr;
-    __syscall_rt_sigqueueinfo;
-    __xstat64; __fxstat64; __lxstat64;
-    __pread64; __pwrite64;
-    __backtrace; __backtrace_symbols;
-    _dl_mcount; _dl_mcount_wrapper; __poll;
-
-    # helper functions
-    __libc_current_sigrtmin; __libc_current_sigrtmax; __libc_allocate_rtsig;
-    __libc_longjmp; __libc_siglongjmp;
-
-    # Since we have new signals this structure changed.
-    _sys_siglist; sys_siglist; sys_sigabbrev;
-
-    # Linux/Alpha 64-bit timeval functions.
-    __select; select;
-    adjtime; adjtimex; __adjtimex;
-    __gettimeofday;
-
-    # New errlist.
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-
-
-    # Changed getline function in libio.
-    _IO_getline_info;
-
-    # Special Pointer to avoid keyserv deadlock
-    __key_decryptsession_pk_LOCAL; __key_encryptsession_pk_LOCAL;
-    __key_gendes_LOCAL;
-
-    # chown interface change.
-    chown; glob; globfree;
-
-    # Change in pthread_attr_t.
-    pthread_attr_init;
-
-    # functions in normal name space
-    # Please keep them sorted by name!
-
-    # a*
-    addseverity; alphasort64;
-
-    argp_error; argp_failure; argp_help; argp_parse; argp_state_help;
-    argp_usage;
-
-    authdes_create; authdes_getucred; authdes_pk_create;
-
-    # b*
-    backtrace; backtrace_symbols;
-
-    # c*
-    capget; capset; cbc_crypt; creat64;
-
-    # d*
-    des_setparity;
-
-    # e*
-    ecb_crypt; endutxent;
-
-    # f*
-    fattach; fdetach;
-    fgetpos64; fmtmsg; fopen64; freopen64; fseeko; fseeko64; fsetpos64;
-    fstatfs64; fstatvfs; fstatvfs64; ftello; ftello64; ftruncate64; ftw64;
-    fopen; fclose; fdopen;
-
-    # g*
-    gai_strerror; getcontext; getdate; getdate_r; getitimer; getmsg;
-    getnameinfo; getnetname; getpmsg; getpt; getrlimit64; getrusage;
-    gettimeofday; getutxent; getutxid; getutxline; grantpt;
-
-    # New special glibc functions.
-    gnu_get_libc_release; gnu_get_libc_version;
-
-    # h*
-    host2netname;
-
-    # i*
-    iconv_open; iconv; iconv_close;
-    ieee_get_fp_control; ieee_set_fp_control;
-    if_freenameindex; if_indextoname; if_nameindex; if_nametoindex;
-    inet6_isipv4mapped; isastream; iswblank;
-
-    # k*
-    key_decryptsession; key_decryptsession_pk; key_encryptsession;
-    key_encryptsession_pk; key_gendes; key_get_conv; key_secretkey_is_set;
-    key_setnet; key_setsecret;
-
-    # l*
-    lockf64; lseek64;
-
-    # m*
-    makecontext; mmap64; mempcpy;
-
-    # n*
-    netname2host; netname2user; nftw; nftw64;
-
-    # o*
-    open64;
-
-    # p*
-    passwd2des; pread; pread64; printf_size; printf_size_info;
-    ptsname; ptsname_r; putmsg; putpmsg; pututxline; pwrite; pwrite64;
-
-    # r*
-    readdir64; readdir64_r; rtime;
-
-    # s*
-    scalbln; scalblnf; scalblnl;
-    scandir64; setitimer; setrlimit64; setutxent; settimeofday;
-    sighold; sigrelse; sigignore; sigset; statfs64; statvfs; statvfs64;
-    strcasestr; strtoimax; strtoumax; strverscmp; strfxtime;
-    swapcontext; sysv_signal;
-
-    # New RT signal functions.
-    sigqueue; sigtimedwait; sigwaitinfo;
-
-    # t*
-    tcgetsid; tdestroy; tmpfile64; truncate64;
-
-    # u*
-    unlockpt; updwtmpx; user2netname; utimes; utmpxname;
-
-    # v*
-    versionsort; versionsort64;
-
-    # w*
-    wait4; waitid; wcscasecmp; wcsncasecmp; wcsnlen; wcstoll;
-    wcstoimax; wcstoumax; wcstoull; wcswcs; wmemrtombs; wmemrtowcs;
-    wordexp; wordfree;
-
-    # x*
-    xdecrypt; xdr_authdes_cred; xdr_authdes_verf;
-    xdr_cryptkeyarg; xdr_cryptkeyarg2; xdr_cryptkeyres; xdr_des_block;
-    xdr_getcredres; xdr_key_netstarg; xdr_key_netstres;
-    xdr_keybuf; xdr_keystatus; xdr_netnamestr; xdr_sizeof; xdr_unixcred;
-
-} GLIBC_2.0;
diff --git a/libio/Versions b/libio/Versions
new file mode 100644
index 0000000000..ea58a29321
--- /dev/null
+++ b/libio/Versions
@@ -0,0 +1,103 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    _IO_list_all; _IO_stderr_; _IO_stdin_; _IO_stdout_;
+
+    # functions used in inline functions or macros
+    __getdelim;
+
+    # functions used in inline functions or macros
+    _IO_getc; _IO_peekc_unlocked; _IO_putc; _IO_feof; _IO_ferror;
+    __uflow; __underflow; __overflow;
+
+    # functions used in other libraries
+    __vsscanf; __vsnprintf;
+
+    # libio
+    _IO_adjust_column; _IO_clearerr; _IO_default_doallocate;
+    _IO_default_finish; _IO_default_pbackfail; _IO_default_uflow;
+    _IO_default_xsgetn; _IO_default_xsputn; _IO_do_write;
+    _IO_doallocbuf; _IO_fclose; _IO_fdopen; _IO_feof; _IO_ferror;
+    _IO_fflush; _IO_fgetc; _IO_fgetpos; _IO_fgets; _IO_file_attach;
+    _IO_file_close; _IO_file_close_it; _IO_file_doallocate;
+    _IO_file_fopen; _IO_file_init; _IO_file_jumps; _IO_file_open;
+    _IO_file_overflow; _IO_file_read; _IO_file_seek; _IO_file_seekoff;
+    _IO_file_setbuf; _IO_file_stat; _IO_file_sync; _IO_file_underflow;
+    _IO_file_write; _IO_file_xsputn; _IO_fileno; _IO_flockfile;
+    _IO_flush_all; _IO_flush_all_linebuffered; _IO_fopen; _IO_fprintf;
+    _IO_fputs; _IO_fread; _IO_free_backup_area; _IO_freopen;
+    _IO_fscanf; _IO_fseek; _IO_fsetpos; _IO_ftell; _IO_ftrylockfile;
+    _IO_funlockfile; _IO_fwrite; _IO_getc; _IO_getline; _IO_gets;
+    _IO_init; _IO_init_marker; _IO_link_in; _IO_marker_delta;
+    _IO_marker_difference; _IO_padn; _IO_pclose; _IO_peekc_locked;
+    _IO_perror; _IO_popen; _IO_printf; _IO_proc_close; _IO_proc_open;
+    _IO_putc; _IO_puts; _IO_remove_marker; _IO_rewind; _IO_scanf;
+    _IO_seekmark; _IO_seekoff; _IO_seekpos; _IO_setb; _IO_setbuf;
+    _IO_setbuffer; _IO_setlinebuf; _IO_setvbuf; _IO_sgetn;
+    _IO_sprintf; _IO_sputbackc; _IO_sscanf; _IO_str_init_readonly;
+    _IO_str_init_static; _IO_str_overflow; _IO_str_pbackfail;
+    _IO_str_seekoff; _IO_str_underflow; _IO_sungetc;
+    _IO_switch_to_get_mode; _IO_un_link; _IO_ungetc;
+    _IO_unsave_markers; _IO_vfprintf; _IO_vfscanf; _IO_vsprintf;
+
+    # variables in normal name space
+    stderr; stdin; stdout;
+
+    # a*
+    asprintf;
+
+    # c*
+    clearerr; clearerr_unlocked;
+
+    # d*
+    dprintf;
+
+    # f*
+    fclose; fcloseall; fdopen; feof; feof_locked; feof_unlocked; ferror;
+    ferror_locked; ferror_unlocked; fflush; fflush_locked; fflush_unlocked;
+    fgetc; fgetpos; fgets; fileno; fileno_locked; fileno_unlocked; flockfile;
+    fopen; fopencookie; fprintf; fputc; fputc_locked; fputc_unlocked; fputs;
+    fread; freopen; fscanf; fseek; fsetpos; ftell; ftrylockfile; funlockfile;
+    fwrite;
+
+    # g*
+    getc; getc_locked; getc_unlocked; getchar; getchar_unlocked; getdelim;
+    getline; gets; getw;
+
+    # o*
+    obstack_printf; obstack_vprintf; open_memstream;
+
+    # p*
+    pclose; popen; printf; putc; putc_locked; putc_unlocked; putchar;
+    putchar_unlocked; puts;
+
+    # p*
+    putw; rewind;
+
+    # s*
+    scanf; setbuf; setbuffer; setlinebuf;
+
+    # s*
+    setvbuf; snprintf; sprintf; sscanf;
+
+    # u*
+    ungetc;
+
+    # v*
+    vasprintf; vdprintf; vprintf; vscanf; vsnprintf; vsprintf; vsscanf;
+  }
+  GLIBC_2.1 {
+    # global variables
+    _IO_2_1_stdin_; _IO_2_1_stdout_; _IO_2_1_stderr_;
+
+    # functions used in other libraries
+    _IO_fclose; _IO_fopen; _IO_fdopen; __asprintf;
+
+    # Changed getline function in libio.
+    _IO_getline_info;
+
+    # f*
+    fgetpos64; fopen64; freopen64; fseeko; fseeko64; fsetpos64; ftello;
+    ftello64; fopen; fclose; fdopen;
+  }
+}
diff --git a/linuxthreads/libpthread.map b/linuxthreads/Versions
index 8174f7d95d..4c36f2c393 100644
--- a/linuxthreads/libpthread.map
+++ b/linuxthreads/Versions
@@ -1,5 +1,23 @@
-GLIBC_2.0 {
-  global:
+libc {
+  GLIBC_2.0 {
+    pthread_attr_destroy; pthread_attr_getdetachstate;
+    pthread_attr_getinheritsched; pthread_attr_getschedparam;
+    pthread_attr_getschedpolicy; pthread_attr_getscope; pthread_attr_init;
+    pthread_attr_setdetachstate; pthread_attr_setinheritsched;
+    pthread_attr_setschedparam; pthread_attr_setschedpolicy;
+    pthread_attr_setscope; pthread_cond_broadcast; pthread_cond_destroy;
+    pthread_cond_init; pthread_cond_signal; pthread_cond_wait;
+    pthread_condattr_destroy; pthread_condattr_init; pthread_equal;
+    pthread_exit; pthread_getschedparam; pthread_mutex_destroy;
+    pthread_mutex_init; pthread_mutex_lock; pthread_mutex_unlock;
+    pthread_mutexattr_getkind_np; pthread_mutexattr_setkind_np;
+    pthread_self; pthread_setcancelstate; pthread_setcanceltype;
+    pthread_setschedparam;
+  }
+}
+
+libpthread {
+  GLIBC_2.0 {
     # Hidden entry point (through macros).
     _pthread_cleanup_pop; _pthread_cleanup_pop_restore; _pthread_cleanup_push;
     _pthread_cleanup_push_defer;
@@ -53,14 +71,8 @@ GLIBC_2.0 {
 
     # The error functions.
     __errno_location; __h_errno_location;
-
-  local:
-    *;
-};
-
-
-GLIBC_2.1 {
-  global:
+  }
+  GLIBC_2.1 {
     # Functions with changed interface.
     pthread_attr_init; pthread_create;
 
@@ -76,4 +88,5 @@ GLIBC_2.1 {
     pthread_attr_getstacksize; pthread_attr_setstacksize;
 
     pthread_getconcurrency; pthread_setconcurrency;
-} GLIBC_2.0;
+  }
+}
diff --git a/locale/Versions b/locale/Versions
new file mode 100644
index 0000000000..bccb3cbb9d
--- /dev/null
+++ b/locale/Versions
@@ -0,0 +1,29 @@
+libBrokenLocale {
+  GLIBC_2.0 {
+    __ctype_get_mb_cur_max;
+  }
+}
+
+libc {
+  GLIBC_2.0 {
+    # global variables
+    __collate_element_hash; __collate_element_strings;
+    __collate_symbol_classes; __collate_symbol_hash; __collate_symbol_strings;
+    _libc_intl_domainname; _nl_current_LC_COLLATE; _nl_current_LC_CTYPE;
+
+    # functions from the experimental locale implementation
+    __*_l; __newlocale; __duplocale; __freelocale;
+
+    # functions used in inline functions or macros
+    __ctype_get_mb_cur_max;
+
+    # l*
+    localeconv;
+
+    # n*
+    nl_langinfo;
+
+    # s*
+    setlocale;
+  }
+}
diff --git a/locale/libBrokenLocale.map b/locale/libBrokenLocale.map
deleted file mode 100644
index b96a65c4c0..0000000000
--- a/locale/libBrokenLocale.map
+++ /dev/null
@@ -1,7 +0,0 @@
-GLIBC_2.0 {
-  global:
-    __ctype_get_mb_cur_max;
-
-  local:
-    *;
-};
diff --git a/login/Versions b/login/Versions
new file mode 100644
index 0000000000..b7cc90c7da
--- /dev/null
+++ b/login/Versions
@@ -0,0 +1,41 @@
+libc {
+  GLIBC_2.0 {
+    # e*
+    endutent;
+
+    # g*
+    getlogin; getlogin_r; getutent; getutent_r; getutid; getutid_r; getutline;
+    getutline_r;
+
+    # p*
+    pututline;
+
+    # s*
+    setutent;
+
+    # u*
+    updwtmp; utmpname;
+  }
+  GLIBC_2.1 {
+    # e*
+    endutxent;
+
+    # g*
+    getpt; getutxent; getutxid; getutxline; grantpt;
+
+    # p*
+    ptsname; ptsname_r; pututxline;
+
+    # s*
+    setutxent;
+
+    # u*
+    unlockpt; updwtmpx; utmpxname;
+  }
+}
+
+libutil {
+  GLIBC_2.0 {
+    forkpty; login; login_tty; logout; logwtmp; openpty;
+  }
+}
diff --git a/login/libutil.map b/login/libutil.map
deleted file mode 100644
index 3063790dd0..0000000000
--- a/login/libutil.map
+++ /dev/null
@@ -1,7 +0,0 @@
-GLIBC_2.0 {
-  global:
-    forkpty; login; login_tty; logout; logwtmp; openpty;
-
-  local:
-    *;
-};
diff --git a/malloc/Versions b/malloc/Versions
new file mode 100644
index 0000000000..9cbec55846
--- /dev/null
+++ b/malloc/Versions
@@ -0,0 +1,47 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    _obstack;
+
+    # interface of malloc functions
+    __libc_calloc; __libc_free; __libc_mallinfo; __libc_malloc;
+    __libc_mallopt; __libc_memalign; __libc_pvalloc; __libc_realloc;
+    __libc_valloc;
+    __malloc_initialize_hook; __free_hook; __malloc_hook; __realloc_hook;
+    __memalign_hook; __after_morecore_hook;
+    __malloc_initialized; __default_morecore; __morecore;
+
+    # functions used in inline functions or macros
+    _obstack_allocated_p; _obstack_begin; _obstack_begin_1;
+    _obstack_free; _obstack_memory_used; _obstack_newchunk;
+
+    # variables in normal name space
+    mallwatch; obstack_alloc_failed_handler; obstack_exit_failure;
+
+    # c*
+    calloc; cfree;
+
+    # f*
+    free;
+
+    # m*
+    mallinfo; malloc; malloc_get_state; malloc_set_state; malloc_stats;
+    malloc_trim; malloc_usable_size; mallopt; memalign; mprobe; mtrace;
+    muntrace;
+
+    # o*
+    obstack_free;
+
+    # p*
+    pvalloc;
+
+    # r*
+    realloc;
+
+    # t*
+    tr_break;
+
+    # v*
+    valloc;
+  }
+}
diff --git a/math/libm.map b/math/Versions
index 3fc4167213..9c71d3233d 100644
--- a/math/libm.map
+++ b/math/Versions
@@ -1,5 +1,35 @@
-GLIBC_2.0 {
-  global:
+libc {
+  GLIBC_2.0 {
+    # functions used in inline functions or macros
+    __isnan; __isnanf; __isnanl; __finite; __finitef; __finitel;
+    __isinf; __isinff; __isinfl;
+
+    # c*
+    copysign; copysignf; copysignl;
+
+    # f*
+    finite; finitef; finitel; frexp; frexpf; frexpl;
+
+    # i*
+    isinf; isinff; isinfl; isnan; isnanf; isnanl; ldexp; ldexpf; ldexpl;
+
+    # m*
+    modf; modff; modfl;
+
+    # s*
+    scalbn; scalbnf; scalbnl;
+  }
+  GLIBC_2.1 {
+    # functions used in inline functions or macros
+    __signbit; __signbitf; __signbitl;
+
+    # s*
+    scalbln; scalblnf; scalblnl;
+  }
+}
+
+libm {
+  GLIBC_2.0 {
     # mathematical functions
     acos; acosf; acosl;
     acosh; acoshf; acoshl;
@@ -61,15 +91,8 @@ GLIBC_2.0 {
 
     # functions used in inline functions or macros
     __log1p; __atan2;
-
-  local:
-    *;
-};
-
-
-GLIBC_2.1 {
-  global:
-
+  }
+  GLIBC_2.1 {
     # mathematical functions
     exp2; exp2f; exp2l;
     exp10; exp10f; exp10l;
@@ -131,5 +154,5 @@ GLIBC_2.1 {
 
     # symbols used in macros from sysdeps/powerpc/bits/fenv.h
     __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
-
-} GLIBC_2.0;
+  }
+}
diff --git a/md5-crypt/Makefile b/md5-crypt/Makefile
index 27a8b0098a..40186eceef 100644
--- a/md5-crypt/Makefile
+++ b/md5-crypt/Makefile
@@ -66,7 +66,7 @@ libmd5crypt: $(objpfx)libmd5crypt.so
 # drop in replacement.
 LDFLAGS-md5crypt.so = -Wl,-soname=lib$(libprefix)crypt.so$(libcrypt.so-version)
 # We also use the same version script.
-libmd5crypt-map := libcrypt.map
+libmd5crypt-map := $(common-objpfx)libcrypt.map
 endif
 
 define o-iterator-doit
diff --git a/md5-crypt/libcrypt.map b/md5-crypt/Versions
index 9e0c20792f..389e7d544a 100644
--- a/md5-crypt/libcrypt.map
+++ b/md5-crypt/Versions
@@ -1,7 +1,5 @@
-GLIBC_2.0 {
-  global:
+libcrypt {
+  GLIBC_2.0 {
     crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r;
-
-  local:
-    *;
-};
+  }
+}
diff --git a/misc/Versions b/misc/Versions
new file mode 100644
index 0000000000..abde3e713c
--- /dev/null
+++ b/misc/Versions
@@ -0,0 +1,102 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    ___brk_addr; __curbrk; __progname; __progname_full;
+
+    # functions which have an additional interface since they are
+    # are cancelable.
+    __libc_fsync; __libc_msync;
+
+    # interface of malloc functions
+    __sbrk; __getpagesize;
+
+    # functions used in other libraries
+    __select;
+
+    # variables in normal name space
+    error_message_count; error_one_per_line; error_print_progname;
+
+    # variables in normal name space
+    loc1; loc2; locs;
+    program_invocation_name; program_invocation_short_name;
+
+    # a*
+    acct; addmntent; advance;
+
+    # c*
+    chflags; chroot; closelog;
+
+    # d*
+    daemon; dirname;
+
+    # e*
+    ecvt; ecvt_r; endfsent; endmntent; endttyent; endusershell;
+
+    # e*
+    err; error; error_at_line; errx;
+
+    # f*
+    fchflags; fcvt; fcvt_r; fdatasync; fsync; ftruncate;
+
+    # g*
+    gcvt; get_avphys_pages; get_nprocs; get_nprocs_conf; get_phys_pages;
+    getfsent; getfsfile; getfsspec; gethostid; gethostname; getmntent;
+    getmntent_r; getpagesize; getpass; getttyent; getttynam; getusershell;
+    gtty;
+
+    # h*
+    hasmntopt; hcreate; hcreate_r; hdestroy; hdestroy_r; hsearch; hsearch_r;
+
+    # i*
+    insque; ioctl;
+
+    # j*
+    jrand48; jrand48_r; lfind; lsearch;
+
+    # m*
+    madvise; mkstemp; mktemp; mlock; mlockall; mmap; mount; mprotect; msync;
+    munlock; munlockall; munmap;
+
+    # o*
+    openlog;
+
+    # p*
+    ptrace;
+
+    # q*
+    qecvt; qecvt_r; qfcvt; qfcvt_r; qgcvt;
+
+    # r*
+    readv; remque; revoke;
+
+    # s*
+    select; setdomainname; setfsent; sethostent; sethostid; sethostname;
+    setlogmask; setmntent; setregid; setreuid; setttyent; setusershell; sstk;
+    stty; sync; syscall; syslog;
+
+    # t*
+    tdelete; tfind; truncate; tsearch; ttyslot; twalk;
+
+    # u*
+    ualarm; usleep; ustat; utimes;
+
+    # v*
+    verr; verrx; vhangup; vsyslog; vwarn; vwarnx;
+
+    # w*
+    warn; warnx;
+
+    # w*
+    writev;
+  }
+  GLIBC_2.1 {
+    # f*
+    ftruncate64;
+
+    # m*
+    mmap64;
+
+    # t*
+    tdestroy; truncate64;
+  }
+}
diff --git a/nis/Makefile b/nis/Makefile
index 30d356dcb2..c736b5a59a 100644
--- a/nis/Makefile
+++ b/nis/Makefile
@@ -53,7 +53,6 @@ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
 		  nis_modify nis_remove nis_add nis_defaults\
 		  nis_findserv nis_callback nis_clone_dir nis_clone_obj\
 		  nis_clone_res
-libnsl-map	= libnsl.map
 
 libnss_compat-routines	:= $(addprefix compat-,grp pwd spwd initgroups) \
 			   nisplus-parser
diff --git a/nis/Versions b/nis/Versions
new file mode 100644
index 0000000000..aa2df3a048
--- /dev/null
+++ b/nis/Versions
@@ -0,0 +1,121 @@
+libnsl {
+  GLIBC_2.0 {
+    # Many programs expect this, but every user program should
+    # have it's own version, since the interface is different on
+    # various platforms.
+    xdr_domainname;       xdr_keydat;          xdr_mapname;
+    xdr_peername;         xdr_valdat;          xdr_yp_buf;
+    xdr_ypbind_binding;   xdr_ypbind_resp;     xdr_ypbind_resptype;
+    xdr_ypbind_setdom;    xdr_ypdelete_args;   xdr_ypmap_parms;
+    xdr_ypmaplist;        xdr_yppush_status;   xdr_yppushresp_xfr;
+    xdr_ypreq_key;        xdr_ypreq_nokey;     xdr_ypreq_xfr;
+    xdr_ypresp_all;       xdr_ypresp_key_val;  xdr_ypresp_maplist;
+    xdr_ypresp_master;    xdr_ypresp_order;    xdr_ypresp_val;
+    xdr_ypresp_xfr;       xdr_ypstat;          xdr_ypupdate_args;
+    xdr_ypxfrstat;
+
+    __yp_check;
+    yp_all;               yp_bind;             yp_first;
+    yp_get_default_domain; yp_maplist;         yp_master;
+    yp_match;             yp_next;             yp_order;
+    yp_unbind;            yp_update;           ypbinderr_string;
+    yperr_string;         ypprot_err;
+  }
+  GLIBC_2.1 {
+    nis_add;              nis_add_entry;       nis_addmember;
+    nis_checkpoint;       nis_clone_directory; nis_clone_object;
+    nis_clone_result;     nis_creategroup;     nis_destroy_object;
+    nis_destroygroup;     nis_dir_cmp;         nis_domain_of;
+    nis_domain_of_r;      nis_first_entry;     nis_free_directory;
+    nis_free_object;      nis_free_request;    nis_freenames;
+    nis_freeresult;       nis_freeservlist;    nis_freetags;
+    nis_getnames;         nis_getservlist;     nis_ismember;
+    nis_leaf_of;          nis_leaf_of_r;       nis_lerror;
+    nis_list;             nis_local_directory; nis_local_group;
+    nis_local_host;       nis_local_principal; nis_lookup;
+    nis_mkdir;            nis_modify;          nis_modify_entry;
+    nis_name_of;          nis_name_of_r;       nis_next_entry;
+    nis_perror;           nis_ping;            nis_print_directory;
+    nis_print_entry;      nis_print_group;     nis_print_group_entry;
+    nis_print_link;       nis_print_object;    nis_print_result;
+    nis_print_rights;     nis_print_table;     nis_read_obj;
+    nis_remove;           nis_remove_entry;    nis_removemember;
+    nis_rmdir;            nis_servstate;       nis_sperrno;
+    nis_sperror;          nis_sperror_r;       nis_stats;
+    nis_verifygroup;      nis_write_obj;
+
+    xdr_cback_data;       xdr_obj_p;
+
+    # This functions are needed by the NIS+ tools and rpc.nisd,
+    # they should never be used in a normal user program !
+    __do_niscall2;        __free_fdresult;     __nis_default_access;
+    __nis_default_group;  __nis_default_owner; __nis_default_ttl;
+    __nis_finddirectory;  __nis_hash;
+    readColdStartFile;    writeColdStartFile;
+  }
+}
+
+libnss_compat {
+  GLIBC_2.0 {
+    _nss_compat_endgrent; _nss_compat_endpwent; _nss_compat_endspent;
+    _nss_compat_getgrent_r; _nss_compat_getgrgid_r; _nss_compat_getgrnam_r;
+    _nss_compat_getpwent_r; _nss_compat_getpwnam_r; _nss_compat_getpwuid_r;
+    _nss_compat_getspent_r; _nss_compat_getspnam_r; _nss_compat_initgroups;
+    _nss_compat_setgrent; _nss_compat_setpwent; _nss_compat_setspent;
+  }
+}
+
+libnss_nis {
+  GLIBC_2.0 {
+    _nss_nis_endaliasent; _nss_nis_endetherent; _nss_nis_endgrent;
+    _nss_nis_endhostent; _nss_nis_endnetent; _nss_nis_endnetgrent;
+    _nss_nis_endprotoent; _nss_nis_endpwent; _nss_nis_endrpcent;
+    _nss_nis_endservent; _nss_nis_endspent; _nss_nis_getaliasbyname_r;
+    _nss_nis_getaliasent_r; _nss_nis_getetherent_r; _nss_nis_getgrent_r;
+    _nss_nis_getgrgid_r; _nss_nis_getgrnam_r; _nss_nis_gethostbyaddr_r;
+    _nss_nis_gethostbyname2_r; _nss_nis_gethostbyname_r; _nss_nis_gethostent_r;
+    _nss_nis_gethostton_r; _nss_nis_getnetbyaddr_r; _nss_nis_getnetbyname_r;
+    _nss_nis_getnetent_r; _nss_nis_getnetgrent_r; _nss_nis_getntohost_r;
+    _nss_nis_getprotobyname_r; _nss_nis_getprotobynumber_r;
+    _nss_nis_getprotoent_r; _nss_nis_getpublickey; _nss_nis_getpwent_r;
+    _nss_nis_getpwnam_r; _nss_nis_getpwuid_r; _nss_nis_getrpcbyname_r;
+    _nss_nis_getrpcbynumber_r; _nss_nis_getrpcent_r; _nss_nis_getsecretkey;
+    _nss_nis_getservbyname_r; _nss_nis_getservbyport_r; _nss_nis_getservent_r;
+    _nss_nis_getspent_r; _nss_nis_getspnam_r; _nss_nis_initgroups;
+    _nss_nis_netname2user; _nss_nis_setaliasent; _nss_nis_setetherent;
+    _nss_nis_setgrent; _nss_nis_sethostent; _nss_nis_setnetent;
+    _nss_nis_setnetgrent; _nss_nis_setprotoent; _nss_nis_setpwent;
+    _nss_nis_setrpcent; _nss_nis_setservent; _nss_nis_setspent;
+  }
+}
+
+libnss_nisplus {
+  GLIBC_2.1 {
+    _nss_nisplus_endaliasent; _nss_nisplus_endetherent; _nss_nisplus_endgrent;
+    _nss_nisplus_endhostent; _nss_nisplus_endnetent; _nss_nisplus_endnetgrent;
+    _nss_nisplus_endprotoent; _nss_nisplus_endpwent; _nss_nisplus_endrpcent;
+    _nss_nisplus_endservent; _nss_nisplus_endspent;
+    _nss_nisplus_getaliasbyname_r; _nss_nisplus_getaliasent_r;
+    _nss_nisplus_getetherent_r; _nss_nisplus_getgrent_r;
+    _nss_nisplus_getgrgid_r; _nss_nisplus_getgrnam_r;
+    _nss_nisplus_gethostbyaddr_r; _nss_nisplus_gethostbyname2_r;
+    _nss_nisplus_gethostbyname_r; _nss_nisplus_gethostent_r;
+    _nss_nisplus_gethostton_r; _nss_nisplus_getnetbyaddr_r;
+    _nss_nisplus_getnetbyname_r; _nss_nisplus_getnetent_r;
+    _nss_nisplus_getnetgrent_r; _nss_nisplus_getntohost_r;
+    _nss_nisplus_getprotobyname_r; _nss_nisplus_getprotobynumber_r;
+    _nss_nisplus_getprotoent_r; _nss_nisplus_getpublickey;
+    _nss_nisplus_getpwent_r; _nss_nisplus_getpwnam_r; _nss_nisplus_getpwuid_r;
+    _nss_nisplus_getrpcbyname_r; _nss_nisplus_getrpcbynumber_r;
+    _nss_nisplus_getrpcent_r; _nss_nisplus_getsecretkey;
+    _nss_nisplus_getservbyname_r; _nss_nisplus_getservbynumber_r;
+    _nss_nisplus_getservent_r; _nss_nisplus_getspent_r;
+    _nss_nisplus_getspnam_r; _nss_nisplus_netname2user;
+    _nss_nisplus_parse_grent; _nss_nisplus_parse_pwent;
+    _nss_nisplus_parse_spent; _nss_nisplus_setaliasent;
+    _nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent;
+    _nss_nisplus_setnetent; _nss_nisplus_setnetgrent; _nss_nisplus_setprotoent;
+    _nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent;
+    _nss_nisplus_setspent;
+  }
+}
diff --git a/nis/libnsl.map b/nis/libnsl.map
deleted file mode 100644
index 9d0efd0567..0000000000
--- a/nis/libnsl.map
+++ /dev/null
@@ -1,62 +0,0 @@
-GLIBC_2.0 {
-  global:
-
-    # Many programs expect this, but every user program should
-    # have it's own version, since the interface is different on
-    # various platforms.
-    xdr_domainname;       xdr_keydat;          xdr_mapname;
-    xdr_peername;         xdr_valdat;          xdr_yp_buf;
-    xdr_ypbind_binding;   xdr_ypbind_resp;     xdr_ypbind_resptype;
-    xdr_ypbind_setdom;    xdr_ypdelete_args;   xdr_ypmap_parms;
-    xdr_ypmaplist;        xdr_yppush_status;   xdr_yppushresp_xfr;
-    xdr_ypreq_key;        xdr_ypreq_nokey;     xdr_ypreq_xfr;
-    xdr_ypresp_all;       xdr_ypresp_key_val;  xdr_ypresp_maplist;
-    xdr_ypresp_master;    xdr_ypresp_order;    xdr_ypresp_val;
-    xdr_ypresp_xfr;       xdr_ypstat;          xdr_ypupdate_args;
-    xdr_ypxfrstat;
-
-    __yp_check;
-    yp_all;               yp_bind;             yp_first;
-    yp_get_default_domain; yp_maplist;         yp_master;
-    yp_match;             yp_next;             yp_order;
-    yp_unbind;            yp_update;           ypbinderr_string;
-    yperr_string;         ypprot_err;
-
-  local:
-    *;
-};
-
-GLIBC_2.1 {
-  global:
-
-    nis_add;              nis_add_entry;       nis_addmember;
-    nis_checkpoint;       nis_clone_directory; nis_clone_object;
-    nis_clone_result;     nis_creategroup;     nis_destroy_object;
-    nis_destroygroup;     nis_dir_cmp;         nis_domain_of;
-    nis_domain_of_r;      nis_first_entry;     nis_free_directory;
-    nis_free_object;      nis_free_request;    nis_freenames;
-    nis_freeresult;       nis_freeservlist;    nis_freetags;
-    nis_getnames;         nis_getservlist;     nis_ismember;
-    nis_leaf_of;          nis_leaf_of_r;       nis_lerror;
-    nis_list;             nis_local_directory; nis_local_group;
-    nis_local_host;       nis_local_principal; nis_lookup;
-    nis_mkdir;            nis_modify;          nis_modify_entry;
-    nis_name_of;          nis_name_of_r;       nis_next_entry;
-    nis_perror;           nis_ping;            nis_print_directory;
-    nis_print_entry;      nis_print_group;     nis_print_group_entry;
-    nis_print_link;       nis_print_object;    nis_print_result;
-    nis_print_rights;     nis_print_table;     nis_read_obj;
-    nis_remove;           nis_remove_entry;    nis_removemember;
-    nis_rmdir;            nis_servstate;       nis_sperrno;
-    nis_sperror;          nis_sperror_r;       nis_stats;
-    nis_verifygroup;      nis_write_obj;
-
-    xdr_cback_data;       xdr_obj_p;
-
-    # This functions are needed by the NIS+ tools and rpc.nisd,
-    # they should never be used in a normal user program !
-    __do_niscall2;        __free_fdresult;     __nis_default_access;
-    __nis_default_group;  __nis_default_owner; __nis_default_ttl;
-    __nis_finddirectory;  __nis_hash;
-    readColdStartFile;    writeColdStartFile;
-} GLIBC_2.0;
diff --git a/nis/libnss_compat.map b/nis/libnss_compat.map
deleted file mode 100644
index 6178bb903a..0000000000
--- a/nis/libnss_compat.map
+++ /dev/null
@@ -1,11 +0,0 @@
-GLIBC_2.0 {
-  global:
-    _nss_compat_endgrent; _nss_compat_endpwent; _nss_compat_endspent;
-    _nss_compat_getgrent_r; _nss_compat_getgrgid_r; _nss_compat_getgrnam_r;
-    _nss_compat_getpwent_r; _nss_compat_getpwnam_r; _nss_compat_getpwuid_r;
-    _nss_compat_getspent_r; _nss_compat_getspnam_r; _nss_compat_initgroups;
-    _nss_compat_setgrent; _nss_compat_setpwent; _nss_compat_setspent;
-
-  local:
-    *;
-};
diff --git a/nis/libnss_nis.map b/nis/libnss_nis.map
deleted file mode 100644
index 5d84fdcc6d..0000000000
--- a/nis/libnss_nis.map
+++ /dev/null
@@ -1,25 +0,0 @@
-GLIBC_2.0 {
-  global:
-    _nss_nis_endaliasent; _nss_nis_endetherent; _nss_nis_endgrent;
-    _nss_nis_endhostent; _nss_nis_endnetent; _nss_nis_endnetgrent;
-    _nss_nis_endprotoent; _nss_nis_endpwent; _nss_nis_endrpcent;
-    _nss_nis_endservent; _nss_nis_endspent; _nss_nis_getaliasbyname_r;
-    _nss_nis_getaliasent_r; _nss_nis_getetherent_r; _nss_nis_getgrent_r;
-    _nss_nis_getgrgid_r; _nss_nis_getgrnam_r; _nss_nis_gethostbyaddr_r;
-    _nss_nis_gethostbyname2_r; _nss_nis_gethostbyname_r; _nss_nis_gethostent_r;
-    _nss_nis_gethostton_r; _nss_nis_getnetbyaddr_r; _nss_nis_getnetbyname_r;
-    _nss_nis_getnetent_r; _nss_nis_getnetgrent_r; _nss_nis_getntohost_r;
-    _nss_nis_getprotobyname_r; _nss_nis_getprotobynumber_r;
-    _nss_nis_getprotoent_r; _nss_nis_getpublickey; _nss_nis_getpwent_r;
-    _nss_nis_getpwnam_r; _nss_nis_getpwuid_r; _nss_nis_getrpcbyname_r;
-    _nss_nis_getrpcbynumber_r; _nss_nis_getrpcent_r; _nss_nis_getsecretkey;
-    _nss_nis_getservbyname_r; _nss_nis_getservbyport_r; _nss_nis_getservent_r;
-    _nss_nis_getspent_r; _nss_nis_getspnam_r; _nss_nis_initgroups;
-    _nss_nis_netname2user; _nss_nis_setaliasent; _nss_nis_setetherent;
-    _nss_nis_setgrent; _nss_nis_sethostent; _nss_nis_setnetent;
-    _nss_nis_setnetgrent; _nss_nis_setprotoent; _nss_nis_setpwent;
-    _nss_nis_setrpcent; _nss_nis_setservent; _nss_nis_setspent;
-
-  local:
-    *;
-};
diff --git a/nis/libnss_nisplus.map b/nis/libnss_nisplus.map
deleted file mode 100644
index 07f4660758..0000000000
--- a/nis/libnss_nisplus.map
+++ /dev/null
@@ -1,32 +0,0 @@
-GLIBC_2.1 {
-  global:
-    _nss_nisplus_endaliasent; _nss_nisplus_endetherent; _nss_nisplus_endgrent;
-    _nss_nisplus_endhostent; _nss_nisplus_endnetent; _nss_nisplus_endnetgrent;
-    _nss_nisplus_endprotoent; _nss_nisplus_endpwent; _nss_nisplus_endrpcent;
-    _nss_nisplus_endservent; _nss_nisplus_endspent;
-    _nss_nisplus_getaliasbyname_r; _nss_nisplus_getaliasent_r;
-    _nss_nisplus_getetherent_r; _nss_nisplus_getgrent_r;
-    _nss_nisplus_getgrgid_r; _nss_nisplus_getgrnam_r;
-    _nss_nisplus_gethostbyaddr_r; _nss_nisplus_gethostbyname2_r;
-    _nss_nisplus_gethostbyname_r; _nss_nisplus_gethostent_r;
-    _nss_nisplus_gethostton_r; _nss_nisplus_getnetbyaddr_r;
-    _nss_nisplus_getnetbyname_r; _nss_nisplus_getnetent_r;
-    _nss_nisplus_getnetgrent_r; _nss_nisplus_getntohost_r;
-    _nss_nisplus_getprotobyname_r; _nss_nisplus_getprotobynumber_r;
-    _nss_nisplus_getprotoent_r; _nss_nisplus_getpublickey;
-    _nss_nisplus_getpwent_r; _nss_nisplus_getpwnam_r; _nss_nisplus_getpwuid_r;
-    _nss_nisplus_getrpcbyname_r; _nss_nisplus_getrpcbynumber_r;
-    _nss_nisplus_getrpcent_r; _nss_nisplus_getsecretkey;
-    _nss_nisplus_getservbyname_r; _nss_nisplus_getservbynumber_r;
-    _nss_nisplus_getservent_r; _nss_nisplus_getspent_r;
-    _nss_nisplus_getspnam_r; _nss_nisplus_netname2user;
-    _nss_nisplus_parse_grent; _nss_nisplus_parse_pwent;
-    _nss_nisplus_parse_spent; _nss_nisplus_setaliasent;
-    _nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent;
-    _nss_nisplus_setnetent; _nss_nisplus_setnetgrent; _nss_nisplus_setprotoent;
-    _nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent;
-    _nss_nisplus_setspent;
-
-  local:
-    *;
-};
diff --git a/nss/libnss_files.map b/nss/Versions
index 8daa75f5bb..217f4da7a2 100644
--- a/nss/libnss_files.map
+++ b/nss/Versions
@@ -1,5 +1,33 @@
-GLIBC_2.0 {
-  global:
+libc {
+  GLIBC_2.0 {
+     # functions used in other libraries
+    __nss_passwd_lookup; __nss_group_lookup; __nss_next;
+    _nss_files_parse_grent; _nss_files_parse_pwent; _nss_files_parse_spent;
+    __nss_database_lookup; __nss_configure_lookup;
+  }
+}
+
+libnss_db {
+  GLIBC_2.0 {
+    _nss_db_endaliasent; _nss_db_endetherent; _nss_db_endgrent;
+    _nss_db_endnetgrent; _nss_db_endprotoent; _nss_db_endpwent;
+    _nss_db_endrpcent; _nss_db_endservent; _nss_db_endspent;
+    _nss_db_getaliasbyname_r; _nss_db_getaliasent_r; _nss_db_getetherent_r;
+    _nss_db_getgrent_r; _nss_db_getgrgid_r; _nss_db_getgrnam_r;
+    _nss_db_gethostton_r; _nss_db_getnetgrent_r; _nss_db_getntohost_r;
+    _nss_db_getprotobyname_r; _nss_db_getprotobynumber_r;
+    _nss_db_getprotoent_r; _nss_db_getpwent_r; _nss_db_getpwnam_r;
+    _nss_db_getpwuid_r; _nss_db_getrpcbyname_r; _nss_db_getrpcbynumber_r;
+    _nss_db_getrpcent_r; _nss_db_getservbyname_r; _nss_db_getservbyport_r;
+    _nss_db_getservent_r; _nss_db_getspent_r; _nss_db_getspnam_r;
+    _nss_db_setaliasent; _nss_db_setetherent; _nss_db_setgrent;
+    _nss_db_setnetgrent; _nss_db_setprotoent; _nss_db_setpwent;
+    _nss_db_setrpcent; _nss_db_setservent; _nss_db_setspent;
+  }
+}
+
+libnss_files {
+  GLIBC_2.0 {
     _nss_files_setaliasent;
     _nss_files_endaliasent;
     _nss_files_getaliasbyname_r;
@@ -69,10 +97,9 @@ GLIBC_2.0 {
     _nss_files_getspnam_r;
 
     _nss_netgroup_parseline;
-
+  }
+  GLIBC_2.1 {
     _nss_files_getpublickey;
     _nss_files_getsecretkey;
-
-  local:
-    *;
-};
+  }
+}
diff --git a/nss/libnss_db.map b/nss/libnss_db.map
deleted file mode 100644
index f0765c7522..0000000000
--- a/nss/libnss_db.map
+++ /dev/null
@@ -1,20 +0,0 @@
-GLIBC_2.0 {
-  global:
-    _nss_db_endaliasent; _nss_db_endetherent; _nss_db_endgrent;
-    _nss_db_endnetgrent; _nss_db_endprotoent; _nss_db_endpwent;
-    _nss_db_endrpcent; _nss_db_endservent; _nss_db_endspent;
-    _nss_db_getaliasbyname_r; _nss_db_getaliasent_r; _nss_db_getetherent_r;
-    _nss_db_getgrent_r; _nss_db_getgrgid_r; _nss_db_getgrnam_r;
-    _nss_db_gethostton_r; _nss_db_getnetgrent_r; _nss_db_getntohost_r;
-    _nss_db_getprotobyname_r; _nss_db_getprotobynumber_r;
-    _nss_db_getprotoent_r; _nss_db_getpwent_r; _nss_db_getpwnam_r;
-    _nss_db_getpwuid_r; _nss_db_getrpcbyname_r; _nss_db_getrpcbynumber_r;
-    _nss_db_getrpcent_r; _nss_db_getservbyname_r; _nss_db_getservbyport_r;
-    _nss_db_getservent_r; _nss_db_getspent_r; _nss_db_getspnam_r;
-    _nss_db_setaliasent; _nss_db_setetherent; _nss_db_setgrent;
-    _nss_db_setnetgrent; _nss_db_setprotoent; _nss_db_setpwent;
-    _nss_db_setrpcent; _nss_db_setservent; _nss_db_setspent;
-
-  local:
-    *;
-};
diff --git a/posix/Versions b/posix/Versions
new file mode 100644
index 0000000000..049d232629
--- /dev/null
+++ b/posix/Versions
@@ -0,0 +1,80 @@
+libc {
+  GLIBC_2.0 {
+    # functions with special/multiple interfaces
+    __bsd_getpgrp; __setpgid; __getpgid;
+
+    # functions which have an additional interface since they are
+    # are cancelable.
+    __libc_wait; __libc_waitpid; __libc_pause; __libc_nanosleep;
+
+    # functions with required interface outside normal name space
+    _exit;
+
+    # functions used in other libraries
+    __sched_get_priority_max; __sched_get_priority_min;
+    __sched_getparam; __sched_getscheduler; __sched_setscheduler;
+    __sched_yield; __fork; __getpid; __wait;
+
+    # variables in normal name space
+    optarg; opterr; optind; optopt; re_max_failures; re_syntax_options;
+
+    # a*
+    alarm;
+
+    # c*
+    confstr;
+
+    # e*
+    execl; execle; execlp; execv; execve; execvp; fexecve;
+
+    # f*
+    fnmatch; fork; fpathconf; freeaddrinfo;
+
+    # g*
+    getaddrinfo; getdtablesize; getegid; geteuid; getgid; getopt; getopt_long;
+    getopt_long_only; getpgid; getpgrp; getpid; getppid; getsid; getuid; glob;
+    glob_pattern_p; globfree; group_member;
+
+    # n*
+    nanosleep;
+
+    # p*
+    pathconf; pause; pselect;
+
+    # r*
+    re_comp; re_compile_fastmap; re_compile_pattern; re_exec; re_match;
+    re_match_2; re_search; re_search_2; re_set_registers; re_set_syntax;
+    regcomp; regerror; regexec; regfree;
+
+    # s*
+    sched_get_priority_max; sched_get_priority_min; sched_getparam;
+    sched_getscheduler; sched_rr_get_interval; sched_setparam;
+    sched_setscheduler; sched_yield; setegid; seteuid; setgid; setlogin;
+    setpgid; setpgrp; setsid; setuid; sleep; sysconf;
+
+    # t*
+    times;
+
+    # u*
+    uname;
+
+    # v*
+    vfork;
+
+    # w*
+    wait; wait3; wait4; waitpid;
+  }
+  GLIBC_2.1 {
+    # functions used in other libraries
+    __pread64; __pwrite64;
+
+    # g*
+    gai_strerror; getnameinfo;
+
+    # p*
+    pread; pread64; pwrite; pwrite64;
+
+    # w*
+    waitid; wordexp; wordfree;
+  }
+}
diff --git a/pwd/Versions b/pwd/Versions
new file mode 100644
index 0000000000..45a750eb41
--- /dev/null
+++ b/pwd/Versions
@@ -0,0 +1,15 @@
+libc {
+  GLIBC_2.0 {
+    # e*
+    endpwent;
+
+    # f*
+    fgetpwent; fgetpwent_r;
+
+    # g*
+    getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r;
+
+    # p*
+    putpwent; setpwent;
+  }
+}
diff --git a/resolv/libresolv.map b/resolv/Versions
index 8cb621072a..112f55a19e 100644
--- a/resolv/libresolv.map
+++ b/resolv/Versions
@@ -1,5 +1,27 @@
-GLIBC_2.0 {
-  global:
+libc {
+  GLIBC_2.0 {
+    # global variables
+    _h_errno; _res;
+
+    # helper functions
+    __h_errno_location;
+
+    # functions used in other libraries
+    __res_randomid;
+
+    # variables in normal name space
+    h_errlist; h_errno; h_nerr;
+
+    # h*
+    herror; hstrerror;
+
+    # r*
+    res_init;
+  }
+}
+
+libresolv {
+  GLIBC_2.0 {
     _gethtbyaddr; _gethtbyname; _gethtbyname2; _gethtent; _getlong;
     _getshort; _res_opcodes; _res_resultcodes; _sethtent; dn_expand;
     inet_net_ntop; inet_net_pton; inet_neta; res_gethostbyaddr;
@@ -19,7 +41,13 @@ GLIBC_2.0 {
     __res_nameinquery; __res_ownok; __res_queriesmatch;
     __res_send;
     __sym_ntop; __sym_ntos; __sym_ston;
+  }
+}
 
-  local:
-    *;
-};
+libnss_dns {
+  GLIBC_2.0 {
+    _nss_dns_gethostbyaddr_r; _nss_dns_gethostbyname2_r;
+    _nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r;
+    _nss_dns_getnetbyname_r;
+  }
+}
diff --git a/resolv/libnss_dns.map b/resolv/libnss_dns.map
deleted file mode 100644
index 423cdf98bb..0000000000
--- a/resolv/libnss_dns.map
+++ /dev/null
@@ -1,9 +0,0 @@
-GLIBC_2.0 {
-  global:
-    _nss_dns_gethostbyaddr_r; _nss_dns_gethostbyname2_r;
-    _nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r;
-    _nss_dns_getnetbyname_r;
-
-  local:
-    *;
-};
diff --git a/resource/Versions b/resource/Versions
new file mode 100644
index 0000000000..caff6a2f50
--- /dev/null
+++ b/resource/Versions
@@ -0,0 +1,25 @@
+libc {
+  GLIBC_2.0 {
+    # g*
+    getpriority; getrlimit; getrusage;
+
+    # n*
+    nice;
+
+    # s*
+    setpriority; setrlimit;
+
+    # u*
+    ulimit;
+
+    # v*
+    vlimit; vtimes;
+  }
+  GLIBC_2.1 {
+    # g*
+    getrlimit64;
+
+    # s*
+    setrlimit64;
+  }
+}
diff --git a/rt/librt.map b/rt/Versions
index 13381ec800..abe9e33423 100644
--- a/rt/librt.map
+++ b/rt/Versions
@@ -1,11 +1,8 @@
-GLIBC_2.1 {
-  global:
-
+librt {
+  GLIBC_2.1 {
     # AIO functions.
     aio_cancel; aio_cancel64; aio_error; aio_error64; aio_fsync; aio_fsync64;
     aio_init; aio_read; aio_read64; aio_return; aio_return64; aio_suspend;
     aio_suspend64; aio_write; aio_write64; lio_listio; lio_listio64;
-
-  local:
-    *;
-};
+  }
+}
diff --git a/setjmp/Versions b/setjmp/Versions
new file mode 100644
index 0000000000..68292ee70a
--- /dev/null
+++ b/setjmp/Versions
@@ -0,0 +1,16 @@
+libc {
+  GLIBC_2.0 {
+    # functions with special/multiple interfaces
+    _longjmp; __sigsetjmp; _setjmp;
+
+    # l*
+    longjmp;
+
+    # s*
+    setjmp;
+  }
+  GLIBC_2.1 {
+    # helper functions
+    __libc_longjmp; __libc_siglongjmp;
+  }
+}
diff --git a/shadow/Versions b/shadow/Versions
new file mode 100644
index 0000000000..7a0dae565e
--- /dev/null
+++ b/shadow/Versions
@@ -0,0 +1,27 @@
+libc {
+  GLIBC_2.0 {
+    # e*
+    endspent;
+
+    # f*
+    fgetspent; fgetspent_r;
+
+    # g*
+    getspent; getspent_r; getspnam; getspnam_r;
+
+    # l*
+    lckpwdf;
+
+    # p*
+    putspent;
+
+    # s*
+    setspent;
+
+    # s*
+    sgetspent; sgetspent_r;
+
+    # u*
+    ulckpwdf;
+  }
+}
diff --git a/signal/Versions b/signal/Versions
new file mode 100644
index 0000000000..a24dc03aa6
--- /dev/null
+++ b/signal/Versions
@@ -0,0 +1,44 @@
+libc {
+  GLIBC_2.0 {
+    # functions with special/multiple interfaces
+    __sigaddset; __sigdelset; __sigismember; __sysv_signal;
+
+    # functions used in inline functions or macros
+    __sigpause;
+
+    # functions used in other libraries
+     __sigaction;
+
+    # b*
+    bsd_signal;
+
+    # g*
+    gsignal;
+
+    # k*
+    kill; killpg;
+
+    # p*
+    psignal;
+
+    # r*
+    raise;
+
+    # s*
+    sigaction; sigaddset; sigaltstack; sigandset; sigblock; sigdelset;
+    sigemptyset; sigfillset; siggetmask; siginterrupt; sigisemptyset;
+    sigismember; siglongjmp; signal; sigorset; sigpause; sigpending;
+    sigprocmask; sigreturn; sigsetmask; sigstack; sigsuspend; sigvec;
+    sigwait; ssignal;
+  }
+  GLIBC_2.1 {
+    # helper functions
+    __libc_current_sigrtmin; __libc_current_sigrtmax; __libc_allocate_rtsig;
+
+    # s*
+    sighold; sigrelse; sigignore; sigset; sysv_signal;
+
+    # New RT signal functions.
+    sigqueue; sigtimedwait; sigwaitinfo;
+  }
+}
diff --git a/socket/Versions b/socket/Versions
new file mode 100644
index 0000000000..36c7653ac3
--- /dev/null
+++ b/socket/Versions
@@ -0,0 +1,35 @@
+libc {
+  GLIBC_2.0 {
+    # functions which have an additional interface since they are
+    # are cancelable.
+    __libc_accept; __libc_send; __libc_recvfrom;
+    __libc_recvmsg; __libc_sendmsg; __libc_recv; __libc_sendto; __libc_connect;
+
+    # functions used in other libraries
+    __connect; __send;
+
+    # a*
+    accept;
+
+    # b*
+    bind;
+
+    # c*
+    connect;
+
+    # g*
+    getpeername; getsockname; getsockopt;
+
+    # i*
+    isfdtype;
+
+    # l*
+    listen;
+
+    # r*
+    recv; recvfrom; recvmsg;
+
+    # s*
+    send; sendmsg; sendto; setsockopt; socket; socketpair;
+  }
+}
diff --git a/stdio-common/Versions b/stdio-common/Versions
new file mode 100644
index 0000000000..5db571db92
--- /dev/null
+++ b/stdio-common/Versions
@@ -0,0 +1,35 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    _itoa_lower_digits; _itoa_upper_digits; _sys_errlist; _sys_nerr;
+    _sys_siglist;
+
+    # functions used in other libraries
+    __printf_fp; __vfscanf;
+
+    # variables in normal name space
+    sys_errlist; sys_nerr; sys_sigabbrev; sys_siglist;
+
+    # c*
+    ctermid; cuserid;
+
+    # p*
+    parse_printf_format; perror;
+
+    # r*
+    register_printf_function; remove; rename;
+
+    # t*
+    tempnam; tmpfile; tmpnam; tmpnam_r;
+
+    # v*
+    vfprintf; vfscanf;
+  }
+  GLIBC_2.1 {
+    # p*
+    printf_size; printf_size_info;
+
+    # t*
+    tmpfile64;
+  }
+}
diff --git a/stdio/Versions b/stdio/Versions
new file mode 100644
index 0000000000..5c6bbe35c5
--- /dev/null
+++ b/stdio/Versions
@@ -0,0 +1,6 @@
+libc {
+  GLIBC_2.0 {
+    # more or less standard functions
+    __fillbf; __flshfp;
+  }
+}
diff --git a/stdlib/Versions b/stdlib/Versions
new file mode 100644
index 0000000000..6e92552794
--- /dev/null
+++ b/stdlib/Versions
@@ -0,0 +1,86 @@
+libc {
+  GLIBC_2.0 {
+    # functions which have an additional interface since they are
+    # are cancelable.
+    __libc_system;
+
+    # functions with required interface outside normal name space
+    __xpg_basename;
+
+    # functions used in inline functions or macros
+    __strto*_internal;
+
+    # functions used in other libraries
+    __secure_getenv; __on_exit;
+
+    # a*
+    a64l; abort; abs; atexit; atof; atoi; atol; atoll;
+
+    # b*
+    bsearch;
+
+    # c*
+    canonicalize_file_name; clearenv;
+
+    # d*
+    div; drand48; drand48_r;
+
+    # e*
+    erand48; erand48_r; exit;
+
+    # g*
+    getenv; getsubopt;
+
+    # i*
+    initstate; initstate_r;
+
+    # l*
+    l64a; labs; lcong48; lcong48_r; ldiv; llabs; lldiv; lrand48; lrand48_r;
+
+    # m*
+    mblen; mbrlen; mbrtowc; mbsinit; mbsnrtowcs; mbsrtowcs; mbstowcs;
+    mbtowc; mcheck; mcount; mrand48; mrand48_r;
+
+    # n*
+    nrand48; nrand48_r;
+
+    # o*
+    on_exit;
+
+    # p*
+    putenv;
+
+    # q*
+    qsort;
+
+    # r*
+    rand; rand_r; random; random_r; realpath; rpmatch;
+
+    # s*
+    seed48; seed48_r; setcontext; setenv; setstate; setstate_r; srand; srand48;
+    srand48_r; srandom; srandom_r; step; strfmon; strtod; strtof; strtol;
+    strtold; strtoll; strtoq; strtoul; strtoull; strtouq; system;
+
+    # u*
+    unsetenv;
+
+    # w*
+    wcstombs; wctomb;
+  }
+  GLIBC_2.1 {
+    # a*
+    addseverity;
+
+    # f*
+    fmtmsg;
+
+    # g*
+    getcontext;
+
+    # m*
+    makecontext;
+
+    # s*
+    strtoimax; strtoumax; swapcontext;
+  }
+}
diff --git a/streams/Versions b/streams/Versions
new file mode 100644
index 0000000000..9a6f4d756c
--- /dev/null
+++ b/streams/Versions
@@ -0,0 +1,15 @@
+libc {
+  GLIBC_2.1 {
+    # f*
+    fattach; fdetach;
+
+    # g*
+    getmsg; getpmsg;
+
+    # i*
+    isastream;
+
+    # p*
+    putmsg; putpmsg;
+  }
+}
diff --git a/string/Versions b/string/Versions
new file mode 100644
index 0000000000..977413902d
--- /dev/null
+++ b/string/Versions
@@ -0,0 +1,53 @@
+libc {
+  GLIBC_2.0 {
+    # functions with required interface outside normal name space
+    __argz_count; __argz_stringify; __argz_next;
+
+    # functions used in inline functions or macros
+    __bzero; __strtok_r;
+
+    # functions used in other libraries
+    __stpncpy; __stpcpy; __strdup; __mempcpy; __strcasecmp; __strerror_r;
+    __ffs;
+
+    # a*
+    argz_add; argz_add_sep; argz_append; argz_count; argz_create;
+    argz_create_sep; argz_delete; argz_extract; argz_insert; argz_next;
+    argz_replace; argz_stringify;
+
+    # b*
+    basename; bcmp; bcopy; bzero;
+
+    # e*
+    envz_add; envz_entry; envz_get; envz_merge; envz_remove;
+    envz_strip;
+
+    # f*
+    ffs;
+
+    # i*
+    index;
+
+    # m*
+    memccpy; memchr; memcmp; memcpy; memfrob; memmem; memmove; memset;
+
+    # r*
+    rindex;
+
+    # s*
+    stpcpy; stpncpy; strcasecmp; strcat; strchr; strcmp; strcoll; strcpy;
+    strcspn; strdup; strerror; strerror_r; strfry; strlen; strncasecmp;
+    strncat; strncmp; strncpy; strndup; strnlen; strpbrk; strrchr; strsep;
+    strsignal; strspn; strstr; strtok; strtok_r; strxfrm; swab;
+  }
+  GLIBC_2.1 {
+    # functions used in other libraries
+    __strcasestr;
+
+    # m*
+    mempcpy;
+
+    # s*
+    strcasestr; strverscmp;
+  }
+}
diff --git a/sunrpc/Versions b/sunrpc/Versions
new file mode 100644
index 0000000000..d956486f9f
--- /dev/null
+++ b/sunrpc/Versions
@@ -0,0 +1,99 @@
+libc {
+  GLIBC_2.0 {
+    # global variables.
+    _null_auth;
+
+    # functions used in other libraries
+    _rpc_dtablesize; _seterr_reply;
+
+    # variables in normal name space
+    rpc_createerr; svc_fdset; svcauthdes_stats;
+
+    # a*
+    authnone_create; authunix_create; authunix_create_default;
+
+    # b*
+    bindresvport;
+
+    # c*
+    callrpc;
+    clnt_broadcast; clnt_create; clnt_pcreateerror; clnt_perrno;
+    clnt_perror; clnt_spcreateerror; clnt_sperrno; clnt_sperror;
+    clntraw_create; clnttcp_create; clntudp_bufcreate; clntudp_create;
+
+    # g*
+    get_myaddress; getpublickey; getsecretkey;
+
+    # p*
+    pmap_getmaps; pmap_getport; pmap_rmtcall; pmap_set; pmap_unset;
+
+    # r*
+    registerrpc;
+
+    # s*
+    svc_exit; svc_getreq; svc_getreqset; svc_register; svc_run;
+    svc_sendreply; svc_unregister; svcerr_auth; svcerr_decode;
+    svcerr_noproc; svcerr_noprog; svcerr_progvers; svcerr_systemerr;
+    svcerr_weakauth; svcfd_create; svcraw_create; svctcp_create;
+    svcudp_bufcreate; svcudp_create; svcudp_enablecache;
+
+    # x*
+    xdr_accepted_reply; xdr_array; xdr_authunix_parms; xdr_bool; xdr_bytes;
+    xdr_callhdr; xdr_callmsg; xdr_char; xdr_cryptkeyarg; xdr_cryptkeyarg2;
+    xdr_cryptkeyres; xdr_des_block; xdr_double; xdr_enum; xdr_float;
+    xdr_free; xdr_int; xdr_key_netstarg; xdr_key_netstres; xdr_keybuf;
+    xdr_keystatus; xdr_long; xdr_netobj; xdr_opaque; xdr_opaque_auth;
+    xdr_pmap; xdr_pmaplist; xdr_pointer; xdr_reference; xdr_rejected_reply;
+    xdr_replymsg; xdr_rmtcall_args; xdr_rmtcallres; xdr_short; xdr_string;
+    xdr_u_char; xdr_u_int; xdr_u_long; xdr_u_short; xdr_union; xdr_vector;
+    xdr_void; xdr_wrapstring; xdrmem_create; xdrrec_create;
+    xdrrec_endofrecord; xdrrec_eof; xdrrec_skiprecord; xdrstdio_create;
+    xencrypt; xprt_register; xprt_unregister;
+  }
+  GLIBC_2.1 {
+    # Special Pointer to avoid keyserv deadlock
+    __key_decryptsession_pk_LOCAL; __key_encryptsession_pk_LOCAL;
+    __key_gendes_LOCAL;
+
+    # a*
+    authdes_create; authdes_getucred; authdes_pk_create;
+
+    # c*
+    cbc_crypt;
+
+    # d*
+    des_setparity;
+
+    # e*
+    ecb_crypt;
+
+    # g*
+    getnetname;
+
+    # h*
+    host2netname;
+
+    # k*
+    key_decryptsession; key_decryptsession_pk; key_encryptsession;
+    key_encryptsession_pk; key_gendes; key_get_conv; key_secretkey_is_set;
+    key_setnet; key_setsecret;
+
+    # n*
+    netname2host; netname2user;
+
+    # p*
+    passwd2des;
+
+    # r*
+    rtime;
+
+    # u*
+    user2netname;
+
+    # x*
+    xdecrypt; xdr_authdes_cred; xdr_authdes_verf;
+    xdr_cryptkeyarg; xdr_cryptkeyarg2; xdr_cryptkeyres; xdr_des_block;
+    xdr_getcredres; xdr_key_netstarg; xdr_key_netstres;
+    xdr_keybuf; xdr_keystatus; xdr_netnamestr; xdr_sizeof; xdr_unixcred;
+  }
+}
diff --git a/sysdeps/alpha/Versions b/sysdeps/alpha/Versions
new file mode 100644
index 0000000000..c7c1f047f6
--- /dev/null
+++ b/sysdeps/alpha/Versions
@@ -0,0 +1,7 @@
+libc {
+  GLIBC_2.0 {
+    # functions with special/multiple interfaces
+    __divqu; __remqu; __divqs; __remqs; __divlu; __remlu; __divls;
+    __remls; __divl; __reml; __divq; __remq; __divqu; __remqu;
+  }
+}
diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions
new file mode 100644
index 0000000000..fa3d810c74
--- /dev/null
+++ b/sysdeps/alpha/fpu/Versions
@@ -0,0 +1,6 @@
+libc {
+  GLIBC_2.0 {
+    # functions used in other libraries
+    __ieee_get_fp_control; __ieee_set_fp_control;
+  }
+}
diff --git a/sysdeps/generic/elf/backtracesyms.c b/sysdeps/generic/elf/backtracesyms.c
index 9941644f66..4147d956eb 100644
--- a/sysdeps/generic/elf/backtracesyms.c
+++ b/sysdeps/generic/elf/backtracesyms.c
@@ -53,8 +53,8 @@ __backtrace_symbols (array, size)
 	   "<fct-name>(<sym-name>)[+offset].  */
 	total += (strlen (info[cnt].dli_fname ?: "")
 		  + (info[cnt].dli_sname
-		     ? strlen (info[cnt].dli_sname) + 2
-		     : 0)
+		     ? strlen (info[cnt].dli_sname) + 3
+		     : 1)
 		  + WORD_WIDTH + 6);
       else
 	total += 6 + WORD_WIDTH;
diff --git a/sysdeps/i386/Versions b/sysdeps/i386/Versions
new file mode 100644
index 0000000000..e5caa559b4
--- /dev/null
+++ b/sysdeps/i386/Versions
@@ -0,0 +1,6 @@
+libc {
+  GLIBC_2.1 {
+    # global variable
+    _fp_hw;
+  }
+}
diff --git a/sysdeps/sparc/Versions b/sysdeps/sparc/Versions
new file mode 100644
index 0000000000..aa36082e9e
--- /dev/null
+++ b/sysdeps/sparc/Versions
@@ -0,0 +1,5 @@
+libc {
+  GLIBC_2.0 {
+    .div; .mul; .rem; .udiv; .umul; .urem;
+  }
+}
diff --git a/sysdeps/unix/sysv/Versions b/sysdeps/unix/sysv/Versions
new file mode 100644
index 0000000000..bdb8ba836c
--- /dev/null
+++ b/sysdeps/unix/sysv/Versions
@@ -0,0 +1,5 @@
+libc {
+  GLIBC_2.0 {
+    sysinfo;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
new file mode 100644
index 0000000000..52de4aa251
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -0,0 +1,76 @@
+libc {
+  GLIBC_2.0 {
+    # functions used in inline functions or macros
+    __cmsg_nxthdr;
+
+    # functions used in other libraries
+    __clone;
+
+    # b*
+    bdflush;
+
+    # c*
+    clone; create_module;
+
+    # d*
+    delete_module;
+
+    # g*
+    get_kernel_syms; getresgid; getresuid;
+
+    # i*
+    init_module;
+
+    # k*
+    klogctl;
+
+    # l*
+    llseek;
+
+    # m*
+    mremap;
+
+    # n*
+    nfsservctl;
+
+    # p*
+    personality; prctl;
+
+    # q*
+    query_module; quotactl;
+
+    # r*
+    reboot;
+
+    # s*
+    setfsgid; setfsuid;
+
+    # s*
+    setresgid; setresuid; shutdown; swapoff; swapon; sysctl;
+
+    # u*
+    umount; uselib;
+  }
+  GLIBC_2.1 {
+    # functions used in inline functions or macros
+    __libc_sa_len;
+
+    # functions used in other libraries
+    __syscall_rt_sigqueueinfo;
+
+    # Since we have new signals this structure changed.
+    _sys_siglist; sys_siglist; sys_sigabbrev;
+
+    # New errlist.
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+
+    # chown interface change.
+    chown;
+
+    # Change in pthread_attr_t.
+    pthread_attr_init;
+
+    # c*
+    capget; capset;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
new file mode 100644
index 0000000000..ad490400fb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -0,0 +1,49 @@
+libc {
+  GLIBC_2.0 {
+    # Unfortunately in wider use.
+    _inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse;
+    _hae_shift;
+
+    # b*
+    bus_base; bus_base_sparse;
+
+    # h*
+    hae_shift;
+
+    # i*
+    inb; inl; inw; ioperm; iopl;
+
+    # o*
+    outb; outl; outw;
+
+    # p*
+    pciconfig_read; pciconfig_write; sethae;
+  }
+  GLIBC_2.1 {
+    # Linux/Alpha 64-bit timeval functions.
+    __select; select;
+    adjtime; adjtimex; __adjtimex;
+    __gettimeofday;
+
+    # glob interface change
+    glob; globfree;
+
+    # limit type change
+    getrusage;
+
+    # time type change
+    gettimeofday;
+
+    # i*
+    ieee_get_fp_control; ieee_set_fp_control;
+
+    # s*
+    setitimer; settimeofday;
+
+    # u*
+    utimes;
+
+    # w*
+    wait4;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index dd1c77a99e..26f8179afe 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -1,5 +1,5 @@
 /* Determine various system internal values, Linux version.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -62,7 +62,7 @@ get_proc_path (char *buffer, size_t bufsize)
    series to add this, though.
 
    One possibility to implement it for systems using Linux 2.0 is to
-   examine the pseudo file /proc/meminfo.  Here we have one entry for
+   examine the pseudo file /proc/cpuinfo.  Here we have one entry for
    each processor.
 
    But not all systems have support for the /proc filesystem.  If it
diff --git a/sysdeps/unix/sysv/linux/i386/Versions b/sysdeps/unix/sysv/linux/i386/Versions
new file mode 100644
index 0000000000..1ec868a57c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/Versions
@@ -0,0 +1,7 @@
+libc {
+  GLIBC_2.0 {
+    ioperm; iopl;
+
+    vm86;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
new file mode 100644
index 0000000000..11614a4cd5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -0,0 +1,9 @@
+libc {
+  GLIBC_2.0 {
+    # c*
+    cachectl; cacheflush;
+
+    # s*
+    sysmips;
+  }
+}
diff --git a/sysvipc/Versions b/sysvipc/Versions
new file mode 100644
index 0000000000..cc9284fc7a
--- /dev/null
+++ b/sysvipc/Versions
@@ -0,0 +1,12 @@
+libc {
+  GLIBC_2.0 {
+    # f*
+    ftok;
+
+    # m*
+    msgctl; msgget; msgrcv; msgsnd;
+
+    # s*
+    semctl; semget; semop; shmat; shmctl; shmdt; shmget;
+  }
+}
diff --git a/termios/Versions b/termios/Versions
new file mode 100644
index 0000000000..c6acfb2047
--- /dev/null
+++ b/termios/Versions
@@ -0,0 +1,18 @@
+libc {
+  GLIBC_2.0 {
+    # functions which have an additional interface since they are
+    # are cancelable.
+    __libc_tcdrain;
+
+    # c*
+    cfgetispeed; cfgetospeed; cfmakeraw; cfsetispeed; cfsetospeed; cfsetspeed;
+
+    # t*
+    tcdrain; tcflow; tcflush; tcgetattr; tcgetpgrp; tcsendbreak; tcsetattr;
+    tcsetpgrp;
+  }
+  GLIBC_2.1 {
+    # t*
+    tcgetsid;
+  }
+}
diff --git a/time/Versions b/time/Versions
new file mode 100644
index 0000000000..24039f9630
--- /dev/null
+++ b/time/Versions
@@ -0,0 +1,52 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    __timezone; __daylight; __tzname;
+
+    # functions with special/multiple interfaces
+    __adjtimex;
+
+    # functions used in other libraries
+    __gmtime_r; __gettimeofday;
+
+    # variables in normal name space
+    daylight; timezone; tzname;
+
+    # a*
+    adjtime; adjtimex; asctime; asctime_r;
+
+    # c*
+    clock; ctime; ctime_r;
+
+    # d*
+    difftime; dysize;
+
+    # f*
+    ftime;
+
+    # g*
+    getitimer; gettimeofday; gmtime; gmtime_r;
+
+    # l*
+    localtime; localtime_r;
+
+    # m*
+    mktime;
+
+    # s*
+    setitimer; settimeofday; stime; strftime; strptime;
+
+    # t*
+    time; timegm; timelocal; tzset;
+  }
+  GLIBC_2.1 {
+    # variables in normal name space
+    getdate_err;
+
+    # g*
+    getdate; getdate_r; getitimer;
+
+    # s*
+    strfxtime;
+  }
+}
diff --git a/versions.awk b/versions.awk
new file mode 100644
index 0000000000..57660d235a
--- /dev/null
+++ b/versions.awk
@@ -0,0 +1,105 @@
+# Combine version map fragments into version files for the generated
+# shared object.
+# (C) Copyright 1998 Free Software Foundation, Inc.
+# Written by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+# Read definitions for the versions.
+BEGIN {
+  nlibs=0;
+  while (getline < "Versions.def") {
+    if (/^[a-zA-Z_]+ {/) {
+      libs[$1] = 1;
+      curlib = $1;
+      while (getline < "Versions.def" && ! /^}/) {
+	if (NF > 1) {
+	  versions[$1] = 1;
+	  derived[curlib, $1] = (" " $2);
+	  for (n = 3; n <= NF; ++n) {
+	    derived[curlib, $1] = sprintf("%s, %s", derived[curlib, $1], $n);
+	  }
+	} else {
+	  versions[$1] = 1;
+	}
+      }
+    }
+  }
+  close("Versions.def");
+
+  tmpfile = (buildroot "/Versions.tmp");
+  sort = ("sort -n >" tmpfile);
+}
+
+# Remove comment lines.
+/^ *#/ {
+  next;
+}
+
+# This matches the beginning of the version information for a new library.
+/^[a-zA-Z_]+/ {
+  actlib = $1;
+  if (libs[$1] != 1) {
+    printf("no versions defined for %s\n", $1);
+    exit 1;
+  }
+  next;
+}
+
+# This matches the beginning of a new version for the current library.
+/^  [A-Za-z_]/ {
+  actver = $1;
+  if (versions[$1] != 1) {
+    printf("version %s not defined\n", $1);
+    exit 1;
+  }
+  next;
+}
+
+# This matches lines with names to be added to the current version in the
+# current library.  This is the only place where we print something to
+# the intermediate file.
+/^   / {
+  printf("%s %s %s\n", actlib, actver, $0) | sort;
+}
+
+
+function closeversion(name) {
+  if (firstinfile) {
+    printf("  local:\n    *;\n") > outfile;
+    firstinfile = 0;
+  }
+  printf("}%s;\n", derived[oldlib, name]) > outfile;
+}
+
+# Now print the accumulated information.
+END {
+  close(sort);
+  oldlib="";
+  oldver="";
+  while(getline < tmpfile) {
+    if ($1 != oldlib) {
+      if (oldlib != "") {
+	closeversion(oldver);
+	oldver = "";
+	close(outfile);
+      }
+      oldlib = $1;
+      outfile = (buildroot oldlib ".map");
+      firstinfile = 1;
+    }
+    if ($2 != oldver) {
+      if (oldver != "") {
+	closeversion(oldver);
+      }
+      printf("%s {\n  global:\n", $2) > outfile;
+      oldver = $2;
+    }
+    printf("   ") > outfile;
+    for (n = 3; n <= NF; ++n) {
+      printf(" %s", $n) > outfile;
+    }
+    printf("\n") > outfile;
+  }
+  closeversion(oldver);
+  close(outfile);
+  rm tmpfile;
+}
diff --git a/wcsmbs/Versions b/wcsmbs/Versions
new file mode 100644
index 0000000000..4e6c399eb4
--- /dev/null
+++ b/wcsmbs/Versions
@@ -0,0 +1,23 @@
+libc {
+  GLIBC_2.0 {
+    # functions used in inline functions or macros
+    __wcsto*_internal;
+
+    # b*
+    btowc;
+
+    # w*
+    wcpcpy; wcpncpy; wcrtomb; wcscat; wcschr; wcscmp; wcscoll;
+    wcscpy; wcscspn; wcsdup; wcslen; wcsncat; wcsncmp;
+    wcsncpy; wcsnrtombs; wcspbrk; wcsrchr; wcsrtombs; wcsspn; wcsstr;
+    wcstod; wcstof; wcstok; wcstol; wcstold; wcstoq; wcstoul;
+    wcstouq; wcswidth; wcsxfrm; wctob;
+
+    wmemchr; wmemcmp; wmemcpy; wmemmove; wmemset;
+  }
+  GLIBC_2.1 {
+    # w*
+    wcscasecmp; wcsncasecmp; wcsnlen; wcstoll;
+    wcstoimax; wcstoumax; wcstoull; wcswcs; wmemrtombs; wmemrtowcs;
+  }
+}
diff --git a/wctype/Versions b/wctype/Versions
new file mode 100644
index 0000000000..3c24c22570
--- /dev/null
+++ b/wctype/Versions
@@ -0,0 +1,20 @@
+libc {
+  GLIBC_2.0 {
+    # functions used in inline functions or macros
+    __iswctype;
+
+    # i*
+    iswalnum; iswalpha; iswcntrl; iswctype; iswdigit; iswgraph; iswlower;
+    iswprint; iswpunct; iswspace; iswupper; iswxdigit;
+
+    # t*
+    towctrans; towlower; towupper;
+
+    # w*
+    wctrans; wctype; wcwidth;
+  }
+  GLIBC_2.1 {
+    # i*
+    iswblank;
+  }
+}