Makefile revision 24da5b34f49324ed742a340010ed5bd3d4e06625
1117N/A# The contents of this file are subject to the terms of the 1466N/A# Common Development and Distribution License (the "License"). 1117N/A# You may not use this file except in compliance with the License. 1117N/A# See the License for the specific language governing permissions 1117N/A# and limitations under the License. 1117N/A# When distributing Covered Code, include this CDDL HEADER in each 1117N/A# If applicable, add the following below this CDDL HEADER, with the 1117N/A# fields enclosed by brackets "[]" replaced with your own identifying 1117N/A# information: Portions Copyright [yyyy] [name of copyright owner] 1117N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 1117N/A# Use is subject to license terms. 1117N/A# ident "%Z%%M% %I% %E% SMI" 1117N/A# A number of dynamic executables have their own definitions of interfaces that 1117N/A# exist in system libraries. To prevent name-space pollution it is desirable 1117N/A# to demote the interfaces within these executable to locals. However, various 1117N/A# symbols defined by the compiler drivers crt/values files need to remain 1466N/A# global in any dynamic object that includes these files. These symbols 1466N/A# interpose on symbols in libc, or provide call backs for other system 1117N/A# libraries. The various compiler drivers (cc and gcc), and the crt/values 1117N/A# files that these drivers are configured to include, differ between the 1117N/A# various compilations environments (platform, 32/64-bit). Therefore, the 1466N/A# only means of creating a mapfile to demote symbols is to dynamically generate 1476N/A# the mapfile for a specific compilation environment. 1425N/A# Here, template mapfiles are used to generate a number of compilation specific 1425N/A# mapfiles. These mapfiles are referenced by components of the build through 1117N/A# mapfiles are not delivered into the $ROOT area, and therefore are not 1117N/A# delivered as packaged components of the OSNet. 1117N/A# This generic target creates two dynamic executables from an empty "main" 1117N/A# program. These objects are not executed, but are analyzed to determine the 1117N/A# global symbols each provides. 1117N/A# The first executable demotes a family of known interfaces to local and allows 1117N/A# all other symbol definitions to remain global. This executables provides the 1117N/A# base for discovering all symbol definitions provided by the various 1117N/A# compilation environments. The second executable demotes all symbols to 1117N/A# locals. Within both executables, some symbols remain globals (_end, _etext, 1117N/A# etc.) as the link-editor has special knowledge of these symbols and their 1117N/A# expected visibility requirements. By inspecting the deferences between the 1117N/A# global symbols within the two executables, a mapfile can be generated to 1269N/A# ensure the symbols defined by the compilation environments files remain $(SED) -e
"s/ *# MAP-TAIL//" >> $@