xref: /illumos-gate/usr/src/common/mapfiles/common/map.filter (revision 9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829)
1#
2# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# CDDL HEADER START
6#
7# The contents of this file are subject to the terms of the
8# Common Development and Distribution License (the "License").
9# You may not use this file except in compliance with the License.
10#
11# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12# or http://www.opensolaris.org/os/licensing.
13# See the License for the specific language governing permissions
14# and limitations under the License.
15#
16# When distributing Covered Code, include this CDDL HEADER in each
17# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18# If applicable, add the following below this CDDL HEADER, with the
19# fields enclosed by brackets "[]" replaced with your own identifying
20# information: Portions Copyright [yyyy] [name of copyright owner]
21#
22# CDDL HEADER END
23#
24# A default mapfile for optimizing the creation of a filter shared object.
25# Creates a single, read-only, executable text segment to catch all loadable
26# sections.
27#
28# Filters that consist solely of a symbol table can be built directly from
29# ld(1) so that no .init/.fini sections are created.  Although the filter can
30# be constructed as a single read-only segment, the execute attribute of the
31# segment is maintained to allow for simple .init processing (i.e., .init
32# processing that requires no relocations), and to accommodate older versions
33# of dbx that produce warning messages if they find objects without traditional
34# text segments.
35#
36# If a filter is required to execute .init code that references global data
37# then the filter will require relocation (i.e., it will have to be written to
38# by ld.so.1).  Filters of this sort should *not* use this mapfile.
39#
40# This compaction of a filter into a single segment allows ld.so.1 to optimize
41# its processing of a filter.  If the filter is small enough this segment may
42# be handled in a single page mapping (for example libdl.so.1).
43#
44# The assignment of all allocatable sections to this segment insures that the
45# .dynamic, and any .data or .bss sections, become part of the text.  Note that
46# the compiler has a habit of generating empty .data and .bss sections.
47#
48# Override the default alignment so that this single paged object can be mapped
49# more flexibly.
50
51filter = LOAD ?RX A0x1000;
52filter : ?A;
53