map.noexdata revision a4faba164aa153855d621c694fc5aa75dd183b81
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
c7769c4b7e84511fcc4a12a85a04dd7fbfd82b46vboxsync# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# Use is subject to license terms.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# CDDL HEADER START
c7769c4b7e84511fcc4a12a85a04dd7fbfd82b46vboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# The contents of this file are subject to the terms of the
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# Common Development and Distribution License (the "License").
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# You may not use this file except in compliance with the License.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# or http://www.opensolaris.org/os/licensing.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# See the License for the specific language governing permissions
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# and limitations under the License.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# When distributing Covered Code, include this CDDL HEADER in each
c7769c4b7e84511fcc4a12a85a04dd7fbfd82b46vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c7769c4b7e84511fcc4a12a85a04dd7fbfd82b46vboxsync# If applicable, add the following below this CDDL HEADER, with the
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync# CDDL HEADER END
9f72be0517ae135bdd3e6ee140d3321b40aeb6e7vboxsync#
18b80092844ac2b9171ddf150c54eefda051d771vboxsync# Link-editor mapfile to create a non-executable data segment definition
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync# within an executable. Note that this only functions properly on the
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# x86 architecture. On SPARC, the data segment contains a Procedure Linkage
d05e0aca826e72aa0cc78aced33dc8fc036c4483vboxsync# Table (PLT) that must remain executable.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# As the data segment is extended by sbrk(2) to enlarge the heap, a
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# non-executable data segment also results in a non-exutable heap.
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# The link-editor does not use this file automatically, so one must use the
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync# -M option to cc or ld:
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsync#
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync# cc -M /usr/lib/ld/map.noexdata myprogram.c
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync#
9161d9a8318db73b2848c1feaef3880980474e64vboxsyncdata = ?RW;
4429cc47d1e3ca88d6237e5ee7a876dc409cdc24vboxsync
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# Executables can also create a separate non-executable bss segment.
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# This segment may use additional memory, but also results in a
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync# non-executable heap. See /usr/lib/ld/map.noexbss.
cd2563833557c14e1739f8e10c4922061708caf1vboxsync#
cd2563833557c14e1739f8e10c4922061708caf1vboxsync# See also /usr/lib/ld/map.execdata.
236f71c54929e835b07c91ace8d7009beb6bf4bdvboxsync