1a4faba16SRod Evans#
2*cd3e9333SAli Bahrami# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
3a4faba16SRod Evans#
4a4faba16SRod Evans# CDDL HEADER START
5a4faba16SRod Evans#
6a4faba16SRod Evans# The contents of this file are subject to the terms of the
7a4faba16SRod Evans# Common Development and Distribution License (the "License").
8a4faba16SRod Evans# You may not use this file except in compliance with the License.
9a4faba16SRod Evans#
10a4faba16SRod Evans# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11a4faba16SRod Evans# or http://www.opensolaris.org/os/licensing.
12a4faba16SRod Evans# See the License for the specific language governing permissions
13a4faba16SRod Evans# and limitations under the License.
14a4faba16SRod Evans#
15a4faba16SRod Evans# When distributing Covered Code, include this CDDL HEADER in each
16a4faba16SRod Evans# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17a4faba16SRod Evans# If applicable, add the following below this CDDL HEADER, with the
18a4faba16SRod Evans# fields enclosed by brackets "[]" replaced with your own identifying
19a4faba16SRod Evans# information: Portions Copyright [yyyy] [name of copyright owner]
20a4faba16SRod Evans#
21a4faba16SRod Evans# CDDL HEADER END
22a4faba16SRod Evans#
23a4faba16SRod Evans# Link-editor mapfile to create a non-executable bss segment definition
24a4faba16SRod Evans# within an executable.  This mapfile is similar to map.noexdata that
25a4faba16SRod Evans# can be used on x86 architectures to create a non-executable data
26a4faba16SRod Evans# segment.  On SPARC, the data segment contains a Procedure Linkage
27a4faba16SRod Evans# Table (PLT) that must remain executable.
28a4faba16SRod Evans#
29a4faba16SRod Evans# As the bss segment is extended by sbrk(2) to enlarge the heap, a
30a4faba16SRod Evans# non-executable bss segment also results in a non-exutable heap.
31a4faba16SRod Evans#
32a4faba16SRod Evans# The link-editor does not use this file automatically, so one must
33a4faba16SRod Evans# use the -M option to cc or ld:
34a4faba16SRod Evans#
35a4faba16SRod Evans#       cc -M /usr/lib/ld/map.noexbss myprogram.c
36a4faba16SRod Evans#
37*cd3e9333SAli Bahrami
38*cd3e9333SAli Bahrami$mapfile_version 2
39*cd3e9333SAli Bahrami
40*cd3e9333SAli BahramiLOAD_SEGMENT bss {
41*cd3e9333SAli Bahrami	FLAGS = READ WRITE;
42*cd3e9333SAli Bahrami};
43a4faba16SRod Evans
44a4faba16SRod Evans# See also /usr/lib/ld/map.noexdata.
45