xref: /onnv-gate/usr/src/cmd/sgs/rtld/common/mapfile-order-gcc (revision 12692:4341b447c069)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
51618Srie# Common Development and Distribution License (the "License").
61618Srie# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
211618Srie
221618Srie#
23*12692SAli.Bahrami@Oracle.COM# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
241618Srie#
250Sstevel@tonic-gate# Note: This mapfile is used to place r_debug as the
260Sstevel@tonic-gate# very first data item inside of the run-time linker.
270Sstevel@tonic-gate# This is required for the ld.so.1 <--> rtld_db bootstraping
280Sstevel@tonic-gate# for debuggers.
290Sstevel@tonic-gate#
300Sstevel@tonic-gate# The issue with this is that gcc/devpro do not agree on the
310Sstevel@tonic-gate# name of the section this data should be placed in.  So -
320Sstevel@tonic-gate# we must have a mapfile for each.
330Sstevel@tonic-gate#
340Sstevel@tonic-gate# If you update this file - make sure you update
350Sstevel@tonic-gate# the matching file:
360Sstevel@tonic-gate#
370Sstevel@tonic-gate#	gcc mapfile:	rtld/common/mapfile-order-gcc
380Sstevel@tonic-gate#	devpro mapfile: rtld/common/mapfile-order-devpro
390Sstevel@tonic-gate#
400Sstevel@tonic-gate
41*12692SAli.Bahrami@Oracle.COM$mapfile_version 2
42*12692SAli.Bahrami@Oracle.COM
43*12692SAli.Bahrami@Oracle.COMLOAD_SEGMENT data {
44*12692SAli.Bahrami@Oracle.COM	FLAGS = READ WRITE EXECUTE;
45*12692SAli.Bahrami@Oracle.COM
46*12692SAli.Bahrami@Oracle.COM	# .data.rel sections from pics/debugdata.o go to data segment
47*12692SAli.Bahrami@Oracle.COM	ASSIGN_SECTION dbg_data {
48*12692SAli.Bahrami@Oracle.COM		IS_NAME = .data.rel;
49*12692SAli.Bahrami@Oracle.COM		FILE_PATH = pics/debugdata.o;
50*12692SAli.Bahrami@Oracle.COM	};
51*12692SAli.Bahrami@Oracle.COM
52*12692SAli.Bahrami@Oracle.COM	# Put .data.rel sections from pics/debugdata.o ahead of any other
53*12692SAli.Bahrami@Oracle.COM	# .data.rel input sections in the .data.rel output section.
54*12692SAli.Bahrami@Oracle.COM	IS_ORDER = dbg_data;
55*12692SAli.Bahrami@Oracle.COM
56*12692SAli.Bahrami@Oracle.COM	# Put .data.rel output section at top of data segment
57*12692SAli.Bahrami@Oracle.COM	OS_ORDER = .data.rel;
58*12692SAli.Bahrami@Oracle.COM};
59