xref: /titanic_41/usr/src/common/mapfiles/common/map.default (revision cd3e933325e68e23516a196a8fea7f49b1e497c3)
1*cd3e9333SAli Bahrami#
2*cd3e9333SAli Bahrami# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
3*cd3e9333SAli Bahrami#
4*cd3e9333SAli Bahrami# CDDL HEADER START
5*cd3e9333SAli Bahrami#
6*cd3e9333SAli Bahrami# The contents of this file are subject to the terms of the
7*cd3e9333SAli Bahrami# Common Development and Distribution License (the "License").
8*cd3e9333SAli Bahrami# You may not use this file except in compliance with the License.
9*cd3e9333SAli Bahrami#
10*cd3e9333SAli Bahrami# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11*cd3e9333SAli Bahrami# or http://www.opensolaris.org/os/licensing.
12*cd3e9333SAli Bahrami# See the License for the specific language governing permissions
13*cd3e9333SAli Bahrami# and limitations under the License.
14*cd3e9333SAli Bahrami#
15*cd3e9333SAli Bahrami# When distributing Covered Code, include this CDDL HEADER in each
16*cd3e9333SAli Bahrami# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17*cd3e9333SAli Bahrami# If applicable, add the following below this CDDL HEADER, with the
18*cd3e9333SAli Bahrami# fields enclosed by brackets "[]" replaced with your own identifying
19*cd3e9333SAli Bahrami# information: Portions Copyright [yyyy] [name of copyright owner]
20*cd3e9333SAli Bahrami#
21*cd3e9333SAli Bahrami# CDDL HEADER END
22*cd3e9333SAli Bahrami#
23*cd3e9333SAli Bahrami# Linker mapfile that shows how programs are loaded by default.
24*cd3e9333SAli Bahrami# The linker does not use this file automatically, so one must use the -M
25*cd3e9333SAli Bahrami# option to cc or ld:
26*cd3e9333SAli Bahrami#
27*cd3e9333SAli Bahrami#	cc -M /usr/lib/ld/map.default myprogram.c
28*cd3e9333SAli Bahrami#
29*cd3e9333SAli Bahrami
30*cd3e9333SAli Bahrami$mapfile_version 2
31*cd3e9333SAli Bahrami
32*cd3e9333SAli Bahrami$if _sparc
33*cd3e9333SAli Bahrami
34*cd3e9333SAli Bahrami$if _ELF32
35*cd3e9333SAli BahramiLOAD_SEGMENT text { VADDR = 0x10000 };
36*cd3e9333SAli Bahrami$elif _ELF64
37*cd3e9333SAli Bahrami# This is equivalent to map.above4G.
38*cd3e9333SAli BahramiLOAD_SEGMENT text { VADDR = 0x100000000 };
39*cd3e9333SAli Bahrami$else
40*cd3e9333SAli Bahrami$error unknown sparc ELFCLASS
41*cd3e9333SAli Bahrami$endif
42*cd3e9333SAli Bahrami
43*cd3e9333SAli Bahrami
44*cd3e9333SAli Bahrami$else _x86
45*cd3e9333SAli Bahrami
46*cd3e9333SAli Bahrami$if _ELF32
47*cd3e9333SAli BahramiLOAD_SEGMENT text { VADDR = 0x08048000 };
48*cd3e9333SAli Bahrami$elif _ELF64
49*cd3e9333SAli Bahrami# This is equivalent to map.below4G.
50*cd3e9333SAli BahramiLOAD_SEGMENT text { VADDR = 0x400000 };
51*cd3e9333SAli Bahrami$else
52*cd3e9333SAli Bahrami$error unknown x86 ELFCLASS
53*cd3e9333SAli Bahrami$endif
54*cd3e9333SAli Bahrami
55*cd3e9333SAli Bahrami$else
56*cd3e9333SAli Bahrami$error unknown platform
57*cd3e9333SAli Bahrami$endif
58