summaryrefslogtreecommitdiff
path: root/usr/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common')
-rw-r--r--usr/src/common/bignum/i386/cap_mapfile15
-rw-r--r--usr/src/common/mapfiles/amd64/Makefile12
-rw-r--r--usr/src/common/mapfiles/amd64/map.below4G33
-rw-r--r--usr/src/common/mapfiles/common/Makefile12
-rw-r--r--usr/src/common/mapfiles/common/map.above4G (renamed from usr/src/common/mapfiles/amd64/map.above4G)31
-rw-r--r--usr/src/common/mapfiles/common/map.below4G (renamed from usr/src/common/mapfiles/sparcv9/map.below4G)35
-rw-r--r--usr/src/common/mapfiles/common/map.bssalign10
-rw-r--r--usr/src/common/mapfiles/common/map.default (renamed from usr/src/common/mapfiles/sparc/map.default)42
-rw-r--r--usr/src/common/mapfiles/common/map.execdata12
-rw-r--r--usr/src/common/mapfiles/common/map.filter14
-rw-r--r--usr/src/common/mapfiles/common/map.lex.yy11
-rw-r--r--usr/src/common/mapfiles/common/map.noexbss10
-rw-r--r--usr/src/common/mapfiles/common/map.noexdata (renamed from usr/src/common/mapfiles/i386/map.noexdata)18
-rw-r--r--usr/src/common/mapfiles/common/map.noexstk17
-rw-r--r--usr/src/common/mapfiles/common/map.pagealign (renamed from usr/src/common/mapfiles/sparc/map.pagealign)28
-rw-r--r--usr/src/common/mapfiles/gen/map.noexeglobs.1.template10
-rw-r--r--usr/src/common/mapfiles/gen/map.noexeglobs.2.template10
-rw-r--r--usr/src/common/mapfiles/i386/Makefile8
-rw-r--r--usr/src/common/mapfiles/i386/map.default33
-rw-r--r--usr/src/common/mapfiles/i386/map.pagealign33
-rw-r--r--usr/src/common/mapfiles/sparc/Makefile7
-rw-r--r--usr/src/common/mapfiles/sparcv9/Makefile12
-rw-r--r--usr/src/common/mapfiles/sparcv9/map.above4G33
23 files changed, 203 insertions, 243 deletions
diff --git a/usr/src/common/bignum/i386/cap_mapfile b/usr/src/common/bignum/i386/cap_mapfile
index 51afaa50eb..e06c8d084a 100644
--- a/usr/src/common/bignum/i386/cap_mapfile
+++ b/usr/src/common/bignum/i386/cap_mapfile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,12 +18,14 @@
#
# CDDL HEADER END
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
#
-# ident "%Z%%M% %I% %E% SMI"
+
+$mapfile_version 2
# Override the insertion of SSE2/MMX tags into .SUNWcap since we do a
# runtime check for this and don't need the loaders help.
# Note that this overrides all HWCAP tags not just SSE2/MMX.
-hwcap_1 = V0x0 OVERRIDE;
+CAPABILITY {
+ hw_1 = 0x0;
+};
diff --git a/usr/src/common/mapfiles/amd64/Makefile b/usr/src/common/mapfiles/amd64/Makefile
index 6046640442..c0669c0b59 100644
--- a/usr/src/common/mapfiles/amd64/Makefile
+++ b/usr/src/common/mapfiles/amd64/Makefile
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/Makefile.master
@@ -30,7 +29,7 @@ ROOTDIR= $(ROOT)/usr/lib/ld
ROOTDIR64= $(ROOT)/usr/lib/ld/$(MACH64)
DIRS= $(ROOTDIR) $(ROOTDIR64)
-FILES= $(ROOTDIR64)/map.above4G $(ROOTDIR64)/map.below4G
+FILES=
install: $(DIRS) $(FILES) map.link
@@ -39,8 +38,11 @@ $(FILES):= FILEMODE=444
$(DIRS):= DIRMODE=755
map.link:
- $(RM) $(ROOTDIR64)/map.default
- $(SYMLINK) ./map.below4G $(ROOTDIR64)/map.default
+ $(RM) $(ROOTDIR64)/map.default \
+ $(ROOTDIR64)/map.above4G $(ROOTDIR64)/map.below4G
+ $(SYMLINK) ../map.default $(ROOTDIR64)/map.default
+ $(SYMLINK) ../map.above4G $(ROOTDIR64)/map.above4G
+ $(SYMLINK) ../map.below4G $(ROOTDIR64)/map.below4G
$(DIRS):
$(INS.dir)
diff --git a/usr/src/common/mapfiles/amd64/map.below4G b/usr/src/common/mapfiles/amd64/map.below4G
deleted file mode 100644
index 8ed835620e..0000000000
--- a/usr/src/common/mapfiles/amd64/map.below4G
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# 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
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Linker mapfile for loading 64-bit programs below 4 gigabytes.
-# The linker does not use this file automatically, so one must
-# use the -M option to cc or ld:
-#
-# cc -xarch=generic64 -M /usr/lib/ld/amd64/map.below4G myprogram.c
-#
-text = V0x400000;
diff --git a/usr/src/common/mapfiles/common/Makefile b/usr/src/common/mapfiles/common/Makefile
index 184f5ea2c7..cf4342ed65 100644
--- a/usr/src/common/mapfiles/common/Makefile
+++ b/usr/src/common/mapfiles/common/Makefile
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/Makefile.master
@@ -30,11 +29,16 @@ ROOTDIR= $(ROOT)/usr/lib/ld
DIRS= $(ROOTDIR)
FILES= \
+ $(ROOTDIR)/map.above4G \
+ $(ROOTDIR)/map.below4G \
+ $(ROOTDIR)/map.bssalign \
$(ROOTDIR)/map.execdata \
+ $(ROOTDIR)/map.default \
$(ROOTDIR)/map.filter \
- $(ROOTDIR)/map.bssalign \
$(ROOTDIR)/map.noexbss \
- $(ROOTDIR)/map.noexstk
+ $(ROOTDIR)/map.noexdata \
+ $(ROOTDIR)/map.noexstk \
+ $(ROOTDIR)/map.pagealign
install: $(DIRS) $(FILES)
diff --git a/usr/src/common/mapfiles/amd64/map.above4G b/usr/src/common/mapfiles/common/map.above4G
index c5dd49f0ea..cab238f6d1 100644
--- a/usr/src/common/mapfiles/amd64/map.above4G
+++ b/usr/src/common/mapfiles/common/map.above4G
@@ -1,13 +1,11 @@
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -22,12 +20,25 @@
#
# CDDL HEADER END
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# Linker mapfile for loading 64-bit programs above 4 gigabytes.
# The linker does not use this file automatically, so one must
# use the -M option to cc or ld:
#
-# cc -xarch=generic64 -M /usr/lib/ld/amd64/map.above4G myprogram.c
-#
-text = V0x100000000;
+# cc -m64 -M /usr/lib/ld/map.above4G myprogram.c
+#
+
+$mapfile_version 2
+
+$if !_ELF64
+$error mapfile is only applicable to 64-bit objects
+$endif
+
+# sparcv9 and amd64 use the same address
+$if _sparc || _x86
+
+# On sparc (but not amd64), this is equivalent to map.default.
+LOAD_SEGMENT text { VADDR = 0x100000000 };
+
+$else
+$error unknown platform
+$endif
diff --git a/usr/src/common/mapfiles/sparcv9/map.below4G b/usr/src/common/mapfiles/common/map.below4G
index 08b432f76d..b02bd4c206 100644
--- a/usr/src/common/mapfiles/sparcv9/map.below4G
+++ b/usr/src/common/mapfiles/common/map.below4G
@@ -1,15 +1,11 @@
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -28,6 +24,25 @@
# The linker does not use this file automatically, so one must use the -M
# option to cc or ld:
#
-# cc -xarch=v9 -M /usr/lib/ld/map.default myprogram.c
-#
-text = V0x80000000;
+# cc -m64 -M /usr/lib/ld/map.below4G myprogram.c
+#
+
+$mapfile_version 2
+
+$if !_ELF64
+$error mapfile is only applicable to 64-bit objects
+$endif
+
+# sparcv9 and amd64 use the same address
+$if _sparc
+
+LOAD_SEGMENT text { VADDR = 0x80000000 };
+
+$elif _x86
+
+# This is equivalent to map.default.
+LOAD_SEGMENT text { VADDR = 0x400000 };
+
+$else
+$error unknown platform
+$endif
diff --git a/usr/src/common/mapfiles/common/map.bssalign b/usr/src/common/mapfiles/common/map.bssalign
index a59d92be1c..70dcb8e859 100644
--- a/usr/src/common/mapfiles/common/map.bssalign
+++ b/usr/src/common/mapfiles/common/map.bssalign
@@ -1,6 +1,5 @@
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
@@ -34,4 +33,9 @@
#
# cc -M /usr/lib/ld/map.bssalign myprogram.c
#
-bss = A0x400000;
+
+$mapfile_version 2
+
+LOAD_SEGMENT bss {
+ ALIGN = 0x400000;
+};
diff --git a/usr/src/common/mapfiles/sparc/map.default b/usr/src/common/mapfiles/common/map.default
index c38e747e12..796002d7e5 100644
--- a/usr/src/common/mapfiles/sparc/map.default
+++ b/usr/src/common/mapfiles/common/map.default
@@ -1,15 +1,11 @@
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -24,10 +20,38 @@
#
# CDDL HEADER END
#
-# Linker mapfile that shows how 32-bit SPARC programs are loaded by default.
+# Linker mapfile that shows how programs are loaded by default.
# The linker does not use this file automatically, so one must use the -M
# option to cc or ld:
#
# cc -M /usr/lib/ld/map.default myprogram.c
#
-text = V0x10000;
+
+$mapfile_version 2
+
+$if _sparc
+
+$if _ELF32
+LOAD_SEGMENT text { VADDR = 0x10000 };
+$elif _ELF64
+# This is equivalent to map.above4G.
+LOAD_SEGMENT text { VADDR = 0x100000000 };
+$else
+$error unknown sparc ELFCLASS
+$endif
+
+
+$else _x86
+
+$if _ELF32
+LOAD_SEGMENT text { VADDR = 0x08048000 };
+$elif _ELF64
+# This is equivalent to map.below4G.
+LOAD_SEGMENT text { VADDR = 0x400000 };
+$else
+$error unknown x86 ELFCLASS
+$endif
+
+$else
+$error unknown platform
+$endif
diff --git a/usr/src/common/mapfiles/common/map.execdata b/usr/src/common/mapfiles/common/map.execdata
index b54c94ff28..aa24a22c11 100644
--- a/usr/src/common/mapfiles/common/map.execdata
+++ b/usr/src/common/mapfiles/common/map.execdata
@@ -1,6 +1,5 @@
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
@@ -31,12 +30,17 @@
#
# cc -M /usr/lib/ld/map.execdata myprogram.c
#
-data = ?RWX;
+
+$mapfile_version 2
+
+LOAD_SEGMENT data {
+ FLAGS = READ WRITE EXECUTE;
+};
#
# Executables can also create a separate executable bss segment. Adding
# the following line creates a bss segment.
#
-# bss = ?RWX;
+# LOAD_SEGMENT bss { FLAGS = READ WRITE EXECUTE };
#
# See also /usr/lib/ld/map.noexdata.
diff --git a/usr/src/common/mapfiles/common/map.filter b/usr/src/common/mapfiles/common/map.filter
index a25edbac94..cd08d2d025 100644
--- a/usr/src/common/mapfiles/common/map.filter
+++ b/usr/src/common/mapfiles/common/map.filter
@@ -1,6 +1,5 @@
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
@@ -48,5 +47,12 @@
# Override the default alignment so that this single paged object can be mapped
# more flexibly.
-filter = LOAD ?RX A0x1000;
-filter : ?A;
+$mapfile_version 2
+
+LOAD_SEGMENT filter {
+ FLAGS = READ EXECUTE;
+ ALIGN = 0x1000;
+ ASSIGN_SECTION {
+ FLAGS = ALLOC;
+ };
+};
diff --git a/usr/src/common/mapfiles/common/map.lex.yy b/usr/src/common/mapfiles/common/map.lex.yy
index 7a40e6e1ce..81b61b20dd 100644
--- a/usr/src/common/mapfiles/common/map.lex.yy
+++ b/usr/src/common/mapfiles/common/map.lex.yy
@@ -20,16 +20,15 @@
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
+$mapfile_version 2
+
# lex generates a lex.yy.c for use in building applications. A number of
# interfaces within this file are intended for libl.so to bind to, and thus
# should remain exported from any application using lex.yy.c.
-{
+SYMBOL_SCOPE {
global:
yyback;
yyextra;
@@ -49,7 +48,7 @@
# Some applications use the -e option of lex, which generates additional lex
# interfaces that are not defined in the generic $(MAPFILE.LEX). Export the
# following interfaces to satisfy -e use.
-#{
+#SYMBOL_SCOPE {
# global:
# yywinput;
# yywleng;
diff --git a/usr/src/common/mapfiles/common/map.noexbss b/usr/src/common/mapfiles/common/map.noexbss
index 72da75c554..cb84e4d675 100644
--- a/usr/src/common/mapfiles/common/map.noexbss
+++ b/usr/src/common/mapfiles/common/map.noexbss
@@ -1,6 +1,5 @@
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
@@ -35,6 +34,11 @@
#
# cc -M /usr/lib/ld/map.noexbss myprogram.c
#
-bss = ?RW;
+
+$mapfile_version 2
+
+LOAD_SEGMENT bss {
+ FLAGS = READ WRITE;
+};
# See also /usr/lib/ld/map.noexdata.
diff --git a/usr/src/common/mapfiles/i386/map.noexdata b/usr/src/common/mapfiles/common/map.noexdata
index c35136c8ad..9f98fbabe8 100644
--- a/usr/src/common/mapfiles/i386/map.noexdata
+++ b/usr/src/common/mapfiles/common/map.noexdata
@@ -1,6 +1,5 @@
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
@@ -34,7 +33,6 @@
#
# cc -M /usr/lib/ld/map.noexdata myprogram.c
#
-data = ?RW;
#
# Executables can also create a separate non-executable bss segment.
@@ -42,3 +40,17 @@ data = ?RW;
# non-executable heap. See /usr/lib/ld/map.noexbss.
#
# See also /usr/lib/ld/map.execdata.
+
+$mapfile_version 2
+
+$if _sparc
+
+$error SPARC Procedure Linkage Table (PLT) must remain executable
+
+$elif _x86
+
+LOAD_SEGMENT data { FLAGS = READ WRITE };
+
+$else
+$error unknown platform
+$endif
diff --git a/usr/src/common/mapfiles/common/map.noexstk b/usr/src/common/mapfiles/common/map.noexstk
index d71942d2b5..b37a881c75 100644
--- a/usr/src/common/mapfiles/common/map.noexstk
+++ b/usr/src/common/mapfiles/common/map.noexstk
@@ -1,15 +1,11 @@
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -31,4 +27,9 @@
#
# cc -M /usr/lib/ld/map.noexstk myprogram.c
#
-stack = STACK ?RW;
+
+$mapfile_version 2
+
+STACK {
+ FLAGS = READ WRITE;
+};
diff --git a/usr/src/common/mapfiles/sparc/map.pagealign b/usr/src/common/mapfiles/common/map.pagealign
index 1ecb9e0d97..1aea024804 100644
--- a/usr/src/common/mapfiles/sparc/map.pagealign
+++ b/usr/src/common/mapfiles/common/map.pagealign
@@ -1,15 +1,11 @@
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -24,10 +20,24 @@
#
# CDDL HEADER END
#
-# Linker mapfile to create page aligned data within a SPARC executable.
+# Linker mapfile to create page-aligned data within an executable.
# The linker does not use this file automatically, so one must use the -M
# option to cc or ld:
#
# cc -M /usr/lib/ld/map.pagealign myprogram.c
#
-data = R0x2000;
+
+$mapfile_version 2
+
+$if _sparc
+
+LOAD_SEGMENT data { ROUND = 0x2000 };
+
+$elif _x86
+
+LOAD_SEGMENT data { ROUND = 0x1000 };
+
+$else
+$error unknown platform
+$endif
+
diff --git a/usr/src/common/mapfiles/gen/map.noexeglobs.1.template b/usr/src/common/mapfiles/gen/map.noexeglobs.1.template
index 30df715d83..3a79dd3e09 100644
--- a/usr/src/common/mapfiles/gen/map.noexeglobs.1.template
+++ b/usr/src/common/mapfiles/gen/map.noexeglobs.1.template
@@ -20,15 +20,15 @@
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Template mapfile for generating a final mapfile to demote all user global
# symbols to local within a dynamic executable.
#
-{
+
+$mapfile_version 2
+
+SYMBOL_SCOPE {
local:
_fini;
_init;
diff --git a/usr/src/common/mapfiles/gen/map.noexeglobs.2.template b/usr/src/common/mapfiles/gen/map.noexeglobs.2.template
index c7a1a79752..7be448ac15 100644
--- a/usr/src/common/mapfiles/gen/map.noexeglobs.2.template
+++ b/usr/src/common/mapfiles/gen/map.noexeglobs.2.template
@@ -20,16 +20,16 @@
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Template mapfile for generating a final mapfile to demote all user global
# symbols to local within a dynamic executable. This mapfile also provides
# the "MAP-" commented entries to select lines for the final mapfile.
#
-{ # MAP-HEAD
+
+$mapfile_version 2 # MAP-HEAD
+ # MAP-HEAD
+SYMBOL_SCOPE { # MAP-HEAD
global: # MAP-HEAD
_lib_version; # MAP-HEAD
local: # MAP-TAIL
diff --git a/usr/src/common/mapfiles/i386/Makefile b/usr/src/common/mapfiles/i386/Makefile
index a664baafb8..cea2a5946d 100644
--- a/usr/src/common/mapfiles/i386/Makefile
+++ b/usr/src/common/mapfiles/i386/Makefile
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/Makefile.master
@@ -29,10 +28,7 @@ include $(SRC)/Makefile.master
ROOTDIR= $(ROOT)/usr/lib/ld
DIRS= $(ROOTDIR)
-FILES= \
- $(ROOTDIR)/map.default \
- $(ROOTDIR)/map.pagealign \
- $(ROOTDIR)/map.noexdata
+FILES=
install: $(DIRS) $(FILES)
diff --git a/usr/src/common/mapfiles/i386/map.default b/usr/src/common/mapfiles/i386/map.default
deleted file mode 100644
index 0b3900a1ae..0000000000
--- a/usr/src/common/mapfiles/i386/map.default
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# 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
-#
-# Linker mapfile that shows how 32-bit Intel x86 programs are loaded by
-# default. The linker does not use this file automatically, so one must use
-# the -M option to cc or ld:
-#
-# cc -M /usr/lib/ld/map.default myprogram.c
-#
-text = V0x08048000;
diff --git a/usr/src/common/mapfiles/i386/map.pagealign b/usr/src/common/mapfiles/i386/map.pagealign
deleted file mode 100644
index 892779a73c..0000000000
--- a/usr/src/common/mapfiles/i386/map.pagealign
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# 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
-#
-# Linker mapfile to create page-aligned data within an Intel executable.
-# The linker does not use this file automatically, so one must use the -M
-# option to cc or ld:
-#
-# cc -M /usr/lib/ld/map.pagealign myprogram.c
-#
-data = R0x1000;
diff --git a/usr/src/common/mapfiles/sparc/Makefile b/usr/src/common/mapfiles/sparc/Makefile
index e32b475c5b..cea2a5946d 100644
--- a/usr/src/common/mapfiles/sparc/Makefile
+++ b/usr/src/common/mapfiles/sparc/Makefile
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/Makefile.master
@@ -29,9 +28,7 @@ include $(SRC)/Makefile.master
ROOTDIR= $(ROOT)/usr/lib/ld
DIRS= $(ROOTDIR)
-FILES= \
- $(ROOTDIR)/map.default \
- $(ROOTDIR)/map.pagealign
+FILES=
install: $(DIRS) $(FILES)
diff --git a/usr/src/common/mapfiles/sparcv9/Makefile b/usr/src/common/mapfiles/sparcv9/Makefile
index d98e3e9802..18944519d0 100644
--- a/usr/src/common/mapfiles/sparcv9/Makefile
+++ b/usr/src/common/mapfiles/sparcv9/Makefile
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/Makefile.master
@@ -30,7 +29,7 @@ ROOTDIR= $(ROOT)/usr/lib/ld
ROOTDIR64= $(ROOT)/usr/lib/ld/$(MACH64)
DIRS= $(ROOTDIR) $(ROOTDIR64)
-FILES= $(ROOTDIR64)/map.above4G $(ROOTDIR64)/map.below4G
+FILES=
install: $(DIRS) $(FILES) map.link
@@ -39,8 +38,11 @@ $(FILES):= FILEMODE=444
$(DIRS):= DIRMODE=755
map.link:
- $(RM) $(ROOTDIR64)/map.default
- $(SYMLINK) ./map.above4G $(ROOTDIR64)/map.default
+ $(RM) $(ROOTDIR64)/map.default \
+ $(ROOTDIR64)/map.above4G $(ROOTDIR64)/map.below4G
+ $(SYMLINK) ../map.default $(ROOTDIR64)/map.default
+ $(SYMLINK) ../map.above4G $(ROOTDIR64)/map.above4G
+ $(SYMLINK) ../map.below4G $(ROOTDIR64)/map.below4G
$(DIRS):
$(INS.dir)
diff --git a/usr/src/common/mapfiles/sparcv9/map.above4G b/usr/src/common/mapfiles/sparcv9/map.above4G
deleted file mode 100644
index b3353fd18b..0000000000
--- a/usr/src/common/mapfiles/sparcv9/map.above4G
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# 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
-#
-# Linker mapfile for loading 64-bit programs above 4 gigabytes
-# The linker does not use this file automatically, so one must use the -M
-# option to cc or ld:
-#
-# cc -xarch=v9 -M /usr/lib/ld/sparcv9/map.above4G myprogram.c
-#
-text = V0x100000000;