6916796 OSnet mapfiles should use version 2 link-editor syntax (fix mapfilechk,unref)
authorAli Bahrami <Ali.Bahrami@Oracle.COM>
Mon, 28 Jun 2010 09:11:16 -0600
changeset 12709 237fa25a1db0
parent 12708 4718d5dc3a28
child 12710 66c9c36f2046
6916796 OSnet mapfiles should use version 2 link-editor syntax (fix mapfilechk,unref)
exception_lists/mapfilechk
usr/src/cmd/sgs/rtld/amd64/mapfile-amd64-vers
usr/src/lib/brand/shared/librtld_db/common/mapfile-vers.64
usr/src/tools/onbld/hgext/cdm.py
--- a/exception_lists/mapfilechk	Mon Jun 28 08:02:28 2010 -0700
+++ b/exception_lists/mapfilechk	Mon Jun 28 09:11:16 2010 -0600
@@ -23,15 +23,25 @@
 # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-# By default, mapfilechk operates on any file in the
-# workspace that matches the pattern "*mapfile*". This
-# file provides an exception mechanism for specifying
-# files that match that pattern that should not be checked.
+# By default, mapfilechk operates on any file in the workspace
+# in which the final path segment:
+#	- Contains the word 'mapfile'
+#	- Begins with 'map.'
+#	- Ends with '.map'
+# as long as it does not have a .c or .h suffix.
+#
+# This file provides an exception mechanism for specifying files
+# that match this pattern that should be skipped.
 # 
 
 syntax: glob
 exception_lists/mapfilechk
+usr/src/cmd/lp/filter/postscript/font/devpost/charlib/*
 usr/src/cmd/mdb/common/kmdb/mapfile_skel
+usr/src/cmd/sgs/libconv/common/map.msg
+usr/src/cmd/troff/troff.d/tmac.d/*
 usr/src/lib/README.mapfiles
+usr/src/lib/fm/topo/maps/Makefile.map
+usr/src/cmd/perl/*
 usr/src/tools/onbld/Checks/Mapfile*
 usr/src/tools/scripts/*
--- a/usr/src/cmd/sgs/rtld/amd64/mapfile-amd64-vers	Mon Jun 28 08:02:28 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-SUNWprivate_1.3 {
-	protected:
-		_dlamd64getunwind;
-		dlamd64getunwind;
-};
--- a/usr/src/lib/brand/shared/librtld_db/common/mapfile-vers.64	Mon Jun 28 08:02:28 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-SUNWprivate_1.1 {
-	global:
-		rtld_db_brand_ops64;
-};
--- a/usr/src/tools/onbld/hgext/cdm.py	Mon Jun 28 08:02:28 2010 -0700
+++ b/usr/src/tools/onbld/hgext/cdm.py	Mon Jun 28 09:11:16 2010 -0600
@@ -351,15 +351,18 @@
     #    - Ends with '.map'
     # We don't want to match unless these things occur in final path segment
     # because directory names with these strings don't indicate a mapfile.
-    MapfileRE = re.compile(r'.*((mapfile[^/]*)|(/map\.*[^/]*)|(\.map))$',
+    # We also ignore files with suffixes that tell us that the files
+    # are not mapfiles.
+    MapfileRE = re.compile(r'.*((mapfile[^/]*)|(/map\.+[^/]*)|(\.map))$',
     	re.IGNORECASE)
+    NotMapSuffixRE = re.compile(r'.*\.[ch]$', re.IGNORECASE)
 
     ui.write('Mapfile comment check:\n')
 
     for f, e in filelist:
         if e and e.is_removed():
             continue
-        elif not MapfileRE.match(f):
+        elif (not MapfileRE.match(f)) or NotMapSuffixRE.match(f):
             continue
         elif (e or opts.get('honour_nots')) and exclude(f):
             ui.status('Skipping %s...\n' % f)