diff options
Diffstat (limited to 'usr/src')
275 files changed, 2370 insertions, 1841 deletions
diff --git a/usr/src/Makefile b/usr/src/Makefile index 3cb396d288..8648e5d532 100644 --- a/usr/src/Makefile +++ b/usr/src/Makefile @@ -83,11 +83,14 @@ _msg := TARGET= _msg # build create 'packages' also. To build packages # cd pkgdefs and do a 'make install' # -all: closedbins sgs .WAIT $(SUBDIRS) pkg_all -install: closedbins sgs .WAIT $(SUBDIRS) pkg_all .WAIT _msg +all: mapfiles closedbins sgs .WAIT $(SUBDIRS) pkg_all +install: mapfiles closedbins sgs .WAIT $(SUBDIRS) pkg_all .WAIT _msg @cd pkgdefs/SUNW0on; pwd; $(MAKE) _msg @rm -rf "$(ROOT)/catalog" +mapfiles: + @cd common/mapfiles; pwd; $(MAKE) install + clean clobber: $(SUBDIRS) head pkgdefs _msg: _msgdirs rootdirs $(MSGSUBDIRS) @@ -147,7 +150,7 @@ sgs: rootdirs .WAIT sysheaders userheaders .WAIT \ # source trees w/o usr/closed), this also depends on the closedbins # target (above) in order to properly seed the proto area # -setup: closedbins sgs +setup: mapfiles closedbins sgs @cd tools; pwd; $(MAKE) install # /var/mail/:saved is a special case because of the colon in the name. diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index 92018f8834..258a59b0c6 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -154,6 +154,7 @@ NAWK= /usr/bin/nawk CP= /usr/bin/cp -f MCS= /usr/ccs/bin/mcs CAT= /usr/bin/cat +ELFDUMP= /usr/ccs/bin/elfdump M4= /usr/ccs/bin/m4 STRIP= /usr/ccs/bin/strip LEX= /usr/ccs/bin/lex @@ -543,11 +544,42 @@ CCOPTFLAG= $($(MACH)_CCOPTFLAG) CCOPTFLAG64= $($(MACH64)_CCOPTFLAG) CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS) CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) + +# +# Various mapfiles that are used throughout the build, and delivered to +# /usr/lib/ld. # -# Used by Makefile.cmd, Makefile.lib and Makefile.ucbcmd +MAPFILE.NED_i386 = $(SRC)/common/mapfiles/i386/map.noexdata +MAPFILE.NED_sparc = +MAPFILE.NED = $(MAPFILE.NED_$(MACH)) +MAPFILE.PGA = $(SRC)/common/mapfiles/$(MACH)/map.pagealign +MAPFILE.NES = $(SRC)/common/mapfiles/common/map.noexstk +MAPFILE.FLT = $(SRC)/common/mapfiles/common/map.filter + # -PGA_MAPFILE = $(SRC)/cmd/sgs/mapfiles/$(MACH)/map.pagealign +# Generated mapfiles that are compiler specific, and used throughout the +# build. These mapfiles are not delivered in /usr/lib/ld. # +MAPFILE.NGB_sparc= $(SRC)/common/mapfiles/gen/sparc_cc_map.noexeglobs +$(__GNUC64)MAPFILE.NGB_sparc= \ + $(SRC)/common/mapfiles/gen/sparc_gcc_map.noexeglobs +MAPFILE.NGB_sparcv9= $(SRC)/common/mapfiles/gen/sparcv9_cc_map.noexeglobs +$(__GNUC64)MAPFILE.NGB_sparcv9= \ + $(SRC)/common/mapfiles/gen/sparcv9_gcc_map.noexeglobs +MAPFILE.NGB_i386= $(SRC)/common/mapfiles/gen/i386_cc_map.noexeglobs +$(__GNUC64)MAPFILE.NGB_i386= \ + $(SRC)/common/mapfiles/gen/i386_gcc_map.noexeglobs +MAPFILE.NGB_amd64= $(SRC)/common/mapfiles/gen/amd64_cc_map.noexeglobs +$(__GNUC64)MAPFILE.NGB_amd64= \ + $(SRC)/common/mapfiles/gen/amd64_gcc_map.noexeglobs +MAPFILE.NGB = $(MAPFILE.NGB_$(MACH)) + +# +# A generic interface mapfile name, used by various dynamic objects to define +# the interfaces and interposers the object must export. +# +MAPFILE.INT = mapfile-intf + # # LDLIBS32 can be set in the environment to override the following assignment. # LDLIBS64 can be set to override the assignment made in Makefile.master.64. @@ -705,11 +737,13 @@ CCYFLAG= -Y I, BDIRECT= -Bdirect BDYNAMIC= -Bdynamic BLOCAL= -Blocal +BNODIRECT= -Bnodirect BREDUCE= -Breduce BSTATIC= -Bstatic ZCOMBRELOC= -zcombreloc ZDEFS= -zdefs +ZDIRECT= -zdirect ZIGNORE= -zignore ZINITFIRST= -zinitfirst ZINTERPOSE= -zinterpose @@ -726,6 +760,7 @@ ZNORELOC= -znoreloc ZNOVERSION= -znoversion ZREDLOCSYM= -zredlocsym ZTEXT= -ztext +ZVERBOSE= -zverbose GSHARED= -G CCMT= -mt diff --git a/usr/src/Makefile.master.64 b/usr/src/Makefile.master.64 index 53c8cba50d..08497fa733 100644 --- a/usr/src/Makefile.master.64 +++ b/usr/src/Makefile.master.64 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -82,3 +81,4 @@ $(__GNUC64)CCNEEDED = -L$(SFWLIBDIR) -R$(SFWLIBDIR) -lstdc++ \ -lgcc_s_$(MACH64) BUILDCCC.SO= $(CCC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS) $(CCNEEDED) +MAPFILE.NGB = $(MAPFILE.NGB_$(MACH64)) diff --git a/usr/src/cmd/Makefile.cmd b/usr/src/cmd/Makefile.cmd index fcb7ab9b56..b48e716975 100644 --- a/usr/src/cmd/Makefile.cmd +++ b/usr/src/cmd/Makefile.cmd @@ -123,16 +123,11 @@ ROOTSFWMAN7= $(ROOT)/usr/sfw/share/man/man7 ISAEXEC= $(ROOT)/usr/lib/isaexec PLATEXEC= $(ROOT)/usr/lib/platexec -NX_MAP_i386= $(SRC)/cmd/mapfile_noexdata -NX_MAP_sparc= -NX_MAP= $(NX_MAP_$(MACH)) -NES_MAPFILE= $(SRC)/cmd/mapfile_noexstk $(NX_MAP) - LDLIBS = $(LDLIBS.cmd) LDFLAGS.cmd = \ $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \ - $(NES_MAPFILE:%=-M%) $(PGA_MAPFILE:%=-M%) + $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) LDFLAGS = $(LDFLAGS.cmd) diff --git a/usr/src/cmd/agents/snmp/snmprelayd/Makefile b/usr/src/cmd/agents/snmp/snmprelayd/Makefile index 06eb7fdb1d..fab80103fd 100644 --- a/usr/src/cmd/agents/snmp/snmprelayd/Makefile +++ b/usr/src/cmd/agents/snmp/snmprelayd/Makefile @@ -18,10 +18,10 @@ # # CDDL HEADER END # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # # snmp/snmprelayd/Makefile # @@ -124,7 +124,7 @@ CPPFLAGS += -I. -I../agent -I../snmplib -I../../include/netmgt -I${BIN} CFLAGS += -c -D$(TARG_SYS) -LDFLAGS += $(LDLIBS) +LDFLAGS += $(MAPFILE.INT:%=-M%) $(LDLIBS) LINT=lint @@ -157,7 +157,7 @@ all: $(SOURCES.h) $(BINPROG) $(CONFIG_FILES) install: all $(OPTPROG) $(CONFRULE) $(ROOTMANIFEST) $(ROOTSVCMETHOD) -$(BINPROG): $(BIN) $(OBJECTS) $(BIN)/config.o $(MYLIBS) +$(BINPROG): $(BIN) $(OBJECTS) $(BIN)/config.o $(MYLIBS) $(MAPFILE.INT) $(CC) -o $(BINPROG) $(LDFLAGS) $(OBJECTS) $(BIN)/config.o \ $(MYLINKLIBS) $(LIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/agents/snmp/snmprelayd/mapfile-intf b/usr/src/cmd/agents/snmp/snmprelayd/mapfile-intf new file mode 100644 index 0000000000..ae228d4cc7 --- /dev/null +++ b/usr/src/cmd/agents/snmp/snmprelayd/mapfile-intf @@ -0,0 +1,44 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# snmpdx provides a couple of libssagent.so.1 functions. Reduce all remaining +# symbols to locals. +{ + global: + default_config_file; + default_error_file; + default_sec_config_file; + node_table; + agent_end; + agent_select_info; + agent_select_callback; + agent_loop; + agent_init; + local: + *; +}; diff --git a/usr/src/cmd/bnu/Makefile.inc b/usr/src/cmd/bnu/Makefile.inc index 23cf33b1b7..b98f99e34e 100644 --- a/usr/src/cmd/bnu/Makefile.inc +++ b/usr/src/cmd/bnu/Makefile.inc @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,7 +36,7 @@ SRCS = account.c anlwrk.c bnuconvert.c callers.c \ gtcfile.c gwd.c imsg.c in.uucpd.c interface.c limits.c \ line.c logent.c mailst.c perfstat.c \ permission.c pk0.c pk1.c pkdefs.c security.c \ - setmode.c shio.c statlog.c stoa.c strecpy.c strpbrk.c \ + setmode.c shio.c statlog.c stoa.c strpbrk.c \ strsave.c sysfiles.c systat.c ulockf.c unknown.c \ utility.c uucheck.c uucico.c uucleanup.c uucp.c \ uucpdefs.c uucpname.c uudecode.c uuencode.c \ @@ -81,11 +80,11 @@ uucico.cat := POBJS = uucpdefs.o uucico.o conn.o callers.o cntrl.o \ pk0.o pk1.o anlwrk.o permission.o getargs.o \ gnxseq.o pkdefs.o imsg.o gtcfile.o grades.o \ mailst.o uucpname.o line.o chremdir.o \ - interface.o statlog.o strecpy.o stoa.o \ + interface.o statlog.o stoa.o \ perfstat.o account.o security.o limits.o \ $(STRPBRK) $(PROTOCOLOBJS) $(OTHEROBJS) \ versys.o setmode.o -uucico:= PLIBS = $(TLILIB) +uucico:= PLIBS = $(TLILIB) -lgen uuname \ uuname.cat := POBJS = uuname.o uucpname.o uucpdefs.o getpwinfo.o \ @@ -125,14 +124,14 @@ remote.unknown.cat := POBJS = unknown.o cu \ cu.cat := POBJS = cu.o callers.o getargs.o line.o uucpdefs.o \ ulockf.o conn.o interface.o strsave.o \ - sysfiles.o strecpy.o stoa.o setmode.o -cu:= PLIBS = $(TLILIB) + sysfiles.o stoa.o setmode.o +cu:= PLIBS = $(TLILIB) -lgen ct \ ct.cat := POBJS = ct.o callers.o getargs.o line.o uucpdefs.o \ ulockf.o conn.o interface.o sysfiles.o \ - strsave.o strecpy.o stoa.o setmode.o -ct:= PLIBS = $(TLILIB) + strsave.o stoa.o setmode.o +ct:= PLIBS = $(TLILIB) -lgen uudecode \ uudecode.cat := POBJS = uudecode.o common.o diff --git a/usr/src/cmd/bnu/callers.c b/usr/src/cmd/bnu/callers.c index 93f0c17efc..7e8f3fea2b 100644 --- a/usr/src/cmd/bnu/callers.c +++ b/usr/src/cmd/bnu/callers.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,10 +42,11 @@ #include "UNET/tcp.h" #endif +#include <libgen.h> EXTERN void alarmtr(); EXTERN jmp_buf Sjbuf; -EXTERN char *fdig(), *strecpy(); +EXTERN char *fdig(); EXTERN int interface(); EXTERN int fd_mklock(), fd_cklock(), chat(), getdialline(); EXTERN void fixline(), fd_rmlock(); diff --git a/usr/src/cmd/bnu/dial.c b/usr/src/cmd/bnu/dial.c index 67fb4f1c5c..d8238b732c 100644 --- a/usr/src/cmd/bnu/dial.c +++ b/usr/src/cmd/bnu/dial.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,11 +18,16 @@ * * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T + * All Rights Reserved + * + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:dial.c 1.3 */ -#ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:dial.c 1.3 */ /*LINTLIBRARY*/ /*************************************************************** * dial() returns an fd for an open tty-line connected to the @@ -113,7 +117,6 @@ #include "interface.c" #include "line.c" #include "stoa.c" -#include "strecpy.c" #include "strsave.c" #include "sysfiles.c" #include "ulockf.c" diff --git a/usr/src/cmd/bnu/strecpy.c b/usr/src/cmd/bnu/strecpy.c deleted file mode 100644 index e819b3ee76..0000000000 --- a/usr/src/cmd/bnu/strecpy.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:strecpy.c 1.3 */ - -#include "uucp.h" - -/* - strecpy(output, input, except) - strccpy copys the input string to the output string expanding - any non-graphic character with the C escape sequence. - Esacpe sequences produced are those defined in "The C Programming - Language" pages 180-181. - Characters in the except string will not be expanded. -*/ - -GLOBAL char * -strecpy( pout, pin, except ) -register char *pout; -register char *pin; -char *except; -{ - register unsigned c; - register char *output; - - output = pout; - while( (c = *pin++) != 0 ) { - if( !isprint( c ) && ( !except || !strchr( except, c ) ) ) { - *pout++ = '\\'; - switch( c ) { - case '\n': - *pout++ = 'n'; - continue; - case '\t': - *pout++ = 't'; - continue; - case '\b': - *pout++ = 'b'; - continue; - case '\r': - *pout++ = 'r'; - continue; - case '\f': - *pout++ = 'f'; - continue; - case '\v': - *pout++ = 'v'; - continue; - case '\\': - continue; - default: - sprintf( pout, "%.3o", c ); - pout += 3; - continue; - } - } - if( c == '\\' && ( !except || !strchr( except, c ) ) ) - *pout++ = '\\'; - *pout++ = (char) c; - } - *pout = '\0'; - return output; -} diff --git a/usr/src/cmd/captoinfo/Makefile b/usr/src/cmd/captoinfo/Makefile index 19fca25e65..562f9690fa 100644 --- a/usr/src/cmd/captoinfo/Makefile +++ b/usr/src/cmd/captoinfo/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,11 +18,12 @@ # # CDDL HEADER END # + # -#ident "%Z%%M% %I% %E% SMI" +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 1989,1996 by Sun Microsystems, Inc. -# All rights reserved. +# ident "%Z%%M% %I% %E% SMI" # PROG= captoinfo @@ -33,15 +33,15 @@ SRCS= $(OBJS:%.o=%.c) include ../Makefile.cmd -LDLIBS += -lcurses -CPPFLAGS += -I../../lib/libcurses/screen - +LDFLAGS += $(MAPFILE.INT:%=-M%) +LDLIBS += -lcurses +CPPFLAGS += -I../../lib/libcurses/screen .KEEP_STATE: all: $(PROG) -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILE.INT) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/pvs/common/mapfile-vers b/usr/src/cmd/captoinfo/mapfile-intf index 8926c12f55..7ef76f1729 100644 --- a/usr/src/cmd/sgs/pvs/common/mapfile-vers +++ b/usr/src/cmd/captoinfo/mapfile-intf @@ -20,17 +20,15 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -# Specify what global symbols we export (none). Note that we're not -# interested in declaring a version, simply scoping the file is sufficient. +# captoinfo interposes on cpr() and progname[]. { global: - main; # debuggers seem to like this. - local: - *; + cpr = INTERPOSE; + progname = INTERPOSE; }; diff --git a/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile b/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile index 2dacb88743..00a487f022 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile @@ -1,8 +1,8 @@ # -#ident "%Z%%M% %I% %E% SMI" +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. +# ident "%Z%%M% %I% %E% SMI" # PROG= chat @@ -12,6 +12,7 @@ SRCS= $(OBJS:%.o=%.c) include ../../../Makefile.cmd CPPFLAGS += -DSOL2 +LDFLAGS += $(MAPFILE.NGB:%=-M%) .KEEP_STATE: diff --git a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile index d7db17d316..15c7cee29f 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -42,11 +42,14 @@ CPPFLAGS += -D_FILE_OFFSET_BITS=64 \ -I$(SRC)/uts/common/gssapi/mechs/krb5/include LDLIBS += -lsocket -lnsl -lgss -LDFLAGS += $(ZLAZYLOAD) + +# ftp defines its own delete and glob - localize all symbols to prevent a +# name clash. +LDFLAGS += $(ZLAZYLOAD) $(MAPFILE.NGB:%=-M%) .KEEP_STATE: -all: $(PROG) +all: $(PROG) $(MAPFILE.NGB) $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c index 5c5638bc40..e7410fa87b 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c @@ -1,8 +1,8 @@ /* * utils.c - various utility functions used in pppd. * - * Copyright (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. * * Permission to use, copy, modify, and distribute this software and its * documentation is hereby granted, provided that the above copyright @@ -102,45 +102,6 @@ strllen(str, len) } /* - * strlcpy - like strcpy/strncpy, doesn't overflow destination buffer, - * always leaves destination null-terminated (for len > 0). - */ -size_t -strlcpy(dest, src, len) - char *dest; - const char *src; - size_t len; -{ - size_t ret = strlen(src); - - if (len != 0) { - if (ret < len) - (void) strcpy(dest, src); - else { - (void) strncpy(dest, src, len - 1); - dest[len-1] = 0; - } - } - return (ret); -} - -/* - * strlcat - like strcat/strncat, doesn't overflow destination buffer, - * always leaves destination null-terminated (for len > 0). - */ -size_t -strlcat(dest, src, len) - char *dest; - const char *src; - size_t len; -{ - size_t dlen = strlen(dest); - - return (dlen + strlcpy(dest + dlen, src, (len > dlen? len - dlen: 0))); -} - - -/* * slprintf - format a message into a buffer. Like sprintf except we * also specify the length of the output buffer, and we handle %m * (error message), %v (visible string), %q (quoted string), %t diff --git a/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile b/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile index 84545551cd..a79bc82266 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -39,7 +38,7 @@ include ../../Makefile.cmd-inet CPPFLAGS += -DSYSV -DSTRNET -DBSD_COMP LDLIBS += -lsocket -lnsl -LDFLAGS += $(ZLAZYLOAD) +LDFLAGS += $(ZLAZYLOAD) $(MAPFILE.NGB:%=-M%) include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 LDFLAGS += $(KRUNPATH) -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL) @@ -60,7 +59,7 @@ $(ROOTPROG) := OWNER= root all: $(PROG) -$(PROG): $(OBJS) $(KCMDOBJS) $(YOBJS) +$(PROG): $(OBJS) $(KCMDOBJS) $(YOBJS) $(MAPFILE.NGB) $(LINK.c) $(OBJS) $(KCMDOBJS) $(YOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile index 4788abbea5..72acb85862 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,7 +37,7 @@ LOCAL_OBJS = bootp.o dhcp.o dhcptab.o encode.o generic.o hash.o icmp.o \ interfaces.o logging.o main.o misc.o per_dnet.o relay.o LOCAL_SRCS = $(LOCAL_OBJS:%.o=%.c) -CMN_OBJS = scan.o ipv4_sum.o +CMN_OBJS = ipv4_sum.o CMN_SRCS = $(CMN_OBJS:%.o=$(CMN_DIR)/%.c) SRCS = $(LOCAL_SRCS) $(CMN_SRCS) @@ -49,7 +49,7 @@ ROOTMANIFESTDIR= $(ROOTSVCNETWORK) CPPFLAGS += -DNDEBUG -DNPROBE -D_REENTRANT -I./ -I$(CMN_DIR) LINTFLAGS += -u -LDFLAGS += -L$(NSU_DIR) -R/usr/lib/inet/dhcp/nsu +LDFLAGS += -L$(NSU_DIR) -R/usr/lib/inet/dhcp/nsu $(MAPFILE.NGB:%=-M%) LDLIBS += $(NSU_DIR)/rfc2136.so.1 -ldhcpsvc -ldhcputil -linetutil \ -lsocket -lnsl -lmtmalloc -lresolv lint := LDLIBS = $(LDLIBS.cmd) -ldhcpsvc -ldhcputil -linetutil -lsocket -lnsl @@ -72,7 +72,7 @@ XGETFLAGS += -a -x in.dhcpd.xcl all: $(PROG) -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILE.NGB) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/Makefile index 064f9a6ecd..4a609825d2 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/Makefile @@ -148,6 +148,7 @@ $(TSNETPROG) := LDLIBS += $(ZLAZYLOAD) -ltsnet $(ZNOLAZYLOAD) in.rarpd := LDLIBS += -linetutil route := CPPFLAGS += -DNDEBUG +gettable in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%) .KEEP_STATE: diff --git a/usr/src/cmd/cmd-inet/usr.sbin/in.ftpd/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/in.ftpd/Makefile index 5b317f637b..7998c3fe87 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/in.ftpd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/in.ftpd/Makefile @@ -1,7 +1,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -50,6 +50,8 @@ CPPFLAGS += -DBSD_COMP -D_FILE_OFFSET_BITS=64 -DINET6 -DSOLARIS_BSM_AUDIT \ LDLIBS += -lsocket -lnsl -lpam -lbsm -lsendfile -lgss YFLAGS += -d +in.ftpd := LDFLAGS += $(MAPFILE.NGB:%=-M%) + # tcov output relies on atexit(3C) registered functions being called, so stop # _exit() from being used. Passing -l to yacc stops it generating #line # directives which don't work with tcov. @@ -61,7 +63,7 @@ tcov := YFLAGS += -l all tcov: $(PROG) ckconfig ftpwho $(CONFIGFILES) $(SCRIPTS) -in.ftpd: $(FTPD_OBJS) +in.ftpd: $(FTPD_OBJS) $(MAPFILE.NGB) $(LINK.c) $(FTPD_OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile index ee1dec05cb..405d4bbe03 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile @@ -48,8 +48,8 @@ HDRS= snoop.h snoop_mip.h at.h snoop_ospf.h snoop_ospf6.h include ../../../Makefile.cmd CPPFLAGS += -I. -I$(SRC)/common/net/dhcp -LDLIBS += -ldhcputil -ldlpi -lsocket -lnsl \ - -z lazyload -ltsol -z nolazyload +LDLIBS += -ldhcputil -ldlpi -lsocket -lnsl $(ZLAZYLOAD) -ltsol $(ZNOLAZYLOAD) +LDFLAGS += $(MAPFILE.NGB:%=-M%) .KEEP_STATE: @@ -57,7 +57,7 @@ LDLIBS += -ldhcputil -ldlpi -lsocket -lnsl \ all: $(PROG) -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILE.NGB) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/csh/i386/Makefile b/usr/src/cmd/csh/i386/Makefile index 9b86d08e0f..462c692306 100644 --- a/usr/src/cmd/csh/i386/Makefile +++ b/usr/src/cmd/csh/i386/Makefile @@ -1,4 +1,4 @@ -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T @@ -31,6 +31,9 @@ LAZYLIBS = $(ZLAZYLOAD) -lsecdb $(ZNOLAZYLOAD) lint := LAZYLIBS = -lsecdb LDLIBS += -lcurses $(LAZYLIBS) +MAPFILES = ../mapfile-intf $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) + PFOBJS = sh_policy.o HDDEP = sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.file.o \ @@ -63,7 +66,7 @@ all: $(PROG) $(COMPILE.c) $< $(POST_PROCESS_O) -$(CSH_PROG): $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) +$(CSH_PROG): $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) $(MAPFILES) $(LINK.c) $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/elfdump/common/mapfile-vers b/usr/src/cmd/csh/mapfile-intf index fdd8464b9b..15ef2478cd 100644 --- a/usr/src/cmd/sgs/elfdump/common/mapfile-vers +++ b/usr/src/cmd/csh/mapfile-intf @@ -20,18 +20,15 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # -# Specify what global symbols we export (none). Note that we're not -# interested in declaring a version, simply scoping the file is sufficient. - +# csh interposes on a couple of libc functions (printf and signal). { global: - main; # debuggers seem to like this. - local: - *; + printf = INTERPOSE; + signal = INTERPOSE; }; diff --git a/usr/src/cmd/csh/sparc/Makefile b/usr/src/cmd/csh/sparc/Makefile index 9b634d23c5..5096a15cc7 100644 --- a/usr/src/cmd/csh/sparc/Makefile +++ b/usr/src/cmd/csh/sparc/Makefile @@ -1,4 +1,4 @@ -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T @@ -31,6 +31,9 @@ LAZYLIBS = $(ZLAZYLOAD) -lsecdb $(ZNOLAZYLOAD) lint := LAZYLIBS = -lsecdb LDLIBS += -lcurses $(LAZYLIBS) +MAPFILES = ../mapfile-intf $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) + PFOBJS = sh_policy.o HDDEP = sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.file.o \ @@ -63,7 +66,7 @@ all: $(PROG) $(COMPILE.c) $< $(POST_PROCESS_O) -$(CSH_PROG): $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) +$(CSH_PROG): $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) $(MAPFILES) $(LINK.c) $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/dc/Makefile b/usr/src/cmd/dc/Makefile index b62036b5a2..942c4fd993 100644 --- a/usr/src/cmd/dc/Makefile +++ b/usr/src/cmd/dc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,9 +19,9 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -34,9 +33,11 @@ XPG6EXOBJS= exobjs.xpg6/dc.o include ../Makefile.cmd +LDFLAGS += $(MAPFILE.NGB:%=-M%) + .KEEP_STATE: -all: $(PROG) $(XPG6) +all: $(MAPFILE.NGB) $(PROG) $(XPG6) $(PROG): $(EXOBJS) $(LINK.c) -o $@ $(EXOBJS) $(LDLIBS) diff --git a/usr/src/cmd/des/Makefile b/usr/src/cmd/des/Makefile index 6e847ebcc9..670f2b9200 100644 --- a/usr/src/cmd/des/Makefile +++ b/usr/src/cmd/des/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,28 @@ # # CDDL HEADER END # + # -#pragma ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" -PROG= des +PROG = des -include ../Makefile.cmd +include ../Makefile.cmd -LDLIBS += -lcrypt +LDLIBS += -lcrypt +LDFLAGS += $(MAPFILE.NGB:%=-M%) .KEEP_STATE: -all: $(PROG) +all: $(PROG) -install: all $(ROOTPROG) +install: all $(ROOTPROG) clean: -lint: lint_PROG +lint: lint_PROG -include ../Makefile.targ +include ../Makefile.targ diff --git a/usr/src/cmd/dtrace/test/cmd/baddof/Makefile b/usr/src/cmd/dtrace/test/cmd/baddof/Makefile index 20180c613b..bb7a746db7 100644 --- a/usr/src/cmd/dtrace/test/cmd/baddof/Makefile +++ b/usr/src/cmd/dtrace/test/cmd/baddof/Makefile @@ -32,7 +32,7 @@ include $(SRC)/cmd/Makefile.cmd ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt ROOTBIN = $(ROOTOPTPKG)/bin -LDFLAGS += -znodefs -ztextoff +LDFLAGS += $(ZNODEFS) $(ZTEXTOFF) LDLIBS = $(LDLIBS.cmd) LDLIBS += -ldtrace diff --git a/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile b/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile index 11a6d15070..6c3257df0b 100644 --- a/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile +++ b/usr/src/cmd/dtrace/test/cmd/badioctl/Makefile @@ -32,7 +32,7 @@ include $(SRC)/cmd/Makefile.cmd ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt ROOTBIN = $(ROOTOPTPKG)/bin -LDFLAGS += -znodefs -ztextoff +LDFLAGS += $(ZNODEFS) $(ZTEXTOFF) LDLIBS = $(LDLIBS.cmd) SRCS = badioctl diff --git a/usr/src/cmd/dtrace/test/tst/i386/Makefile b/usr/src/cmd/dtrace/test/tst/i386/Makefile index 72e54d3f9f..6a1c326598 100644 --- a/usr/src/cmd/dtrace/test/tst/i386/Makefile +++ b/usr/src/cmd/dtrace/test/tst/i386/Makefile @@ -32,7 +32,7 @@ ASFLAGS += -P -D_ASM $(CPPFLAGS) CLOBBER_FILES += helper_helper.o annotated_helper.o # For the helper test we require an executable data section. -ustack/tst.helper.exe := LDFLAGS = -M$(SRC)/cmd/mapfile_noexstk +ustack/tst.helper.exe := LDFLAGS = -M$(MAPFILE.NES) ustack/tst.helper.exe: ustack/tst.helper.o ustack/helper_helper.o $(LINK.c) -o ustack/tst.helper.exe \ diff --git a/usr/src/cmd/ed/Makefile b/usr/src/cmd/ed/Makefile index 96b1018a31..ebc837d99d 100644 --- a/usr/src/cmd/ed/Makefile +++ b/usr/src/cmd/ed/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -48,6 +47,9 @@ lint := LAZYLIBS = -lgen -lcrypt LDLIBS += -lmapmalloc $(LAZYLIBS) XGETFLAGS += -a -x ed.xcl +MAPFILE.INT = ../expr/mapfile-intf +LDFLAGS += $(MAPFILE.INT:%=-M%) + POFILE= ed_cmd.po %.po: ../expr/%.c @@ -57,17 +59,17 @@ POFILE= ed_cmd.po .KEEP_STATE: -all: $(PROG) $(XPG4) $(XPG6) +all: $(PROG) $(XPG4) $(XPG6) -$(PROG): $(EDOBJ) +$(PROG): $(EDOBJ) $(MAPFILE.INT) $(LINK.c) $(EDOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -$(XPG4): edobjs.xpg4 $(XPG4EDOBJ) +$(XPG4): edobjs.xpg4 $(XPG4EDOBJ) $(MAPFILE.INT) $(LINK.c) $(XPG4EDOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -$(XPG6): edobjs.xpg6 $(XPG6EDOBJ) +$(XPG6): edobjs.xpg6 $(XPG6EDOBJ) $(MAPFILE.INT) $(LINK.c) $(XPG6EDOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/ed/inc.flg b/usr/src/cmd/ed/inc.flg index cecf1a77dc..156b53e845 100644 --- a/usr/src/cmd/ed/inc.flg +++ b/usr/src/cmd/ed/inc.flg @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,13 +19,14 @@ # # CDDL HEADER END # + # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" -# echo_file usr/src/cmd/expr/compile.c +echo_file usr/src/cmd/expr/mapfile-intf echo_file usr/src/lib/common/common/values-xpg4.c echo_file usr/src/lib/common/common/values-xpg6.c diff --git a/usr/src/cmd/eqn/eqn.d/Makefile b/usr/src/cmd/eqn/eqn.d/Makefile index 9dc61128d8..597a9649da 100644 --- a/usr/src/cmd/eqn/eqn.d/Makefile +++ b/usr/src/cmd/eqn/eqn.d/Makefile @@ -1,8 +1,8 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1994 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/eqn/eqn.d/Makefile # @@ -33,6 +33,7 @@ CLEANFILES = y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def) YFLAGS = -d CPPFLAGS = -I. -I.. $(CPPFLAGS.master) +LDFLAGS += $(MAPFILE.NGB:%=-M%) .KEEP_STATE: @@ -44,7 +45,7 @@ $(POFILE): e.def $(POFILES) $(RM) $@ cat $(POFILES) > $@ -$(PROG) : $(OBJS) +$(PROG) : $(OBJS) $(MAPFILE.NGB) $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/eqn/neqn.d/Makefile b/usr/src/cmd/eqn/neqn.d/Makefile index 835b922c6f..2eccf34578 100644 --- a/usr/src/cmd/eqn/neqn.d/Makefile +++ b/usr/src/cmd/eqn/neqn.d/Makefile @@ -1,7 +1,8 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1989 by Sun Microsystems, Inc. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/eqn/neqn.d/Makefile # @@ -27,6 +28,7 @@ CLEANFILES = y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def) YFLAGS = -d CPPFLAGS = -DNEQN -I. -I.. $(CPPFLAGS.master) +LDFLAGS += $(MAPFILE.NGB:%=-M%) # # for message catalog @@ -38,7 +40,7 @@ POFILES= e.po all : $(PROG) -$(PROG) : $(OBJS) +$(PROG) : $(OBJS) $(MAPFILE.NGB) $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/expr/Makefile b/usr/src/cmd/expr/Makefile index 9a2cf3b144..44e0a20780 100644 --- a/usr/src/cmd/expr/Makefile +++ b/usr/src/cmd/expr/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,10 +19,10 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" PROG= expr XPG4PROG= expr @@ -49,21 +48,24 @@ XGETFLAGS += -a -x expr.xcl LDLIBS += -lgen +MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) + .KEEP_STATE: all: $(PROG) $(XPG4) $(XPG6) install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTXPG6PROG) -$(PROG): exprobjs $(EXPROBJ) +$(PROG): exprobjs $(EXPROBJ) $(MAPFILES) $(LINK.c) $(EXPROBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -$(XPG4): exprobjs.xpg4 $(XPG4EXPROBJ) +$(XPG4): exprobjs.xpg4 $(XPG4EXPROBJ) $(MAPFILES) $(LINK.c) $(XPG4EXPROBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -$(XPG6): exprobjs.xpg6 $(XPG6EXPROBJ) +$(XPG6): exprobjs.xpg6 $(XPG6EXPROBJ) $(MAPFILES) $(LINK.c) $(XPG6EXPROBJ) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/moe/common/mapfile-vers b/usr/src/cmd/expr/mapfile-intf index 9ad1792ae0..88ba2796f2 100644 --- a/usr/src/cmd/sgs/moe/common/mapfile-vers +++ b/usr/src/cmd/expr/mapfile-intf @@ -1,13 +1,9 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,15 +18,19 @@ # # CDDL HEADER END # + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # -# Specify what global symbols we export (none). Note that we're not -# interested in declaring a version, simply scoping the file is sufficient. - +# expr provides its own versions of advance, compile, and step - define +# these explicitly as interposers. { global: - main; # debuggers seem to like this. - local: - *; + advance = INTERPOSE; + compile = INTERPOSE; + step = INTERPOSE; }; diff --git a/usr/src/cmd/fm/fmd/Makefile.fmd b/usr/src/cmd/fm/fmd/Makefile.fmd index 44d33a8344..0b573821dd 100644 --- a/usr/src/cmd/fm/fmd/Makefile.fmd +++ b/usr/src/cmd/fm/fmd/Makefile.fmd @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -116,7 +116,7 @@ LDLIBS += -L$(ROOTLIB)/fm -ltopo -ldiagcode -lsysevent -lsmbios -luuid -lnvpair LDLIBS += -lexacct -lnsl -lumem -ldevinfo $(DMOD) := CFLAGS += $(CC_PICFLAGS) -G $(XREGSFLAG) -$(DMOD) := LDFLAGS += $(ZTEXT) -z combreloc +$(DMOD) := LDFLAGS += $(ZTEXT) $(ZCOMBRELOC) # # rpcgen(1) produces code that wants to be in the foreground if we're compiled diff --git a/usr/src/cmd/fmli/xx/Makefile b/usr/src/cmd/fmli/xx/Makefile index 19e4d4ab3b..b621ebbad1 100644 --- a/usr/src/cmd/fmli/xx/Makefile +++ b/usr/src/cmd/fmli/xx/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,14 @@ # # CDDL HEADER END # + # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 1990 by Sun Microsystems, Inc. +# ident "%Z%%M% %I% %E% SMI" # - include ../../Makefile.cmd PROG = fmli vsig @@ -35,16 +35,18 @@ FILEMODE = 0755 # fmli local libraries LOCAL = wish oh wish oeu form qued menu proc sys vt LDLIBS.local = $(LOCAL:%=../%/lib%.a) + fmli := LDLIBS += $(LDLIBS.local) -lcurses +fmli := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +fmli := LDFLAGS += $(MAPFILES:%=-M%) CPPFLAGS = -I../inc $(CPPFLAGS.master) -$(PROG) := LDFLAGS += .KEEP_STATE: all: $(PROG) -fmli: main.c +fmli: main.c $$(MAPFILES) $(LINK.c) -o $@ main.c $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fmli/xx/mapfile-intf b/usr/src/cmd/fmli/xx/mapfile-intf new file mode 100644 index 0000000000..be9a6388f6 --- /dev/null +++ b/usr/src/cmd/fmli/xx/mapfile-intf @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# fmli interposes on exit() so identify this as an interposer. +{ + global: + exit = INTERPOSE; +}; diff --git a/usr/src/cmd/fs.d/fsck.c b/usr/src/cmd/fs.d/fsck.c index 3eda1bdcff..61e0da1622 100644 --- a/usr/src/cmd/fs.d/fsck.c +++ b/usr/src/cmd/fs.d/fsck.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -71,8 +70,6 @@ int nrun, ndisks; int maxrun = 8; /* should be based on the machine resources */ -extern char *optarg; -extern int optind; extern char *default_fstype(); int nargc = 2; @@ -896,89 +893,6 @@ vfserror(int flag) exit(1); } -int opterr = 1, optind = 1, optopt = 0; -char *optarg = 0; - -int -getopt(int argc, char * const *argv, const char *opts) -{ - static int sp = 1; - int c; - char *cp; - - if (sp == 1) - if (optind >= argc || - argv[optind][0] != '-' || argv[optind][1] == '\0') - return (-1); - else if (strcmp(argv[optind], "--") == 0) { - optind++; - return (-1); - } - optopt = c = argv[optind][sp]; - if (c == ':' || (cp = strchr(opts, c)) == 0) { - if (opterr) - fprintf(stderr, - gettext("%s: illegal option -- %c\n"), - *argv, c); - if (argv[optind][++sp] == '\0') { - optind++; - sp = 1; - } - return ('?'); - } - if (*++cp == ':') { - if (argv[optind][sp+1] != '\0') - optarg = &argv[optind++][sp+1]; - else if (++optind >= argc) { - if (opterr) - fprintf(stderr, - gettext("%s: option requires an argument -- %c\n"), *argv, c); - sp = 1; - return ('?'); - } else - optarg = argv[optind++]; - sp = 1; - } else if (*cp == ';') { - if (argv[optind][++sp] != '\0') - if (isoptarg(c, &argv[optind][sp])) { - optarg = &argv[optind++][sp]; - sp = 1; - } else - optarg = NULL; - else { - sp = 1; - if (++optind >= argc || !isoptarg(c, &argv[optind][0])) - optarg = NULL; - else - optarg = argv[optind++]; - } - } else { - if (argv[optind][++sp] == '\0') { - sp = 1; - optind++; - } - optarg = NULL; - } - return (c); -} - -int -isoptarg(int cc, char *arg) -{ - if (cc == 's' || cc == 'S') { - while (*arg >= '0' && *arg <= '9') - arg++; - if (*arg++ != ':') - return (0); - while (*arg >= '0' && *arg <= '9') - arg++; - if (*arg) - return (0); - return (1); - } - return (0); -} - static void usage(void) { diff --git a/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile b/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile index b6a8658279..57cf975cfc 100644 --- a/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile +++ b/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,7 +44,7 @@ all: $(TYPEPROG) $(TESTPROG) $(TYPEPROG): $(OBJS) $(DSRC) $(COMPILE.d) -s $(DSRC) -o $(DOBJ) $(OBJS) - $(LINK.c) -zignore -o $@ $(DOBJ) $(OBJS) $(LDLIBS) + $(LINK.c) $(ZIGNORE) -o $@ $(DOBJ) $(OBJS) $(LDLIBS) $(POST_PROCESS) TESTSRCS = nfsmapid_test.c diff --git a/usr/src/cmd/fs.d/udfs/fsdb/Makefile b/usr/src/cmd/fs.d/udfs/fsdb/Makefile index 3014a93fcc..bfb313d266 100644 --- a/usr/src/cmd/fs.d/udfs/fsdb/Makefile +++ b/usr/src/cmd/fs.d/udfs/fsdb/Makefile @@ -21,7 +21,7 @@ # #pragma ident "%Z%%M% %I% %E% SMI" # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -32,6 +32,7 @@ include ../../Makefile.fstype CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 LDLIBS += -lmalloc -ll -ladm +LDFLAGS += $(MAPFILE.NGB:%=-M%) YFLAGS="-d" LINTFLAGS += -erroff=E_STATIC_UNUSED @@ -39,7 +40,7 @@ LINTFLAGS64 += -erroff=E_STATIC_UNUSED SRCS= fsdb.c ud_lib.c -fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o +fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILE.NGB) $(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \ ud_lib.o $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/fs.d/ufs/mount/Makefile b/usr/src/cmd/fs.d/ufs/mount/Makefile index 94c2a38b1d..abe90d6f68 100644 --- a/usr/src/cmd/fs.d/ufs/mount/Makefile +++ b/usr/src/cmd/fs.d/ufs/mount/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -43,8 +42,4 @@ include ../../Makefile.mount CPPFLAGS += -D_LARGEFILE64_SOURCE -# The default POFILE target is OK here since realpath.c doesn't actually -# have any strings to localize. -OBJS += realpath.o - include ../../Makefile.mount.targ diff --git a/usr/src/cmd/fs.d/ufs/mount/realpath.c b/usr/src/cmd/fs.d/ufs/mount/realpath.c deleted file mode 100644 index f4686ac13f..0000000000 --- a/usr/src/cmd/fs.d/ufs/mount/realpath.c +++ /dev/null @@ -1,271 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * University Copyright- Copyright (c) 1982, 1986, 1988 - * The Regents of the University of California - * All Rights Reserved - * - * University Acknowledgment- Portions of this document are derived from - * software developed by the University of California, Berkeley, and its - * contributors. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/param.h> -#include <sys/types.h> -#include <sys/mntent.h> -#include <sys/stat.h> -#include <errno.h> - -char *strchr(), *strrchr(), *strcpy(); -char *getcwd(), *sprintf(); - -/* - * Resolve all links for the given "name" and returns the result - * in "actual". Returns pointer to the result if successful, else - * NULL and errno is set. "actual" contains the path name of the - * fault point. - */ -static char * -resolvelinks(name, actual) - register char *name; - char *actual; -{ int last_is_slash = 0; - register char *p = actual; - char namebuf[MAXPATHLEN]; - register char *tmpname = namebuf; - - actual[0] = NULL; - if ((name == NULL) || (name[0] == NULL)) - return (actual); - if (name[0] == '/') { - actual[0] = '/'; - actual[1] = NULL; - if (*++name == NULL) - return (actual); - ++p; - } - - if (name[strlen(name) - 1] == '/') - ++last_is_slash; - - strcpy(tmpname, name); /* Work in tmp area only */ - - /* - * "tmpname" points to the yet unresolved path name. - * "actual" points to the resolved path name so far. - */ - while (tmpname) { - register char *start; /* The new step */ - char tmpres[MAXPATHLEN]; /* Temp result */ - struct stat64 stbuf; - - start = tmpname; - if (tmpname = strchr(tmpname, '/')) - *tmpname++ = NULL; - - /* start points to the new step */ - sprintf(tmpres, "%s%s", actual, start); - if (lstat64(tmpres, &stbuf) == -1) { - strcpy(actual, tmpres); /* Point of error */ - return (NULL); - } - - if ((stbuf.st_mode & S_IFMT) == S_IFLNK) { - char buf[MAXPATHLEN]; - int count; - - if ((count = readlink(tmpres, buf, MAXPATHLEN)) <= 0) { - strcpy(actual, tmpres); /* Point of error */ - return (NULL); - } else { - char tmpdir[MAXPATHLEN]; - char tmpbuf[MAXPATHLEN]; - char *tptr = &tmpbuf[0]; - char *resolved_res; - - buf[count] = NULL; - /* - * Recursively check for all new links. - */ - if (getcwd(tmpdir, MAXPATHLEN) == NULL) - return (NULL); - if (chdir(actual) == -1) - return (NULL); - resolved_res = resolvelinks(buf, tmpbuf); - if (tmpbuf[0] == '/') - /* The link starts from root */ - for (p = &actual[0]; - *p = *tptr; p++, tptr++); - else - for (; *p = *tptr; p++, tptr++); - if (resolved_res == NULL) { - (void) chdir(tmpdir); - return (NULL); - } - if (chdir(tmpdir) == -1) - return (NULL); - } - } else - /* Append start to actual */ - for (; *p = *start; p++, start++); - - if (*(p - sizeof (char)) != '/') - *p++ = '/'; /* Append '/' to actual */ - *p = NULL; - } - - /* Add/delete "/" depending upon last_is_slash */ - if (last_is_slash == 0) { - if ((*(p - sizeof (char)) == '/') && (actual[1] != NULL)) - *--p = NULL; - } else if (*(p - sizeof (char)) != '/') - *p++ = '/'; - *p = NULL; - - return (actual); -} - -/* - * Given a path, it removes all the '.' and '..' in it and returns - * pointer to the result if successful, else returns NULL and the - * error number is set. The partially prepared result is in "dots". - */ -static char * -resolvedots(actual, dots) - register char *actual; - register char *dots; /* The result */ -{ - struct stat64 stbuf; - int last_is_slash = 0; - char pwd[MAXPATHLEN]; - char *endp; - - if (dots == NULL) { - errno = EINVAL; - return (NULL); - } - dots[0] = NULL; - - if ((actual == NULL) || (actual[0] == NULL)) - return (dots); - if (actual[strlen(actual) - 1] == '/') - ++last_is_slash; - if (getcwd(pwd, MAXPATHLEN) == NULL) - return (NULL); - - if (lstat64(actual, &stbuf) == -1) { - strcpy(dots, actual); - return (NULL); - } - if ((stbuf.st_mode & S_IFMT) == S_IFDIR) { - char dir[MAXPATHLEN]; - - if ((chdir(actual) != 0) || (getcwd(dir, MAXPATHLEN) == NULL)) { - (void) chdir(pwd); - strcpy(dots, actual); - return (NULL); - } - if ((actual[0] != '/') && - (strncmp(pwd, dir, strlen(pwd)) == 0) && - (strlen(pwd) != strlen(dir))) - /* Copy only the relative part of the name */ - strcpy(dots, (char *) (&dir[0] + strlen(pwd) + 1)); - else - strcpy(dots, dir); - } else { - /* - * Last component is a file. Find the resolved - * name of the parent of this file, and then append - * the name of this file. - */ - char *pdir; - - if ((pdir = strrchr(actual, '/')) == NULL) - strcpy(dots, actual); - else { - char partial_dir[MAXPATHLEN]; - - *pdir++ = NULL; - if ((chdir(actual) != 0) || - (getcwd(partial_dir, MAXPATHLEN) == NULL)) { - (void) chdir(pwd); - strcpy(dots, actual); - return (NULL); - } - if ((actual[0] != '/') && - (strncmp(pwd, partial_dir, strlen(pwd)) == 0)) { - if (strlen(pwd) == strlen(partial_dir)) - strcpy(dots, pdir); - else - sprintf(dots, "%s/%s", - (char *) (&partial_dir[0] + - strlen(pwd) + 1), pdir); - } else - sprintf(dots, "%s/%s", partial_dir, pdir); - *--pdir = '/'; - } - } - - if (chdir(pwd) == -1) - return (NULL); - - /* Add/delete "/" depending upon last_is_slash */ - endp = &dots[strlen(dots)]; - if (last_is_slash == 0) { - if ((*(endp - sizeof (char)) == '/') && (dots[1] != NULL)) - *(endp - sizeof (char)) = NULL; - } else if (*(endp - sizeof (char)) != '/') { - *endp++ = '/'; - *endp = NULL; - } - - return (dots); -} - -/* - * Given a path, it resolves all links, '.' and '..' in it and - * returns pointer to the result if successful, else returns NULL and - * error number is set. The partially prepared result is in "linkdots". - * Assumes that "linkdots" has enough space allocated to it. - */ -char * -realpath(name, linkdots) - char *name, *linkdots; -{ - char buf[MAXPATHLEN]; - - if (resolvelinks(name, buf) == NULL) { - strcpy(linkdots, buf); - return (NULL); - } - return (resolvedots(buf, linkdots)); -} diff --git a/usr/src/cmd/geniconvtbl/Makefile.com b/usr/src/cmd/geniconvtbl/Makefile.com index e3bc03ebe3..fbaee1ae2a 100644 --- a/usr/src/cmd/geniconvtbl/Makefile.com +++ b/usr/src/cmd/geniconvtbl/Makefile.com @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -98,7 +98,7 @@ $(ITM) := sparcv9_CFLAGS += -xregs=no%appl LDLIBS += -lgen MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I.. -MY_NATIVE_LDFLAGS = $(NES_MAPFILE:%=-M%) $(PGA_MAPFILE:%=-M%) +MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) MY_NATIVE_LDLIBS = -lgen # diff --git a/usr/src/cmd/genmsg/Makefile b/usr/src/cmd/genmsg/Makefile index 3177c23fed..44dfb11fbc 100644 --- a/usr/src/cmd/genmsg/Makefile +++ b/usr/src/cmd/genmsg/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,11 +19,11 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# ident "%Z%%M% %I% %E% SMI" +# # cmd/genmsg/Makefile include ../Makefile.cmd @@ -42,13 +41,16 @@ LDLIBS += -ll YFLAGS = -d CPPFLAGS = -I../head $(CPPFLAGS.master) +# genmsg has a name clash with main() and libl.so.1. Localize all symbols. +LDFLAGS += $(MAPFILE.NGB:%=-M%) + OBJS = $(C_OBJS) $(PSRC_Y:%.y=%.o) PSRC_C = $(PSRC_Y:%.y=%.c) SRCS = $(C_OBJS:%.o=%.c) $(PSRC_C) .KEEP_STATE: -all: $(PROG) +all: $(PROG) $(MAPFILE.NGB) install: all $(ROOTPROG) diff --git a/usr/src/cmd/getent/Makefile b/usr/src/cmd/getent/Makefile index 8f0c8a8644..cafc3009cc 100644 --- a/usr/src/cmd/getent/Makefile +++ b/usr/src/cmd/getent/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ # # CDDL HEADER END # + # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# ident "%Z%%M% %I% %E% SMI" +# PROG= getent @@ -45,7 +45,7 @@ OBJECTS= \ SRCS= $(OBJECTS:.o=.c) -LAZYLIBS = -z lazyload -lproject +LAZYLIBS = $(ZLAZYLOAD) -lproject lint := LAZYLIBS = -lproject LDLIBS += -lsocket -lnsl $(LAZYLIBS) diff --git a/usr/src/cmd/gss/gssd/Makefile b/usr/src/cmd/gss/gssd/Makefile index 71283c15bd..f5e43e5f1b 100644 --- a/usr/src/cmd/gss/gssd/Makefile +++ b/usr/src/cmd/gss/gssd/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -77,6 +77,9 @@ COPTFLAG += $(XESS) #-I$(KINCDIR) LDLIBS += -lgss -lnsl +gssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +gssd := LDFLAGS += $(MAPFILES:%=-M%) + $(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50 .KEEP_STATE: @@ -89,7 +92,7 @@ $(ROOTLIB): $(ROOTLIB)/%: % $(INS.file) -gssd: $(GSSDOBJS) +gssd: $(GSSDOBJS) $$(MAPFILES) $(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/gss/gssd/gssd.c b/usr/src/cmd/gss/gssd/gssd.c index 64dc128d05..f49fc4cf26 100644 --- a/usr/src/cmd/gss/gssd/gssd.c +++ b/usr/src/cmd/gss/gssd/gssd.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -101,7 +100,6 @@ char **argv; extern int optind; int c; char mname[FMNAMESZ + 1]; - extern int _getuid(); /* set locale and domain for internationalization */ setlocale(LC_ALL, ""); @@ -109,19 +107,16 @@ char **argv; /* - * take special note that "_getuid()" is called here. This is necessary - * since we must fake out the mechanism libraries calls to getuid() - * with a special routine that is provided as part of gssd. However, - * the call below MUST call the real getuid() to ensure it is running - * as root. + * Take special note that "getuid()" is called here. This call is used + * rather than app_krb5_user_uid(), to ensure gssd(1M) is running as + * root. */ - #ifdef DEBUG (void) setuid(0); /* DEBUG: set ruid to root */ #endif /* DEBUG */ - if (_getuid()) { + if (getuid()) { (void) fprintf(stderr, - gettext("[%s] must be run as root\n"), argv[0]); + gettext("[%s] must be run as root\n"), argv[0]); #ifdef DEBUG (void) fprintf(stderr, gettext(" warning only\n")); #else /* DEBUG */ diff --git a/usr/src/cmd/gss/gssd/gssd_getuid.c b/usr/src/cmd/gss/gssd/gssd_getuid.c index 370b1f81af..874f7d1d52 100644 --- a/usr/src/cmd/gss/gssd/gssd_getuid.c +++ b/usr/src/cmd/gss/gssd/gssd_getuid.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,8 @@ * CDDL HEADER END */ /* - * Copyright (c) 1995,1997, by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -36,26 +35,22 @@ #include <stdlib.h> #include <libintl.h> -uid_t gssd_uid; +static uid_t krb5_cc_uid; void -set_gssd_uid(uid) - uid_t uid; +set_gssd_uid(uid_t uid) { - /* - * set the value of gssd_uid, so it can be retrieved when getuid() - * is called by the underlying mechanism libraries + * set the value of krb5_cc_uid, so it can be retrieved when + * app_krb5_user_uid() is called by the underlying mechanism libraries. */ printf(gettext("set_gssd_uid called with uid = %d\n"), uid); - gssd_uid = uid; + krb5_cc_uid = uid; } uid_t -getuid(void) - +app_krb5_user_uid(void) { - /* * return the value set when one of the gssd procedures was * entered. This is the value of the uid under which the @@ -65,6 +60,6 @@ getuid(void) * in files and directories specific to the user */ printf(gettext( - "getuid called and returning gsssd_uid = %d\n"), gssd_uid); - return (gssd_uid); + "getuid called and returning gsssd_uid = %d\n"), krb5_cc_uid); + return (krb5_cc_uid); } diff --git a/usr/src/cmd/gss/gssd/mapfile-intf b/usr/src/cmd/gss/gssd/mapfile-intf new file mode 100644 index 0000000000..4803cc54d5 --- /dev/null +++ b/usr/src/cmd/gss/gssd/mapfile-intf @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# gssd exports app_krb5_user_uid() - required by mech_krb5. +{ + global: + app_krb5_user_uid; +}; diff --git a/usr/src/cmd/infocmp/Makefile b/usr/src/cmd/infocmp/Makefile index 40c0ea8430..4a7eef9cb0 100644 --- a/usr/src/cmd/infocmp/Makefile +++ b/usr/src/cmd/infocmp/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,30 +19,31 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# ident "%Z%%M% %I% %E% SMI" +# -PROG= infocmp +PROG= infocmp -include ../Makefile.cmd +include ../Makefile.cmd .KEEP_STATE: -CFLAGS += $(CCVERBOSE) -XGETFLAGS += -a -x infocmp.xcl -LDLIBS += -lcurses -CPPFLAGS += -I../../lib/libcurses/screen - +CFLAGS += $(CCVERBOSE) +XGETFLAGS += -a -x infocmp.xcl +LDLIBS += -lcurses +CPPFLAGS += -I../../lib/libcurses/screen +MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) -all: $(PROG) +all: $(PROG) $(MAPFILES) -install: all $(ROOTPROG) +install: all $(ROOTPROG) clean: -lint: lint_PROG +lint: lint_PROG -include ../Makefile.targ +include ../Makefile.targ diff --git a/usr/src/cmd/infocmp/mapfile-intf b/usr/src/cmd/infocmp/mapfile-intf new file mode 100644 index 0000000000..2a8a3b8552 --- /dev/null +++ b/usr/src/cmd/infocmp/mapfile-intf @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# infocmp interposes on progname[], so identify this as an interposer. +{ + global: + progname = INTERPOSE; +}; diff --git a/usr/src/cmd/init/Makefile b/usr/src/cmd/init/Makefile index bb197d6d9d..2e238f3bb2 100644 --- a/usr/src/cmd/init/Makefile +++ b/usr/src/cmd/init/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ # # CDDL HEADER END # + # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,7 +36,7 @@ include ../Makefile.cmd OWNER = root GROUP = sys -LDLIBS_LIST = -lpam -lbsm -lcontract -z lazyload -lscf +LDLIBS_LIST = -lpam -lbsm -lcontract $(ZLAZYLOAD) -lscf lint := LDLIBS_LIST = -lpam -lbsm -lcontract -lscf LDLIBS += $(LDLIBS_LIST) diff --git a/usr/src/cmd/ipf/tools/Makefile.tools b/usr/src/cmd/ipf/tools/Makefile.tools index 2cb3585169..65d3eb211b 100644 --- a/usr/src/cmd/ipf/tools/Makefile.tools +++ b/usr/src/cmd/ipf/tools/Makefile.tools @@ -57,6 +57,7 @@ include ../../../Makefile.cmd include ../../Makefile.ipf LDLIBS += $(LIBBPF) +LDFLAGS += $(MAPFILE.NGB:%=-M%) CPPFLAGS += -I. -DIPFILTER_LOOKUP -DIPFILTER_LOG @@ -106,7 +107,7 @@ $(ROOTIPFLINKS): FRC .KEEP_STATE: -ipf: $(IPF_OBJS) $(LIBIPF) +ipf: $(IPF_OBJS) $(LIBIPF) $(MAPFILE.NGB) $(LINK.c) -o ipf $(IPF_OBJS) $(LDLIBS) $(POST_PROCESS) @@ -135,11 +136,11 @@ ipfs: $(IPFS_OBJS) $(LINK.c) -o ipfs $(IPFS_OBJS) $(LDLIBS) $(POST_PROCESS) -ipfstat: $(IPFSTAT_OBJS) +ipfstat: $(IPFSTAT_OBJS) $(MAPFILE.NGB) $(LINK.c) -o ipfstat $(IPFSTAT_OBJS) $(LDLIBS) $(POST_PROCESS) -ipmon: $(IPMON_OBJS) $(LIBIPF) +ipmon: $(IPMON_OBJS) $(LIBIPF) $(MAPFILE.NGB) $(LINK.c) -o ipmon $(IPMON_OBJS) $(LDLIBS) $(POST_PROCESS) @@ -165,7 +166,7 @@ ipmon_l.o: ../ipmon_l.c $(COMMONIPF)/ipmon.h ../ipmon_y.h ../ipmon_l.h ../ipmon_l.h: ../lexer.h sed -e 's/yy/ipmon_yy/g' ../lexer.h > $@ -ipnat: $(IPNAT_OBJS) $(LIBIPF) +ipnat: $(IPNAT_OBJS) $(LIBIPF) $(MAPFILE.NGB) $(LINK.c) -o ipnat $(IPNAT_OBJS) $(LDLIBS) $(POST_PROCESS) @@ -191,7 +192,7 @@ ipnat_l.o: ../ipnat_l.c $(COMMONIPF)/netinet/ip_nat.h ../ipnat_l.h ../ipnat_l.h: ../lexer.h sed -e 's/yy/ipnat_yy/g' ../lexer.h > $@ -ippool: $(IPPOOL_OBJS) $(LIBIPF) +ippool: $(IPPOOL_OBJS) $(LIBIPF) $(MAPFILE.NGB) $(LINK.c) -o ippool $(IPPOOL_OBJS) $(LDLIBS) $(POST_PROCESS) @@ -217,8 +218,8 @@ ippool_l.o: ../ippool_l.c $(COMMONIPF)/netinet/ip_pool.h ../ippool_l.h ../ippool_l.h: ../lexer.h sed -e 's/yy/ippool_yy/g' ../lexer.h > $@ -ipftest: $(IPFTEST_OBJS) $(LIBIPF) - $(LINK.c) -zignore -o ipftest $(IPFTEST_OBJS) $(LDLIBS) +ipftest: $(IPFTEST_OBJS) $(LIBIPF) $(MAPFILE.NGB) + $(LINK.c) $(ZIGNORE) -o ipftest $(IPFTEST_OBJS) $(LDLIBS) $(POST_PROCESS) clean: diff --git a/usr/src/cmd/krb5/kwarn/Makefile b/usr/src/cmd/krb5/kwarn/Makefile index e10faa3eaf..498ba11f82 100644 --- a/usr/src/cmd/krb5/kwarn/Makefile +++ b/usr/src/cmd/krb5/kwarn/Makefile @@ -1,5 +1,26 @@ # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,14 +57,18 @@ CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \ -I$(SRC)/lib/gss_mechs/mech_krb5 \ -I$(SRC)/lib/gss_mechs/mech_krb5/include \ -I$(SRC)/uts/common/gssapi/mechs/krb5/include -LDFLAGS += $(KRUNPATH) -LDLIBS += $(KMECHLIB) -lnsl + +ktkt_warnd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +ktkt_warnd := LDFLAGS += $(KRUNPATH) $(MAPFILES:%=-M%) + +LDFLAGS += $(KRUNPATH) +LDLIBS += $(KMECHLIB) -lnsl .KEEP_STATE: all: $(PROG) $(TESTPROG) -$(PROG): $(G_OBJS) $(KWARNDOBJS) +$(PROG): $(G_OBJS) $(KWARNDOBJS) $$(MAPFILES) $(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/krb5/kwarn/kwarnd.c b/usr/src/cmd/krb5/kwarn/kwarnd.c index f4f1d783cc..87a7a49130 100644 --- a/usr/src/cmd/krb5/kwarn/kwarnd.c +++ b/usr/src/cmd/krb5/kwarn/kwarnd.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -81,8 +81,6 @@ char **argv; int c; char mname[FMNAMESZ + 1]; int rpc_svc_mode = RPC_SVC_MT_AUTO; - extern int _getuid(); - /* set locale and domain for internationalization */ setlocale(LC_ALL, ""); @@ -96,19 +94,16 @@ char **argv; (void) strlcpy(progname, basename(argv[0]), sizeof (progname)); /* - * take special note that "_getuid()" is called here. This is necessary - * since we must fake out the mechanism libraries calls to getuid() - * with a special routine that is provided as part of kwarnd. However, - * the call below MUST call the real getuid() to ensure it is running + * Take special note that "getuid()" is called here. This call is used + * rather that app_krb5_user_uid(), to ensure ktkt_warnd(1M) is running * as root. */ - #ifdef DEBUG (void) setuid(0); /* DEBUG: set ruid to root */ #endif /* DEBUG */ - if (_getuid()) { + if (getuid()) { (void) fprintf(stderr, - gettext("[%s] must be run as root\n"), argv[0]); + gettext("[%s] must be run as root\n"), argv[0]); #ifdef DEBUG (void) fprintf(stderr, gettext(" warning only\n")); #else /* !DEBUG */ diff --git a/usr/src/cmd/krb5/kwarn/kwarnd_proc.c b/usr/src/cmd/krb5/kwarn/kwarnd_proc.c index 02123fdd02..2d275618bd 100644 --- a/usr/src/cmd/krb5/kwarn/kwarnd_proc.c +++ b/usr/src/cmd/krb5/kwarn/kwarnd_proc.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -672,40 +672,36 @@ safe_popen_w(char *path_to_cmd, char **argv) } -static uid_t gssd_uid; +static uid_t krb5_cc_uid; void set_warnd_uid(uid_t uid) { - /* - * set the value of gssd_uid, so it can be retrieved when getuid() - * is called by the underlying mechanism libraries + * set the value of krb5_cc_uid, so it can be retrieved when + * app_krb5_user_uid() is called by the underlying mechanism libraries. */ if (kwarnd_debug) printf("set_warnd_uid called with uid = %d\n", uid); - - gssd_uid = uid; + krb5_cc_uid = uid; } uid_t -getuid(void) - +app_krb5_user_uid(void) { /* - * return the value set when one of the gssd procedures was + * return the value set when one of the kwarnd procedures was * entered. This is the value of the uid under which the * underlying mechanism library must operate in order to * get the user's credentials. This call is necessary since - * gssd runs as root and credentials are many times stored + * kwarnd runs as root and credentials are many times stored * in files and directories specific to the user */ if (kwarnd_debug) - printf("getuid called and returning gsssd_uid = %d\n", - gssd_uid); - - return (gssd_uid); + printf("app_krb5_user_uid called and returning uid = %d\n", + krb5_cc_uid); + return (krb5_cc_uid); } @@ -742,11 +738,11 @@ renew_creds( krb5_error_code code = 0; struct k5_data k5; - uid_t saved_u = getuid(); + uid_t saved_u = app_krb5_user_uid(); uid_t u; if (kwarnd_debug) - printf("renew start: uid=%d\n", getuid()); + printf("renew start: uid=%d\n", app_krb5_user_uid()); if (!getpruid(princ, &u)) { if (kwarnd_debug) @@ -817,7 +813,7 @@ out: if (kwarnd_debug) printf("renew end: code=%s, uid=%d\n", error_message(code), - getuid()); + app_krb5_user_uid()); return (code); } @@ -883,8 +879,8 @@ kwarnd_check_warning_list(void) char *renew_subj = "Kerberos credentials renewed"; if (kwarnd_debug) - printf("check list: start: getuid=%d, cw list=%p\n", getuid(), - cred_warning_list); + printf("check list: start: uid=%d, cw list=%p\n", + app_krb5_user_uid(), cred_warning_list); while (1) { (void) poll(NULL, NULL, 60000); diff --git a/usr/src/cmd/krb5/kwarn/mapfile-intf b/usr/src/cmd/krb5/kwarn/mapfile-intf new file mode 100644 index 0000000000..b85bf62f6d --- /dev/null +++ b/usr/src/cmd/krb5/kwarn/mapfile-intf @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# ktkt_warnd exports app_krb5_user_uid() - required by mech_krb5. +{ + global: + app_krb5_user_uid; +}; diff --git a/usr/src/cmd/listen/Makefile b/usr/src/cmd/listen/Makefile index 01be9773fd..97f5c541cb 100644 --- a/usr/src/cmd/listen/Makefile +++ b/usr/src/cmd/listen/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,10 +18,12 @@ # # CDDL HEADER END # + # -#ident "%Z%%M% %I% %E% SMI" +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 1990 by Sun Microsystems, Inc. +# ident "%Z%%M% %I% %E% SMI" # PROG= listen nlps_server @@ -49,10 +50,12 @@ NETNLSD = $(NETD)/nls DIRS= $(NETNLSD) ROOTSAFPROG= $(PROG:%=$(LIBSAFD)/%) -# If machine name and /etc/issue file need to be printed # before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME +# If machine name and /etc/issue file need to be printed +# before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME # If debug is needed, then: CPPFLAGS += -DDEBUG LDLIBS += -lnsl +LDFLAGS += $(MAPFILE.NGB:%=-M%) LINTFLAGS = -b -x OWNER= root GROUP= sys @@ -63,13 +66,13 @@ $(LIBSAFD)/% : % .KEEP_STATE: -all: $(PROG) +all: $(PROG) -listen: $(LSOBJS) +listen: $(LSOBJS) $(MAPFILE.NGB) $(LINK.c) $(LSOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -nlps_server: $(NLPSOBJS) +nlps_server: $(NLPSOBJS) $(MAPFILE.NGB) $(LINK.c) $(NLPSOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/lp/cmd/Makefile b/usr/src/cmd/lp/cmd/Makefile index e558d3c992..5d4dff7eb2 100644 --- a/usr/src/cmd/lp/cmd/Makefile +++ b/usr/src/cmd/lp/cmd/Makefile @@ -20,7 +20,7 @@ # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -55,14 +55,15 @@ ROOTSYMLINKS= $(LIBLINKS:%=$(ROOTLIB)/%) CPPFLAGS = -I$(LPINC) $(CPPFLAGS.master) +LDFLAGS += $(MAPFILE.NGB:%=-M%) # conditional assignments # lpfilter:= LDLIBS += $(LIBFLT) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \ - -lgen -z lazyload -lsecdb -z nolazyload + -lgen $(ZLAZYLOAD) -lsecdb $(ZNOLAZYLOAD) lpforms:= LDLIBS += $(LIBFRM) $(LIBMSG) $(LIBREQ) $(LIBOAM) \ $(LIBACC) $(LIBLP) \ - -z lazyload -lsecdb -z nolazyload + $(ZLAZYLOAD) -lsecdb $(ZNOLAZYLOAD) lpshut:= LDLIBS += $(LIBMSG) $(LIBOAM) $(LIBLP) lpusers:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP) diff --git a/usr/src/cmd/lp/cmd/lpadmin/Makefile b/usr/src/cmd/lp/cmd/lpadmin/Makefile index bb3c282500..5b5bdc687f 100644 --- a/usr/src/cmd/lp/cmd/lpadmin/Makefile +++ b/usr/src/cmd/lp/cmd/lpadmin/Makefile @@ -21,7 +21,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -66,8 +66,9 @@ LPLIBS= $(LIBACC) \ SYSLIBS= -lcurses -LDLIBS += -z lazyload -lsecdb -z nolazyload $(LPLIBS) \ +LDLIBS += $(ZLAZYLOAD) -lsecdb $(ZNOLAZYLOAD) $(LPLIBS) \ $(SYSLIBS) $(I18N) +LDFLAGS += $(MAPFILE.NGB:%=-M%) PROG= lpadmin @@ -80,7 +81,7 @@ POFILE= lp_cmd_lpadmin.po all: $(PROG) -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILE.NGB) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/lp/cmd/lpsched/Makefile b/usr/src/cmd/lp/cmd/lpsched/Makefile index e117393bb2..7d463a4418 100644 --- a/usr/src/cmd/lp/cmd/lpsched/Makefile +++ b/usr/src/cmd/lp/cmd/lpsched/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -100,8 +100,8 @@ LPLIBS = \ $(LIBLP) \ $(LIBSEC) -SYSLIBS= -lcurses -lgen -lcurses -lnsl -z lazyload \ - -ltsol -lsecdb -lbsm -z nolazyload +SYSLIBS= -lcurses -lgen -lcurses -lnsl $(ZLAZYLOAD) \ + -ltsol -lsecdb -lbsm $(ZNOLAZYLOAD) LDLIBS += $(LPLIBS) $(SYSLIBS) diff --git a/usr/src/cmd/lp/lib/lp/Makefile b/usr/src/cmd/lp/lib/lp/Makefile index 3d14c214b8..7161681ef4 100644 --- a/usr/src/cmd/lp/lib/lp/Makefile +++ b/usr/src/cmd/lp/lib/lp/Makefile @@ -21,7 +21,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -69,7 +69,6 @@ OBJECTS = Syscalls.o \ strip.o \ syntax.o \ tidbit.o \ - tinames.o \ tx.o \ wherelist.o \ which.o diff --git a/usr/src/cmd/lp/lib/lp/tidbit.c b/usr/src/cmd/lp/lib/lp/tidbit.c index 1a52cc2220..3884305259 100644 --- a/usr/src/cmd/lp/lib/lp/tidbit.c +++ b/usr/src/cmd/lp/lib/lp/tidbit.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 1997 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -45,25 +44,25 @@ extern char *boolnames[], *numnames[], - *stringnames[]; + *strnames[]; extern char *getenv(); -ushort tidbit_boolean = 0; +ushort_t tidbit_boolean = 0; short tidbit_number = 0; char *tidbit_string = 0; #if defined(__STDC__) -static int open_terminfo_file ( char * , char * ); +static int open_terminfo_file(char *, char *); #else static int open_terminfo_file(); #endif -/** - ** _Getsh() - GET TWO-BYTE SHORT FROM (char *) POINTER PORTABLY - **/ +/* + * _Getsh() - GET TWO-BYTE SHORT FROM "char *" POINTER PORTABLY + */ /* * "function" to get a short from a pointer. The short is in a standard @@ -83,7 +82,7 @@ static int open_terminfo_file(); * NCR @ Torrey Pines. - Tony Hansen */ #if u3b || u3b15 || u3b2 || m68000 || sparc -#define _Getsh(ip) ((short) (*((unsigned char *) ip) | (*(ip+1) << 8))) +#define _Getsh(ip) ((short)(*((unsigned char *) ip) | (*(ip+1) << 8))) #endif /* u3b || u3b15 || u3b2 || m68000 || sparc */ #ifndef _Getsh @@ -97,11 +96,11 @@ static int open_terminfo_file(); static int #if defined(__STDC__) -_Getsh ( - register char * p +_Getsh( + register char *p ) #else -_Getsh (p) +_Getsh(p) register char *p; #endif { @@ -121,7 +120,7 @@ _Getsh (p) } #endif /* _Getsh */ -#define MAX_TIDBS 32 +#define MAX_TIDBS 32 static struct tidb { @@ -139,9 +138,9 @@ static struct tidb { } tidbs[MAX_TIDBS + 1]; /* one for last ditch */ -/** - ** tidbit() - TERMINFO DATABASE LOOKUP - **/ +/* + * tidbit() - TERMINFO DATABASE LOOKUP + */ /* * Four forms of calling: @@ -191,13 +190,13 @@ static struct tidb { /*VARARGS2*/ int #if defined(__STDC__) -tidbit ( - char * term, - char * cap, +tidbit( + char *term, + char *cap, ... ) #else -tidbit (term, cap, va_alist) +tidbit(term, cap, va_alist) char *term, *cap; va_dcl @@ -226,7 +225,7 @@ tidbit (term, cap, va_alist) } if (term != last_term) { if (last_term) - Free (last_term); + Free(last_term); last_term = Strdup(term); } @@ -267,7 +266,7 @@ tidbit (term, cap, va_alist) tfd = open_terminfo_file(TERMINFO, term); #endif if (tfd >= 0) - (void)Fstat (tfd, &statbuf); + (void) Fstat(tfd, &statbuf); if (tfd < 0 || !statbuf.st_size) { errno = ENOENT; @@ -275,25 +274,25 @@ tidbit (term, cap, va_alist) } if (pt->tiebuf) - Free (pt->tiebuf); + Free(pt->tiebuf); if (!(pt->tiebuf = Malloc(statbuf.st_size))) { errno = ENOMEM; return (-1); } n = Read(tfd, pt->tiebuf, statbuf.st_size); - (void)Close (tfd); + (void) Close(tfd); if (n <= 0 || n >= 4096 || _Getsh(pt->tiebuf) != 0432) { - Free (pt->tiebuf); + Free(pt->tiebuf); pt->tiebuf = 0; errno = EBADF; return (-1); } if (pt->term) - Free (pt->term); + Free(pt->term); if (!(pt->term = Strdup(term))) { - Free (pt->tiebuf); + Free(pt->tiebuf); pt->tiebuf = 0; errno = ENOMEM; return (-1); @@ -319,22 +318,22 @@ tidbit (term, cap, va_alist) rc = 0; #if defined(__STDC__) - va_start (ap, cap); + va_start(ap, cap); #else - va_start (ap); + va_start(ap); #endif if (!cap || !*cap) ; else if ((pp = wherelist(cap, boolnames))) { - register ushort *ushort_p; + register ushort_t *ushort_p; register char *ip; register int index = pp - boolnames; - if (!(ushort_p = va_arg(ap, ushort *))) { + if (!(ushort_p = va_arg(ap, ushort_t *))) { ushort_p = &tidbit_boolean; rc = 1; } @@ -367,12 +366,12 @@ tidbit (term, cap, va_alist) *short_p = -1; } - } else if ((pp = wherelist(cap, stringnames))) { + } else if ((pp = wherelist(cap, strnames))) { register char **charstar_p; register char *ip; - register int index = pp - stringnames; + register int index = pp - strnames; register short sindex; @@ -393,21 +392,21 @@ tidbit (term, cap, va_alist) } } - va_end (ap); + va_end(ap); return (rc); } -/** - ** untidbit() - FREE SPACE ASSOCIATED WITH A TERMINFO ENTRY - **/ +/* + * untidbit() - FREE SPACE ASSOCIATED WITH A TERMINFO ENTRY + */ void #if defined(__STDC__) -untidbit ( - char * term +untidbit( + char *term ) #else -untidbit (term) +untidbit(term) char *term; #endif { @@ -417,28 +416,27 @@ untidbit (term) for (i = 0; i < MAX_TIDBS; i++) if (tidbs[i].term && STREQU(tidbs[i].term, term)) { if (tidbs[i].tiebuf) { - Free (tidbs[i].tiebuf); + Free(tidbs[i].tiebuf); tidbs[i].tiebuf = 0; } - Free (tidbs[i].term); + Free(tidbs[i].term); tidbs[i].term = 0; break; } - return; } -/** - ** open_terminfo_file() - OPEN FILE FOR TERM ENTRY - **/ +/* + * open_terminfo_file() - OPEN FILE FOR TERM ENTRY + */ static int #if defined(__STDC__) -open_terminfo_file ( - char * terminfo, - char * term +open_terminfo_file( + char *terminfo, + char *term ) #else -open_terminfo_file (terminfo, term) +open_terminfo_file(terminfo, term) char *terminfo, *term; #endif @@ -453,11 +451,11 @@ open_terminfo_file (terminfo, term) /* start fix for bugid 1109709 */ if (path == NULL) { - return -1; + return (-1); } /* end fix for bugid 1109709 */ fd = Open(path, 0); - Free (path); + Free(path); return (fd); } diff --git a/usr/src/cmd/lp/lib/lp/tinames.c b/usr/src/cmd/lp/lib/lp/tinames.c deleted file mode 100644 index f9f989efd3..0000000000 --- a/usr/src/cmd/lp/lib/lp/tinames.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - - -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2.1.1 */ -char *boolnames[] = - { -"bw", "am", "xsb", "xhp", "xenl", "eo", "gn", "hc", "km", "hs", -"in", "da", "db", "mir", "msgr", "os", "eslok", "xt", "hz", "ul", -"xon", "nxon", "mc5i", "chts", "nrrmc", "npc", "ndscr", "ccc", "bce", "hls", -"xhpa", "crxm", "daisy", "xvpa", "sam", "cpix", "lpix", -0 - }; - -char *numnames[] = - { -"cols", "it", "lines", "lm", "xmc", "pb", "vt", "wsl", "nlab", "lh", -"lw", "ma", "wnum", "colors", "pairs", "ncv", "bufsz", "spinv", "spinh", "maddr", -"mjump", "mcs", "mls", "npins", "orc", "orl", "orhi", "orvi", "cps", "widcs", -"btns", "bitwin", "bitype", -0 - }; - -char *stringnames[] = - { -"cbt", "bel", "cr", "csr", "tbc", "clear", "el", "ed", "hpa", "cmdch", -"cup", "cud1", "home", "civis", "cub1", "mrcup", "cnorm", "cuf1", "ll", "cuu1", -"cvvis", "dch1", "dl1", "dsl", "hd", "smacs", "blink", "bold", "smcup", "smdc", -"dim", "smir", "invis", "prot", "rev", "smso", "smul", "ech", "rmacs", "sgr0", -"rmcup", "rmdc", "rmir", "rmso", "rmul", "flash", "ff", "fsl", "is1", "is2", -"is3", "if", "ich1", "il1", "ip", "kbs", "ktbc", "kclr", "kctab", "kdch1", -"kdl1", "kcud1", "krmir", "kel", "ked", "kf0", "kf1", "kf10", "kf2", "kf3", -"kf4", "kf5", "kf6", "kf7", "kf8", "kf9", "khome", "kich1", "kil1", "kcub1", -"kll", "knp", "kpp", "kcuf1", "kind", "kri", "khts", "kcuu1", "rmkx", "smkx", -"lf0", "lf1", "lf10", "lf2", "lf3", "lf4", "lf5", "lf6", "lf7", "lf8", -"lf9", "rmm", "smm", "nel", "pad", "dch", "dl", "cud", "ich", "indn", -"il", "cub", "cuf", "rin", "cuu", "pfkey", "pfloc", "pfx", "mc0", "mc4", -"mc5", "rep", "rs1", "rs2", "rs3", "rf", "rc", "vpa", "sc", "ind", -"ri", "sgr", "hts", "wind", "ht", "tsl", "uc", "hu", "iprog", "ka1", -"ka3", "kb2", "kc1", "kc3", "mc5p", "rmp", "acsc", "pln", "kcbt", "smxon", -"rmxon", "smam", "rmam", "xonc", "xoffc", "enacs", "smln", "rmln", "kbeg", "kcan", -"kclo", "kcmd", "kcpy", "kcrt", "kend", "kent", "kext", "kfnd", "khlp", "kmrk", -"kmsg", "kmov", "knxt", "kopn", "kopt", "kprv", "kprt", "krdo", "kref", "krfr", -"krpl", "krst", "kres", "ksav", "kspd", "kund", "kBEG", "kCAN", "kCMD", "kCPY", -"kCRT", "kDC", "kDL", "kslt", "kEND", "kEOL", "kEXT", "kFND", "kHLP", "kHOM", -"kIC", "kLFT", "kMSG", "kMOV", "kNXT", "kOPT", "kPRV", "kPRT", "kRDO", "kRPL", -"kRIT", "kRES", "kSAV", "kSPD", "kUND", "rfi", "kf11", "kf12", "kf13", "kf14", -"kf15", "kf16", "kf17", "kf18", "kf19", "kf20", "kf21", "kf22", "kf23", "kf24", -"kf25", "kf26", "kf27", "kf28", "kf29", "kf30", "kf31", "kf32", "kf33", "kf34", -"kf35", "kf36", "kf37", "kf38", "kf39", "kf40", "kf41", "kf42", "kf43", "kf44", -"kf45", "kf46", "kf47", "kf48", "kf49", "kf50", "kf51", "kf52", "kf53", "kf54", -"kf55", "kf56", "kf57", "kf58", "kf59", "kf60", "kf61", "kf62", "kf63", "el1", -"mgc", "smgl", "smgr", "fln", "sclk", "dclk", "rmclk", "cwin", "wingo", "hup", -"dial", "qdial", "tone", "pulse", "hook", "pause", "wait", "u0", "u1", "u2", -"u3", "u4", "u5", "u6", "u7", "u8", "u9", "op", "oc", "initc", -"initp", "scp", "setf", "setb", "cpi", "lpi", "chr", "cvr", "defc", "swidm", -"sdrfq", "sitm", "slm", "smicm", "snlq", "snrmq", "sshm", "ssubm", "ssupm", "sum", -"rwidm", "ritm", "rlm", "rmicm", "rshm", "rsubm", "rsupm", "rum", "mhpa", "mcud1", -"mcub1", "mcuf1", "mvpa", "mcuu1", "porder", "mcud", "mcub", "mcuf", "mcuu", "scs", -"smgb", "smgbp", "smglp", "smgrp", "smgt", "smgtp", "sbim", "scsd", "rbim", "rcsd", -"subcs", "supcs", "docr", "zerom", "csnm", "kmous", "minfo", "reqmp", "getm", "setaf", -"setab", "pfxl", "devt", "csin", "s0ds", "s1ds", "s2ds", "s3ds", "smglr", "smgtb", -"birep", "binel", "bicr", "colornm", "defbi", "endbi", "setcolor", "slines", "dispc", "smpch", -"rmpch", "smsc", "rmsc", "pctrm", "scesc", "scesca", -0 - }; - diff --git a/usr/src/cmd/lp/lib/papi/Makefile b/usr/src/cmd/lp/lib/papi/Makefile index 28da2a87d5..2622951255 100644 --- a/usr/src/cmd/lp/lib/papi/Makefile +++ b/usr/src/cmd/lp/lib/papi/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,15 +44,15 @@ CPPFLAGS += -I$(SRC)/lib/print/libpapi-common/common CPPFLAGS += -D_REENTRANT CPPFLAGS += $(ENVCPPFLAGS1) CPPFLAGS += $(ENVCPPFLAGS2) -LDLIBS += -lc -LDLIBS += -L$(SRC)/cmd/lp/lib/msgs -llpmsg -LDLIBS += -L$(SRC)/cmd/lp/lib/printers -llpprt -LDLIBS += -L$(SRC)/cmd/lp/lib/class -llpcls -LDLIBS += -L$(SRC)/cmd/lp/lib/requests -llpreq -LDLIBS += -L$(SRC)/cmd/lp/lib/secure -llpsec -LDLIBS += -L$(SRC)/cmd/lp/lib/forms -llpfrm -LDLIBS += -L$(SRC)/cmd/lp/lib/access -llpacc -LDLIBS += -L$(SRC)/cmd/lp/lib/lp -llp +LDLIBS += -lcurses -lc +LDLIBS += -L$(SRC)/cmd/lp/lib/msgs -llpmsg +LDLIBS += -L$(SRC)/cmd/lp/lib/printers -llpprt +LDLIBS += -L$(SRC)/cmd/lp/lib/class -llpcls +LDLIBS += -L$(SRC)/cmd/lp/lib/requests -llpreq +LDLIBS += -L$(SRC)/cmd/lp/lib/secure -llpsec +LDLIBS += -L$(SRC)/cmd/lp/lib/forms -llpfrm +LDLIBS += -L$(SRC)/cmd/lp/lib/access -llpacc +LDLIBS += -L$(SRC)/cmd/lp/lib/lp -llp MAPFILES = mapfile diff --git a/usr/src/cmd/lp/model/Makefile b/usr/src/cmd/lp/model/Makefile index de6206ade8..d7908bc388 100644 --- a/usr/src/cmd/lp/model/Makefile +++ b/usr/src/cmd/lp/model/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/lp/model/Makefile @@ -59,8 +58,7 @@ CPPFLAGS = -I$(LPINC) $(CPPFLAGS.master) # conditional assignments lp.tell := LDLIBS += $(LIBMSG) $(LIBLP) -lp.set := LDLIBS += $(LIBLP) -lcurses -lp.set drain.output lp.cat := LDLIBS += $(LIBLP) +lp.set drain.output lp.cat := LDLIBS += $(LIBLP) -lcurses $(ROOTMISC) := FILEMODE = 0444 diff --git a/usr/src/cmd/lvm/rpc.metamedd/Makefile.com b/usr/src/cmd/lvm/rpc.metamedd/Makefile.com index 3e9c2cfd34..08d37bdbd2 100644 --- a/usr/src/cmd/lvm/rpc.metamedd/Makefile.com +++ b/usr/src/cmd/lvm/rpc.metamedd/Makefile.com @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -60,6 +59,7 @@ include ../../../Makefile.cmd include ../../Makefile.lvm LDLIBS += -lmeta -lsocket -lnsl +LDFLAGS += $(ZINTERPOSE) CPPFLAGS += $(DEFINES) diff --git a/usr/src/cmd/mail/Makefile b/usr/src/cmd/mail/Makefile index 648d786859..60b75264fe 100644 --- a/usr/src/cmd/mail/Makefile +++ b/usr/src/cmd/mail/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ # # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -77,6 +76,9 @@ CPPFLAGS = -DSVR4 -I. $(CPPFLAGS.master) LDLIBS += -lmail -lsocket +# mail defines its own delete() - reduce symbols to locals to remove name clash. +LDFLAGS += $(MAPFILE.NGB:%=-M%) + # conditional assignments # all:= TARGET= all diff --git a/usr/src/cmd/mailx/Makefile b/usr/src/cmd/mailx/Makefile index 858850236e..c88a69da70 100644 --- a/usr/src/cmd/mailx/Makefile +++ b/usr/src/cmd/mailx/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -67,6 +67,7 @@ $(ROOTUCBMAILRC) := FILEMODE = 0644 CPPFLAGS= -Ihdr -DUSG -DOPTIM $(CPPFLAGS.master) LINTFLAGS= -hb LDLIBS += -lmail +LDFLAGS += $(MAPFILE.NGB:%=-M%) # install rules $(ROOTMAILXD)/% : % diff --git a/usr/src/cmd/mdb/Makefile.kmdb.targ b/usr/src/cmd/mdb/Makefile.kmdb.targ index ba95f41bdc..704a945fb1 100644 --- a/usr/src/cmd/mdb/Makefile.kmdb.targ +++ b/usr/src/cmd/mdb/Makefile.kmdb.targ @@ -19,14 +19,14 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" # $(PROG).core: $(OBJS) $(KMDBLIBS) $(MAPFILE) - $(LD) -r -Breduce -znoversion -zdefs -M$(MAPFILE) -o $@ $(OBJS) \ + $(LD) -r $(BREDUCE) $(ZNOVERSION) $(ZDEFS) -M$(MAPFILE) -o $@ $(OBJS) \ $(KMDBLIBS) $(PROG): $(PROG).core $(KCTLOBJS) diff --git a/usr/src/cmd/mdb/Makefile.libstandctf b/usr/src/cmd/mdb/Makefile.libstandctf index 849d36242a..4b9d5a76de 100644 --- a/usr/src/cmd/mdb/Makefile.libstandctf +++ b/usr/src/cmd/mdb/Makefile.libstandctf @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -52,7 +51,7 @@ CPPFLAGS += -I$(SRC)/common/ctf -I../../../common -DCTF_OLD_VERSIONS -D_MDB \ CFLAGS += $(STAND_FLAGS_32) CFLAGS64 += $(STAND_FLAGS_64) -LDFLAGS = -znoversion -Breduce -M $(MAPFILE) -dy -r +LDFLAGS = $(ZNOVERSION) $(BREDUCE) -M $(MAPFILE) -dy -r LIB = libstandctf.so OBJS = $(CTF_COMMON_SRCS:%.c=%.o) $(CTF_STUB_SRCS:%.c=%.o) diff --git a/usr/src/cmd/nl/Makefile b/usr/src/cmd/nl/Makefile index 769524d96c..69eb13dd06 100644 --- a/usr/src/cmd/nl/Makefile +++ b/usr/src/cmd/nl/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -45,17 +44,20 @@ LDLIBS += -lgen CFLAGS += $(CCVERBOSE) $(XPG4):= CPPFLAGS += -DXPG4 +MAPFILE.INT = ../expr/mapfile-intf +LDFLAGS += $(MAPFILE.INT:%=-M%) + .KEEP_STATE: all: $(PROG) $(XPG4) install: all $(ROOTPROG) $(ROOTXPG4PROG) -$(PROG): nlobjs $(NLOBJ) +$(PROG): nlobjs $(NLOBJ) $(MAPFILE.INT) $(LINK.c) $(NLOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -$(XPG4): nlobjs.xpg4 $(XPG4NLOBJ) +$(XPG4): nlobjs.xpg4 $(XPG4NLOBJ) $(MAPFILE.INT) $(LINK.c) $(XPG4NLOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/nl/inc.flg b/usr/src/cmd/nl/inc.flg index c0aa6b748e..5a7ee97219 100644 --- a/usr/src/cmd/nl/inc.flg +++ b/usr/src/cmd/nl/inc.flg @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,6 +19,12 @@ # # CDDL HEADER END # -#ident "%Z%%M% %I% %E% SMI" + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" echo_file usr/src/cmd/expr/compile.c +echo_file usr/src/cmd/expr/mapfile-intf diff --git a/usr/src/cmd/nscd/Makefile b/usr/src/cmd/nscd/Makefile index f33dfac125..bfaab29b71 100644 --- a/usr/src/cmd/nscd/Makefile +++ b/usr/src/cmd/nscd/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -66,6 +66,11 @@ LINTFLAGS += -erroff=E_GLOBAL_COULD_BE_STATIC2 LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 +# nscd interposes on many symbols, and must export others for its own dlsym() +# use, and dlsym() calls from libc. Itemizing the interfaces within a mapfile +# is error-prone, so establish the whole object as an interposer. +LDFLAGS += $(ZINTERPOSE) + # TCOV_FLAG= -ql # GPROF_FLAG= -xpg # DEBUG_FLAG= -g diff --git a/usr/src/cmd/perl/5.8.4/distrib/Makefile b/usr/src/cmd/perl/5.8.4/distrib/Makefile index d98545911b..487f389a48 100644 --- a/usr/src/cmd/perl/5.8.4/distrib/Makefile +++ b/usr/src/cmd/perl/5.8.4/distrib/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -202,7 +202,7 @@ $(DYNALOADER): ext/DynaLoader/Makefile $(PERL_CONFIGDEP) cflags FRC # perl: libperl.so $(DYNALOADER) $(PERL_STATIC_TGT) perlmain.o - $(LINK.c) -z ignore -R$(PERL_REAL_CORE_DIR) \ + $(LINK.c) $(ZIGNORE) -R$(PERL_REAL_CORE_DIR) \ -o $@ perlmain.o $(DYNALOADER) -L. -lperl $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/pools/poolcfg/Makefile b/usr/src/cmd/pools/poolcfg/Makefile index d7b35660b1..40172db111 100644 --- a/usr/src/cmd/pools/poolcfg/Makefile +++ b/usr/src/cmd/pools/poolcfg/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,8 @@ # CDDL HEADER END # # -# Copyright (c) 2001 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" # @@ -39,6 +38,7 @@ include ../Makefile.pools LFLAGS = -t YFLAGS = -d CFLAGS += -I$(POOLSCOMMONDIR) +LDFLAGS += $(MAPFILE.NGB:%=-M%) LDLIBS += -lpool -ll XGETFLAGS = -a CLOBBERFILES += poolcfg_lex.c poolcfg_grammar.c poolcfg_grammar.h @@ -47,7 +47,7 @@ CLOBBERFILES += poolcfg_lex.c poolcfg_grammar.c poolcfg_grammar.h all: $(PROG) -$(PROG): $(OBJS) $(COMMON_OBJS) +$(PROG): $(OBJS) $(COMMON_OBJS) $(MAPFILE.NGB) $(LINK.c) -o $@ $(OBJS) $(COMMON_OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/rcap/Makefile.com b/usr/src/cmd/rcap/Makefile.com index c39ee2a6fd..69f9575d3f 100644 --- a/usr/src/cmd/rcap/Makefile.com +++ b/usr/src/cmd/rcap/Makefile.com @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # # Definitions for targets shared by some subdirs, which have @@ -30,6 +30,8 @@ # COMMON_DIR. # +LDFLAGS += $(MAPFILE.NGB:%=-M%) + %.o: $(COMMON_DIR)/%.c $(COMPILE.c) $< %.po: $(COMMON_DIR)/%.c diff --git a/usr/src/cmd/rcap/rcapadm/Makefile b/usr/src/cmd/rcap/rcapadm/Makefile index e88a65ecdf..26cebc92c0 100644 --- a/usr/src/cmd/rcap/rcapadm/Makefile +++ b/usr/src/cmd/rcap/rcapadm/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" .KEEP_STATE: .SUFFIXES: @@ -59,7 +59,7 @@ all: $(PROG) include ../Makefile.com -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILE.NGB) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) @@ -67,7 +67,6 @@ $(POFILE): $(POFILES) $(RM) $@ $(CAT) $(POFILES) > $@ - clean: $(RM) $(OBJS) $(RM) rcapd_conf.c diff --git a/usr/src/cmd/rcap/rcapstat/Makefile b/usr/src/cmd/rcap/rcapstat/Makefile index e9959c4ef7..afea8d5c91 100644 --- a/usr/src/cmd/rcap/rcapstat/Makefile +++ b/usr/src/cmd/rcap/rcapstat/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" .KEEP_STATE: .SUFFIXES: @@ -39,6 +39,7 @@ LINTSRCS = $(COMMON_DIR)/utils.c \ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG CPPFLAGS += -I$(COMMON_DIR) LDLIBS += -lumem -lzonecfg -lscf +LDFLAGS += $(MAPFILE.NGB:%=-M%) LINTFLAGS += $(LDLIBS) -mnu @@ -53,7 +54,7 @@ CLOBBERFILES += rcapd_conf.c $(POFILES) $(POFILE) .NO_PARALLEL: .PARALLEL: $(OBJS) $(LINTFILES) -all: $(PROG) +all: $(PROG) $(MAPFILE.NGB) include ../Makefile.com diff --git a/usr/src/cmd/rcm_daemon/Makefile.com b/usr/src/cmd/rcm_daemon/Makefile.com index 5a87c8b9bc..4b189c4b32 100644 --- a/usr/src/cmd/rcm_daemon/Makefile.com +++ b/usr/src/cmd/rcm_daemon/Makefile.com @@ -101,6 +101,9 @@ CPPFLAGS += -I.. CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT CFLAGS += $(CCVERBOSE) $(C_PICFLAGS) +MAPFILES = ../common/mapfile-intf $(MAPFILE.NGB) +rcm_daemon := LDFLAGS += $(MAPFILES:%=-M%) + LINTFLAGS += -u -erroff=E_FUNC_ARG_UNUSED LDLIBS_MODULES = @@ -168,7 +171,7 @@ include ../../Makefile.targ $(POFILE): $(POFILES) $(RM) $@; cat $(POFILES) > $@ -$(RCM_DAEMON): $(RCM_OBJ) +$(RCM_DAEMON): $(RCM_OBJ) $(MAPFILES) $(LINK.c) -o $@ $< $(RCM_OBJ) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/rcm_daemon/common/mapfile-intf b/usr/src/cmd/rcm_daemon/common/mapfile-intf new file mode 100644 index 0000000000..e63d550dad --- /dev/null +++ b/usr/src/cmd/rcm_daemon/common/mapfile-intf @@ -0,0 +1,34 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# rcm_daemon interposes on rcm_log_message() - a stub implementation +# existing in librcm.so.1. +{ + global: + rcm_log_message = INTERPOSE; +}; diff --git a/usr/src/cmd/req.flg b/usr/src/cmd/req.flg index efc28a1ec1..2eee34e262 100644 --- a/usr/src/cmd/req.flg +++ b/usr/src/cmd/req.flg @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,16 +19,14 @@ # # CDDL HEADER END # + # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. echo_file usr/src/cmd/Makefile.cmd echo_file usr/src/cmd/Makefile.targ echo_file usr/src/cmd/Makefile.cmd.64 -echo_file usr/src/cmd/mapfile_noexstk -echo_file usr/src/cmd/mapfile_noexdata -echo_file usr/src/cmd/sgs/mapfiles/sparc/map.pagealign -echo_file usr/src/cmd/sgs/mapfiles/i386/map.pagealign +find_files "s.*" usr/src/common/mapfiles diff --git a/usr/src/cmd/rpcsvc/nis/rpc.nisd/Makefile b/usr/src/cmd/rpcsvc/nis/rpc.nisd/Makefile index 9573df097c..0ae4fb7a91 100644 --- a/usr/src/cmd/rpcsvc/nis/rpc.nisd/Makefile +++ b/usr/src/cmd/rpcsvc/nis/rpc.nisd/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -66,6 +65,13 @@ rpc.nisd := LDLIBS += -lnisdb -lldap nisldapmaptest := LDLIBS += -lnisdb -lldap LDLIBS += -lnsl -lc +MAPFILE.INT.L = $(MAPFILE.NGB) mapfile-intf-nislog +MAPFILE.INT.T = $(MAPFILE.NGB) mapfile-intf-nisldapmaptest +MAPFILE.INT.R = $(MAPFILE.NGB) mapfile-intf-rpc.nisd +nislog := LDFLAGS += $(MAPFILE.INT.L:%=-M%) +nisldapmaptest := LDFLAGS += $(MAPFILE.INT.T:%=-M%) +rpc.nisd := LDFLAGS += $(MAPFILE.INT.R:%=-M%) + SUBDIR= resolv_server configs .KEEP_STATE: @@ -89,7 +95,7 @@ lint: lint_SRCS # Explicit link rules for the actual programs to get around the C++ # situation. # -nislog: $(LOG_OBJS) +nislog: $(LOG_OBJS) $(MAPFILE.INT.L) $(LINK.cc) -o $@ $(LOG_OBJS) $(LDLIBS) $(POST_PROCESS) @@ -97,11 +103,11 @@ nisinit: $(INIT_OBJS) $(LINK.c) -o $@ $(INIT_OBJS) $(LDLIBS) $(POST_PROCESS) -rpc.nisd: $(SRV_OBJS) +rpc.nisd: $(SRV_OBJS) $(MAPFILE.INT.R) $(LINK.cc) -o $@ $(SRV_OBJS) $(LDLIBS) $(POST_PROCESS) -nisldapmaptest: $(NISLDAPMAPTEST_OBJS) +nisldapmaptest: $(NISLDAPMAPTEST_OBJS) $(MAPFILE.INT.T) $(LINK.cc) -o $@ $(NISLDAPMAPTEST_OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-nisldapmaptest b/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-nisldapmaptest new file mode 100644 index 0000000000..f74141ab6a --- /dev/null +++ b/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-nisldapmaptest @@ -0,0 +1,37 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# nisldapmaptest interposes on a variety of symbols from libnisdb. +{ + global: + assertExclusive = INTERPOSE; + cons = INTERPOSE; + justTesting = INTERPOSE; + setColumnsDuringConfig = INTERPOSE; + verbose = INTERPOSE; +}; diff --git a/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-nislog b/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-nislog new file mode 100644 index 0000000000..abb934bbe2 --- /dev/null +++ b/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-nislog @@ -0,0 +1,39 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# nislog interposes on a variety of symbols from libnsl and libnisdb. +{ + global: + __start_clock = INTERPOSE; + __stop_clock = INTERPOSE; + abort_transaction = INTERPOSE; + lockTransLog = INTERPOSE; + relative_name = INTERPOSE; + unlockTransLog = INTERPOSE; + verbose = INTERPOSE; +}; diff --git a/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-rpc.nisd b/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-rpc.nisd new file mode 100644 index 0000000000..9f4487d420 --- /dev/null +++ b/usr/src/cmd/rpcsvc/nis/rpc.nisd/mapfile-intf-rpc.nisd @@ -0,0 +1,51 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# rpc.nisd interposes on a variety of symbols from libnsl and libnisdb. +{ + global: + __nis_core_lookup = INTERPOSE; + __nis_finddirectory = INTERPOSE; + __nis_host_is_server = INTERPOSE; + __nis_lock_db_table = INTERPOSE; + __nis_ulock_db_table = INTERPOSE; + __start_clock = INTERPOSE; + __stop_clock = INTERPOSE; + abort_transaction = INTERPOSE; + addUpdate = INTERPOSE; + beginTransaction = INTERPOSE; + cons = INTERPOSE; + endTransaction = INTERPOSE; + get_root_object = INTERPOSE; + lockTransLog = INTERPOSE; + relative_name = INTERPOSE; + remove_root_object = INTERPOSE; + unlockTransLog = INTERPOSE; + update_root_object = INTERPOSE; + verbose = INTERPOSE; +}; diff --git a/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/nget_answer.c b/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/nget_answer.c index 8d668a31ef..13243be2d3 100644 --- a/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/nget_answer.c +++ b/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/nget_answer.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,8 @@ * CDDL HEADER END */ /* - * Copyright (c) 1993,1998 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -62,8 +61,6 @@ typedef union { char ac; } align; -extern int h_errno; - static struct hostent *getanswer(const querybuf *, int, const char *, int); extern int lookup_AF_type(struct cache_ent *chl); extern uint16_t _getshort(const uchar_t *); diff --git a/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/ngethostbyname.c b/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/ngethostbyname.c index 4d89237863..2d3e5afaf6 100644 --- a/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/ngethostbyname.c +++ b/usr/src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/ngethostbyname.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,8 @@ * CDDL HEADER END */ /* - * Copyright (c) 1993,1998 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -49,8 +48,6 @@ #define NO_DATA NO_ADDRESS #endif -int h_errno; /* defined here */ - static void nres_abort_xmit(struct nres *); static struct nres *nres_setup(char *, void (*)(void *, struct hostent *, ulong_t, struct cache_ent *, int), @@ -108,13 +105,13 @@ nres_gethostbyname(name, handler, info) if (temp->tcp_socket >= 0) (void) close(temp->tcp_socket); h_errno = temp->h_errno; - free((char *) temp); - return ((struct nres *) 0); + free((char *)temp); + return ((struct nres *)0); } } else { prnt(P_INFO, "nres-gethostbyname:setup failed.\n"); - return ((struct nres *) - 1); + return ((struct nres *)-1); } } @@ -154,7 +151,7 @@ nres_gethostbyaddr(addr, len, type, handler, info) strcpy(qp, "ip6.int"); break; default: - return ((struct nres *) 0); + return ((struct nres *)0); } temp = nres_setup(qbuf, handler, info); @@ -173,13 +170,13 @@ nres_gethostbyaddr(addr, len, type, handler, info) if (temp->tcp_socket >= 0) (void) close(temp->tcp_socket); h_errno = temp->h_errno; - free((char *) temp); - return ((struct nres *) 0); + free((char *)temp); + return ((struct nres *)0); } } else { prnt(P_INFO, "nres-gethostbyaddr:setup failed.\n"); - return ((struct nres *) - 1); + return ((struct nres *)-1); } } @@ -195,7 +192,7 @@ nres_dotimeout(as) { struct nres *temp; - temp = (struct nres *) as->as_userptr; + temp = (struct nres *)as->as_userptr; /* * timeout @@ -255,7 +252,7 @@ nres_abort_xmit(temp) (void) close(temp->udp_socket); if (temp->tcp_socket >= 0) (void) close(temp->tcp_socket); - free((char *) temp); + free((char *)temp); } } @@ -279,7 +276,7 @@ nres_dosrch(temp) type = temp->qtype; prnt(P_INFO, "search \'%s\'.\n", temp->search_name); temp->question_len = res_mkquery(QUERY, temp->search_name, - C_IN, type, (uchar_t *) NULL, 0, NULL, + C_IN, type, (uchar_t *)NULL, 0, NULL, (uchar_t *)temp->question, MAXPACKET); if (temp->question_len < 0) { temp->h_errno = NO_RECOVERY; @@ -331,7 +328,7 @@ nres_dorecv(as) struct in6_addr **a6; void (*done) (); - temp = (struct nres *) as->as_userptr; + temp = (struct nres *)as->as_userptr; theans = NULL; errno = 0; status = nres_rcv(temp); @@ -390,13 +387,13 @@ out: if (theans->h_addrtype == AF_INET) { theans->h_length = 4; theans->h_addr_list[0] = - (char *) &(temp->theaddr); + (char *)&(temp->theaddr); } else { theans->h_length = 16; theans->h_addr_list[0] = - (char *) &(temp->theaddr6); + (char *)&(temp->theaddr6); } - theans->h_addr_list[1] = (char *) 0; + theans->h_addr_list[1] = (char *)0; if (temp->udp_socket >= 0) (void) close(temp->udp_socket); if (temp->tcp_socket >= 0) @@ -421,7 +418,7 @@ out: (void) close(again->udp_socket); if (again->tcp_socket >= 0) (void) close(again->tcp_socket); - free((char *) again); + free((char *)again); } } else { /* memory error */ @@ -431,7 +428,7 @@ out: temp->h_errno); } - free((char *) temp); + free((char *)temp); return; } else if (temp->reverse == REVERSE_A) { int found_addr = FALSE; @@ -496,7 +493,7 @@ out: (void) close(temp->udp_socket); if (temp->tcp_socket >= 0) (void) close(temp->tcp_socket); - free((char *) temp); + free((char *)temp); return; /* done running */ } @@ -510,7 +507,7 @@ nres_register(a, b) a->nres_rpc_as.as_timeout_flag = TRUE; a->nres_rpc_as.as_timeout = nres_dotimeout; a->nres_rpc_as.as_recv = nres_dorecv; - a->nres_rpc_as.as_userptr = (char *) a; + a->nres_rpc_as.as_userptr = (char *)a; return (rpc_as_register(&(a->nres_rpc_as))); } @@ -522,7 +519,7 @@ nres_setup(name, done, userinfo) { struct nres *tmp; - tmp = (struct nres *) calloc(1, sizeof (struct nres)); + tmp = (struct nres *)calloc(1, sizeof (struct nres)); if (tmp == NULL) return (tmp); (void) strncpy(tmp->name, name, MAXDNAME); diff --git a/usr/src/cmd/rpcsvc/nis/utils/Makefile b/usr/src/cmd/rpcsvc/nis/utils/Makefile index 8eb93fdecc..c53515f38a 100644 --- a/usr/src/cmd/rpcsvc/nis/utils/Makefile +++ b/usr/src/cmd/rpcsvc/nis/utils/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -89,6 +88,9 @@ CPPFLAGS += -I$(SRC)/lib/libnsl/include -I$(SRC)/lib/libnisdb LDLIBS += -lnsl util.a nispasswd := LDLIBS = $(LDLIBS.cmd) -lnsl +nisbackup := LDFLAGS += $(MAPFILE.INT:%=-M%) +nisrestore := LDFLAGS += $(MAPFILE.INT:%=-M%) + LDLIBS += -lc .KEEP_STATE: @@ -133,11 +135,11 @@ $(ROOTNSLIB): $(ROOTNSLIB)/%: % $(ROOTNSLIB) $(INS.file) -$(RESTORE_PROG): $(DERIVED_FILES) $(RESTORE_OBJS) util.a +$(RESTORE_PROG): $(DERIVED_FILES) $(RESTORE_OBJS) util.a $(MAPFILE.INT) $(LINK.cc) -o $@ $(RESTORE_OBJS) $(LDLIBS) -lnisdb $(POST_PROCESS) -$(BACKUP_PROG): $(DERIVED_FILES) $(BACKUP_OBJS) util.a +$(BACKUP_PROG): $(DERIVED_FILES) $(BACKUP_OBJS) util.a $(MAPFILE.INT) $(LINK.cc) -o $@ $(BACKUP_OBJS) $(LDLIBS) -lnisdb $(POST_PROCESS) diff --git a/usr/src/cmd/rpcsvc/nis/utils/mapfile-intf b/usr/src/cmd/rpcsvc/nis/utils/mapfile-intf new file mode 100644 index 0000000000..9f5815c202 --- /dev/null +++ b/usr/src/cmd/rpcsvc/nis/utils/mapfile-intf @@ -0,0 +1,42 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# nisbackup interposes on a variety of symbols from libnsl and libnisdb. Reduce +# all remaining symbols to locals. +{ + global: + __start_clock = INTERPOSE; + __stop_clock = INTERPOSE; + abort_transaction = INTERPOSE; + lockTransLog = INTERPOSE; + relative_name = INTERPOSE; + unlockTransLog = INTERPOSE; + verbose = INTERPOSE; + local: + *; +}; diff --git a/usr/src/cmd/saf/Makefile b/usr/src/cmd/saf/Makefile index 90f488bbc9..4aa859db22 100644 --- a/usr/src/cmd/saf/Makefile +++ b/usr/src/cmd/saf/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -55,6 +55,7 @@ ROOTSACF= $(SACF:%=$(LIBSAFD)/%) ROOTADMF= $(ADMF:%=$(ROOTUSRSBIN)/%) LDLIBS += -lnsl +LDFLAGS += $(MAPFILE.NGB:%=-M%) LINTFLAGS += -b -x OWNER= root GROUP= sys @@ -75,15 +76,15 @@ $(LIBSAFD)/% : % all: $(PROG) -sac: $(SACOBJS) +sac: $(SACOBJS) $(MAPFILE.NGB) $(LINK.c) $(SACOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -sacadm: $(SACADMOBJS) +sacadm: $(SACADMOBJS) $(MAPFILE.NGB) $(LINK.c) $(SACADMOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -pmadm: $(PMADMOBJS) +pmadm: $(PMADMOBJS) $(MAPFILE.NGB) $(LINK.c) $(PMADMOBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sendmail/aux/Makefile b/usr/src/cmd/sendmail/aux/Makefile index 0982fb3938..af6aa7c2a8 100644 --- a/usr/src/cmd/sendmail/aux/Makefile +++ b/usr/src/cmd/sendmail/aux/Makefile @@ -18,11 +18,10 @@ # # CDDL HEADER END # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# # ident "%Z%%M% %I% %E% SMI" # # cmd/sendmail/aux/Makefile @@ -65,6 +64,10 @@ DBMDEF= -DNDBM -DNEWDB CPPFLAGS = $(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.sm) +# Nearly every support application provides sleep(). This isn't incompatible +# with libc, but can be confined to the applications themselves. +LDFLAGS += $(MAPFILE.NGB:%=-M%) + .KEEP_STATE: all: $(PROG) $(LIBPROG) $(USRSBINPROG) diff --git a/usr/src/cmd/sendmail/src/Makefile b/usr/src/cmd/sendmail/src/Makefile index 9a015bb558..cd028d6a0e 100644 --- a/usr/src/cmd/sendmail/src/Makefile +++ b/usr/src/cmd/sendmail/src/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -41,7 +41,8 @@ OBJS= alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o \ SRCS= $(OBJS:%.o=%.c) -LDFLAGS += -R$(SFW_ROOT)/lib +MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +LDFLAGS += -R$(SFW_ROOT)/lib $(MAPFILES:%=-M%) # EXPORT DELETE START CRYPTOLIBS= -lssl -lcrypto @@ -75,7 +76,8 @@ all: $(PROG) .PARALLEL: $(OBJS) -$(PROG): $(OBJS) ../libsmutil/libsmutil.a ../libsm/libsm.a ../db/libdb.a +$(PROG): $(OBJS) $(MAPFILES) \ + ../libsmutil/libsmutil.a ../libsm/libsm.a ../db/libdb.a $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sendmail/src/mapfile-intf b/usr/src/cmd/sendmail/src/mapfile-intf new file mode 100644 index 0000000000..93dd4710e8 --- /dev/null +++ b/usr/src/cmd/sendmail/src/mapfile-intf @@ -0,0 +1,37 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# sendmail defines its own sleep() which pre-dates libc's sleep(), but is +# essentially the same. To maintain source compatibility, define only those +# symbols that must remain global, and therefore remove the sleep name-space +# clash. +{ + global: + allow_severity; # required by libwrap + deny_severity; # required by libwrap +}; diff --git a/usr/src/cmd/sgs/Makefile b/usr/src/cmd/sgs/Makefile index 3374590b0b..c01267893d 100644 --- a/usr/src/cmd/sgs/Makefile +++ b/usr/src/cmd/sgs/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -60,7 +60,6 @@ SUBDIRS-common= libconv \ lex \ lorder \ m4 \ - mapfiles \ mcs \ moe \ nm \ diff --git a/usr/src/cmd/sgs/Makefile.var b/usr/src/cmd/sgs/Makefile.var index f5e56f0844..b056b67def 100644 --- a/usr/src/cmd/sgs/Makefile.var +++ b/usr/src/cmd/sgs/Makefile.var @@ -217,11 +217,6 @@ VAR_LIBLDDBG_CPPFLAGS=-DDEMANGLE VAR_LIBRTLD_DB_RDB_DEMO_LINTFLAGS64= $(VAR_LINTFLAGS64) # -# mapfiles -# -VAR_MAPFILES_FILES= $(ROOTDIR)/map.default $(ROOTDIR)/map.pagealign - -# # rtld # VAR_RTLD_CPICLIB= -L ../../../../lib/libc/$(MACH) diff --git a/usr/src/cmd/sgs/crle/Makefile.com b/usr/src/cmd/sgs/crle/Makefile.com index 3e1213c308..9755c96d65 100644 --- a/usr/src/cmd/sgs/crle/Makefile.com +++ b/usr/src/cmd/sgs/crle/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,7 +37,8 @@ BLTOBJ= msg.o OBJS= $(BLTOBJ) $(COMOBJ) -MAPFILE= ../common/mapfile-vers +MAPFILE= $(MAPFILE.NGB) +MAPOPT= $(MAPFILE:%=-M%) # Building SUNWonld results in a call to the `package' target. Requirements # needed to run this application on older releases are established: @@ -51,7 +52,7 @@ CPPFLAGS += -I. -I../../include -I../../include/$(MACH) \ $(CPPFLAGS.master) -D__EXTENSIONS__ LLDFLAGS = '-R$$ORIGIN/../lib' LLDFLAGS64 = '-R$$ORIGIN/../../lib/$(MACH64)' -LDFLAGS += $(VERSREF) $(USE_PROTO) -M$(MAPFILE) \ +LDFLAGS += $(VERSREF) $(USE_PROTO) $(MAPOPT) \ $(LLDFLAGS) $(ZNOLAZYLOAD) LDLIBS += -lelf $(CONVLIBDIR) $(CONV_LIB) $(DLLIB) LINTFLAGS += -mx diff --git a/usr/src/cmd/sgs/crle/common/mapfile-vers b/usr/src/cmd/sgs/crle/common/mapfile-vers deleted file mode 100644 index 7a55f55701..0000000000 --- a/usr/src/cmd/sgs/crle/common/mapfile-vers +++ /dev/null @@ -1,37 +0,0 @@ -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. - -{ - global: - main; # Provides basic adb symbol offsets - - local: - *; -}; diff --git a/usr/src/cmd/sgs/elfdump/Makefile.com b/usr/src/cmd/sgs/elfdump/Makefile.com index 8c93f1a7e7..e8c2a739b4 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.com +++ b/usr/src/cmd/sgs/elfdump/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -43,14 +43,15 @@ BLTOBJ = msg.o OBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) $(TOOLOBJ) -MAPFILE= ../common/mapfile-vers +MAPFILE= $(MAPFILE.NGB) +MAPOPT= $(MAPFILE:%=-M%) CPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ -I$(SRCBASE)/lib/libc/inc -I$(SRCBASE)/uts/$(ARCH)/sys \ $(CPPFLAGS.master) LLDFLAGS = $(VAR_ELFDUMP_LLDFLAGS) LLDFLAGS64 = $(VAR_LD_LLDFLAGS64) -LDFLAGS += $(VERSREF) $(USE_PROTO) -M$(MAPFILE) $(LLDFLAGS) $(ZLAZYLOAD) +LDFLAGS += $(VERSREF) $(USE_PROTO) $(MAPOPT) $(LLDFLAGS) $(ZLAZYLOAD) LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ $(CONVLIBDIR) $(CONV_LIB) diff --git a/usr/src/cmd/sgs/ld/Makefile.com b/usr/src/cmd/sgs/ld/Makefile.com index b133bb87f2..c320940984 100644 --- a/usr/src/cmd/sgs/ld/Makefile.com +++ b/usr/src/cmd/sgs/ld/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,9 +37,10 @@ BLTOBJ = msg.o OBJS = $(BLTOBJ) $(COMOBJS) .PARALLEL: $(OBJS) -MAPFILE = ../common/mapfile-vers +MAPFILES = ../common/mapfile-intf $(MAPFILE.NGB) +MAPOPTS = $(MAPFILES:%=-M%) -LDFLAGS += $(VERSREF) $(LAZYLOAD) $(BDIRECT) $(USE_PROTO) -M$(MAPFILE) \ +LDFLAGS += $(VERSREF) $(LAZYLOAD) $(BDIRECT) $(USE_PROTO) $(MAPOPTS) \ $(VAR_LD_LLDFLAGS) LDLIBS += $(LDLIBDIR) $(LD_LIB) $(ELFLIBDIR) -lelf \ $(LDDBGLIBDIR) $(LDDBG_LIB) $(CONVLIBDIR) $(CONV_LIB) diff --git a/usr/src/cmd/sgs/ld/Makefile.targ b/usr/src/cmd/sgs/ld/Makefile.targ index 3bc4d5ac3f..ec797edcbc 100644 --- a/usr/src/cmd/sgs/ld/Makefile.targ +++ b/usr/src/cmd/sgs/ld/Makefile.targ @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -35,7 +35,7 @@ package: all $(ROOTCCSBINPROG) $(COMPILE.c) $< $(POST_PROCESS_O) -$(PROG): $(MAPFILE) +$(PROG): $(MAPFILES) $(ROOTCCSBIN)/%: % $(INS.file) diff --git a/usr/src/cmd/sgs/ld/common/mapfile-vers b/usr/src/cmd/sgs/ld/common/mapfile-intf index a5d64c2399..a590a95082 100644 --- a/usr/src/cmd/sgs/ld/common/mapfile-vers +++ b/usr/src/cmd/sgs/ld/common/mapfile-intf @@ -20,18 +20,13 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. - +# Export eprintf for dependencies. { global: - main; eprintf; - local: - *; }; diff --git a/usr/src/cmd/sgs/ldd/Makefile.com b/usr/src/cmd/sgs/ldd/Makefile.com index 32cd977b47..314a06299b 100644 --- a/usr/src/cmd/sgs/ldd/Makefile.com +++ b/usr/src/cmd/sgs/ldd/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,7 +36,8 @@ BLTOBJ= msg.o OBJS= $(BLTOBJ) $(COMOBJ) -MAPFILE= ../common/mapfile-vers +MAPFILE= $(MAPFILE.NGB) +MAPOPTS= $(MAPFILE:%=-M%) # Building SUNWonld results in a call to the `package' target. Requirements # needed to run this application on older releases are established: @@ -48,7 +49,7 @@ package := DLLIB = $(VAR_PKG_DL_LIB) CPPFLAGS += -I. -I../../include -I../../include/$(MACH) \ -I$(SRCBASE)/uts/$(ARCH)/sys \ $(CPPFLAGS.master) -LDFLAGS += $(VERSREF) $(USE_PROTO) -M$(MAPFILE) \ +LDFLAGS += $(VERSREF) $(USE_PROTO) $(MAPOPTS) \ '-R$$ORIGIN/../lib' LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lelf $(DLLIB) LINTFLAGS += -x diff --git a/usr/src/cmd/sgs/ldd/common/mapfile-vers b/usr/src/cmd/sgs/ldd/common/mapfile-vers deleted file mode 100644 index 7a55f55701..0000000000 --- a/usr/src/cmd/sgs/ldd/common/mapfile-vers +++ /dev/null @@ -1,37 +0,0 @@ -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. - -{ - global: - main; # Provides basic adb symbol offsets - - local: - *; -}; diff --git a/usr/src/cmd/sgs/libdl/Makefile.com b/usr/src/cmd/sgs/libdl/Makefile.com index 54bbb2c080..09e27433e1 100644 --- a/usr/src/cmd/sgs/libdl/Makefile.com +++ b/usr/src/cmd/sgs/libdl/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -33,7 +33,7 @@ include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common -MAPFILES += mapfile-vers $(MAPFILE-FLTR) +MAPFILES += mapfile-vers $(MAPFILE.FLT) # Redefine shared object build rule to use $(LD) directly (this avoids .init # and .fini sections being added). Also, since there are no OBJECTS, turn diff --git a/usr/src/cmd/sgs/libdl/inc.flg b/usr/src/cmd/sgs/libdl/inc.flg index 61d167eef6..9540e580ec 100644 --- a/usr/src/cmd/sgs/libdl/inc.flg +++ b/usr/src/cmd/sgs/libdl/inc.flg @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,16 +19,18 @@ # # CDDL HEADER END # + # -# pragma ident "%Z%%M% %I% %E% SMI" +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 1996 by Sun Microsystems, Inc. +# ident "%Z%%M% %I% %E% SMI" # echo_file usr/src/lib/Makefile.lib echo_file usr/src/lib/Makefile.targ -echo_file usr/src/lib/common/mapfile-filter +echo_file usr/src/common/mapfiles/common/map.filter echo_file usr/src/cmd/sgs/Makefile.sub echo_file usr/src/cmd/sgs/Makefile.com diff --git a/usr/src/cmd/sgs/libld/common/mapfile-vers b/usr/src/cmd/sgs/libld/common/mapfile-vers index 6c6c5e5a03..d6150a4aba 100644 --- a/usr/src/cmd/sgs/libld/common/mapfile-vers +++ b/usr/src/cmd/sgs/libld/common/mapfile-vers @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -39,7 +39,7 @@ SUNWprivate_4.2 { global: - dbg_print; + dbg_print = NODIRECT; # interposed - ld(1) and ld.so.1(1) ld32_main; ld64_main; diff --git a/usr/src/cmd/sgs/moe/Makefile.com b/usr/src/cmd/sgs/moe/Makefile.com index d4810e7fcf..a20902102f 100644 --- a/usr/src/cmd/sgs/moe/Makefile.com +++ b/usr/src/cmd/sgs/moe/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,9 +36,10 @@ BLTOBJ= msg.o OBJS= $(BLTOBJ) $(COMOBJ) -MAPFILE= ../common/mapfile-vers +MAPFILE= $(MAPFILE.NGB) +MAPOPT= $(MAPFILE:%=-M%) -LDFLAGS += -Wl,$(VERSREF) $(USE_PROTO) -M $(MAPFILE) +LDFLAGS += -Wl,$(VERSREF) $(USE_PROTO) $(MAPOPT) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) LINTFLAGS += -x diff --git a/usr/src/cmd/sgs/packages/Makefile b/usr/src/cmd/sgs/packages/Makefile index f03a20e3ab..2535ca42ae 100644 --- a/usr/src/cmd/sgs/packages/Makefile +++ b/usr/src/cmd/sgs/packages/Makefile @@ -137,6 +137,7 @@ package_dep: package_dep_ .WAIT $(SUBDIRS1) .WAIT \ package_dep_: FRC @ cd ../tools; pwd; $(MAKE) proto && ./proto + @ cd $(SRC)/common/mapfiles/gen ; pwd; $(MAKE) install @ cd $(SRC)/head; pwd; $(MAKE) \ $(ROOT)/usr/include/dlfcn.h \ $(ROOT)/usr/include/gelf.h \ diff --git a/usr/src/cmd/sgs/packages/inc.flg b/usr/src/cmd/sgs/packages/inc.flg index c2724f7d08..0f6a575daf 100644 --- a/usr/src/cmd/sgs/packages/inc.flg +++ b/usr/src/cmd/sgs/packages/inc.flg @@ -61,6 +61,7 @@ find_files "s.*" \ usr/src/common/dtrace \ usr/src/common/elfcap \ usr/src/common/sgsrtcid \ + usr/src/common/mapfiles \ usr/src/lib/libc/inc \ usr/src/lib/libproc \ usr/src/lib/common diff --git a/usr/src/cmd/sgs/pvs/Makefile.com b/usr/src/cmd/sgs/pvs/Makefile.com index 809537efab..969646160f 100644 --- a/usr/src/cmd/sgs/pvs/Makefile.com +++ b/usr/src/cmd/sgs/pvs/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,12 +36,13 @@ BLTOBJ= msg.o OBJS= $(BLTOBJ) $(COMOBJ) -MAPFILE= ../common/mapfile-vers +MAPFILE= $(MAPFILE.NGB) +MAPOPTS= $(MAPFILE:%=-M%) CPPFLAGS += -I$(SRCBASE)/lib/libc/inc LLDFLAGS = '-R$$ORIGIN/../lib' LLDFLAGS64 = '-R$$ORIGIN/../../lib/$(MACH64)' -LDFLAGS += $(VERSREF) $(USE_PROTO) -M$(MAPFILE) $(LLDFLAGS) +LDFLAGS += $(VERSREF) $(USE_PROTO) $(MAPOPTS) $(LLDFLAGS) LDLIBS += $(LDDBGLIBDIR) $(LDDBG_LIB) $(ELFLIBDIR) -lelf \ $(CONVLIBDIR) $(CONV_LIB) LINTFLAGS += -x diff --git a/usr/src/cmd/sgs/rtld/Makefile.com b/usr/src/cmd/sgs/rtld/Makefile.com index e823bedc7f..bb12a510c4 100644 --- a/usr/src/cmd/sgs/rtld/Makefile.com +++ b/usr/src/cmd/sgs/rtld/Makefile.com @@ -50,7 +50,7 @@ SRCDIR = ../common PLAT = $(VAR_PLAT_$(BASEPLAT)) # DTrace needs an executable data segment. -NX_MAP= +MAPFILE.NED= MAPFILES += $(MAPFILE-ORDER) $(MAPFILE-PLAT) diff --git a/usr/src/cmd/sh/Makefile b/usr/src/cmd/sh/Makefile index 4e34aad193..ceff32712c 100644 --- a/usr/src/cmd/sh/Makefile +++ b/usr/src/cmd/sh/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -46,8 +45,10 @@ CFLAGS += $(iBCS2FLAG) POFILE= sh.po POFILES= $(SRCS:%.c=%.po) XGETFLAGS += -a -x sh.xcl -CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DACCT +CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DACCT +MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) LAZYLIBS = $(ZLAZYLOAD) -lgen -lsecdb $(ZNOLAZYLOAD) lint := LAZYLIBS = -lgen -lsecdb LDLIBS += $(LAZYLIBS) @@ -59,7 +60,7 @@ GROUP = root all: $(ROOTFS_PROG) -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILES) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sh/jobs.c b/usr/src/cmd/sh/jobs.c index e684d612c4..b74a6a8942 100644 --- a/usr/src/cmd/sh/jobs.c +++ b/usr/src/cmd/sh/jobs.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -49,14 +49,14 @@ struct job struct job *j_nxtp; /* next job in job ID order */ struct job *j_curp; /* next job in job currency order */ struct termios j_stty; /* termio save area when job stops */ - pid_t j_pid; /* job leader's process ID */ - pid_t j_pgid; /* job's process group ID */ - pid_t j_tgid; /* job's foreground process group ID */ - uint j_jid; /* job ID */ - ushort j_xval; /* exit code, or exit or stop signal */ - ushort j_flag; /* various status flags defined below */ - char *j_pwd; /* job's working directory */ - char *j_cmd; /* cmd used to invoke this job */ + pid_t j_pid; /* job leader's process ID */ + pid_t j_pgid; /* job's process group ID */ + pid_t j_tgid; /* job's foreground process group ID */ + uint_t j_jid; /* job ID */ + ushort_t j_xval; /* exit code, or exit or stop signal */ + ushort_t j_flag; /* various status flags defined below */ + char *j_pwd; /* job's working directory */ + char *j_cmd; /* cmd used to invoke this job */ }; /* defines for j_flag */ @@ -98,23 +98,6 @@ static struct job *jobcur, /* active jobs listed in currency order */ static void printjob(struct job *, int); -pid_t -tcgetpgrp(fd) -{ - pid_t pgid; - if (ioctl(fd, TIOCGPGRP, &pgid) == 0) - return (pgid); - return ((pid_t)-1); -} - -int -tcsetpgrp(fd, pgid) -int fd; -pid_t pgid; -{ - return (ioctl(fd, TIOCSPGRP, &pgid)); -} - static struct job * pgid2job(pid_t pgid) { @@ -642,7 +625,7 @@ deallocjob() } void -allocjob(char *cmd, unchar *cwd, int monitor) +allocjob(char *cmd, uchar_t *cwd, int monitor) { struct job *jp, **jpp; int jid, cmdlen, cwdlen; diff --git a/usr/src/cmd/sh/mapfile-intf b/usr/src/cmd/sh/mapfile-intf new file mode 100644 index 0000000000..6dd699730b --- /dev/null +++ b/usr/src/cmd/sh/mapfile-intf @@ -0,0 +1,36 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# The shell has a name clash (exp, hcreate). Demote everything to local +# besides the malloc family that must be exported. +{ + global: + free; + malloc; + realloc; +}; diff --git a/usr/src/cmd/ssh/Makefile.ssh-common b/usr/src/cmd/ssh/Makefile.ssh-common index de94cbd78a..d3d27a8068 100644 --- a/usr/src/cmd/ssh/Makefile.ssh-common +++ b/usr/src/cmd/ssh/Makefile.ssh-common @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,7 +18,7 @@ # # CDDL HEADER END # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -32,6 +31,7 @@ include $(SRC)/lib/openssl/Makefile.openssl TEXT_DOMAIN=SUNW_OST_OSCMD CFLAGS += $(CCVERBOSE) +LDFLAGS += $(MAPFILE.NGB:%=-M%) SSH_VERSION=\"Sun_SSH_1.1\" @@ -47,6 +47,8 @@ SSH_COMMON_LDLIBS = \ -L../libssh/$(MACH) -lssh \ -L../libopenbsd-compat/$(MACH) -lopenbsd-compat +$(PROG): $(MAPFILE.NGB) + # # Some the lint -erroff flags listed below are because of deficiencies in # lint not because we are hiding real errors or to avoid massive resync- diff --git a/usr/src/cmd/ssh/sshd/Makefile b/usr/src/cmd/ssh/sshd/Makefile index c96107ec5f..9999f6feff 100644 --- a/usr/src/cmd/ssh/sshd/Makefile +++ b/usr/src/cmd/ssh/sshd/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -81,6 +81,8 @@ LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket \ $(OPENSSL_LDFLAGS) -lcrypto \ -lgss \ -lcontract +MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) DYNFLAGS += $(OPENSSL_DYNFLAGS) $(C99_DISABLE) @@ -94,7 +96,8 @@ CPPFLAGS += -I$(ROOTSFWINCLUDE) all: $(PROG) -$(PROG): $(OBJS) ../libssh/$(MACH)/libssh.a ../libopenbsd-compat/$(MACH)/libopenbsd-compat.a +$(PROG): $(OBJS) $(MAPFILES) ../libssh/$(MACH)/libssh.a \ + ../libopenbsd-compat/$(MACH)/libopenbsd-compat.a $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(DYNFLAGS) $(POST_PROCESS) diff --git a/usr/src/cmd/ssh/sshd/mapfile-intf b/usr/src/cmd/ssh/sshd/mapfile-intf new file mode 100644 index 0000000000..6018e8c3a7 --- /dev/null +++ b/usr/src/cmd/ssh/sshd/mapfile-intf @@ -0,0 +1,35 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# sshd defines its own log(), as do various other ssh utilities, thus their +# symbols are reduced to locals via MAPFILE.NGB in Makefile-ssh.common. sshd +# must export some symbols too, thus this mapfile augments the former. +{ + global: + allow_severity; # required by libwrap + deny_severity; # required by libwrap +}; diff --git a/usr/src/cmd/svc/configd/sqlite/Makefile b/usr/src/cmd/svc/configd/sqlite/Makefile index 02a458cadb..b527f74dab 100644 --- a/usr/src/cmd/svc/configd/sqlite/Makefile +++ b/usr/src/cmd/svc/configd/sqlite/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" @@ -248,10 +248,9 @@ lemon-build: lemon.o $(TOOLDIR)/lempar.c shell.o: sqlite.h -NES_MAPFILE= $(SRC)/cmd/mapfile_noexstk $(NX_MAP) - sqlite: shell.o $(RELOC) - $(LINK.c) -o sqlite shell.o $(NES_MAPFILE:%=-M%) $(RELOC) + $(LINK.c) -o sqlite shell.o \ + $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) $(RELOC) $(CTFMERGE) -t -L VERSION -o $@ shell.o $(RELOC) $(POST_PROCESS) diff --git a/usr/src/cmd/svc/svccfg/Makefile b/usr/src/cmd/svc/svccfg/Makefile index 69e838e9b8..faf2666d51 100644 --- a/usr/src/cmd/svc/svccfg/Makefile +++ b/usr/src/cmd/svc/svccfg/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ # # CDDL HEADER END # + # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -62,6 +62,7 @@ $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o) MYCPPFLAGS = -I ../common -I/usr/include/libxml2 CPPFLAGS += $(MYCPPFLAGS) +LDFLAGS += $(MAPFILE.NGB:%=-M%) LFLAGS = -t YFLAGS = -d @@ -69,7 +70,7 @@ YFLAGS = -d CLOBBERFILES += svccfg_lex.c svccfg_grammar.c svccfg_grammar.h \ $(MYPROG:%=%-native) -LAZYLIBS = -z lazyload -lxml2 -z nolazyload +LAZYLIBS = $(ZLAZYLOAD) -lxml2 $(ZNOLAZYLOAD) SVCCFG_EXTRA_LIBS = $(LAZYLIBS) -lscf -ll -luutil -lumem -lmd5 $(NOT_NATIVE)SVCCFG_EXTRA_LIBS += -ltecla @@ -113,7 +114,7 @@ native: FRC @cd $(LIBSCF)/native; pwd; $(MAKE) $(MFLAGS) install @NATIVE_BUILD= $(MAKE) $(MFLAGS) all -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILE.NGB) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) $(POST_PROCESS) diff --git a/usr/src/cmd/tcpd/Makefile b/usr/src/cmd/tcpd/Makefile index 890eee46f5..576cf1fab2 100644 --- a/usr/src/cmd/tcpd/Makefile +++ b/usr/src/cmd/tcpd/Makefile @@ -45,6 +45,16 @@ tcpd tcpdmatch try-from := \ tcpdchk := \ LDLIBS += -R$(SFW_ROOT)/lib -L$(ROOTSFWLIB) -lwrap -lnsl +# Various components must export interfaces, but also contain name-space +# clashes with system libraries. +MAPFILE.INT.D = $(MAPFILE.NGB) mapfile-intf-tcpdchk +MAPFILE.INT.M = $(MAPFILE.NGB) mapfile-intf-tcpdmatch +MAPFILE.INT.F = $(MAPFILE.NGB) mapfile-intf-tryfrom + +tcpdchk := LDFLAGS +=$(MAPFILE.INT.D:%=-M%) +tcpdmatch := LDFLAGS +=$(MAPFILE.INT.M:%=-M%) +try-from := LDFLAGS +=$(MAPFILE.INT.F:%=-M%) + # SRCONLY files are not used for building but are included in the source code # package SUNWtcpdS for consistency and completeness with respect to the # public tcp_wrappers distribution. @@ -142,17 +152,17 @@ $(ROOTSFW): TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o -tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) +tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) $(MAPFILE.INTF.M) $(LINK.c) -o $@ $(TCPDMATCH_OBJ) $(LDLIBS) $(POST_PROCESS) -try-from: try-from.o fakelog.o $(LIB) +try-from: try-from.o fakelog.o $(LIB) $(MAPFILE.INTF.F) $(LINK.c) -o $@ try-from.o fakelog.o $(LDLIBS) $(POST_PROCESS) TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o -tcpdchk: $(TCPDCHK_OBJ) $(LIB) +tcpdchk: $(TCPDCHK_OBJ) $(LIB) $(MAPFILE.INTF.C) $(LINK.c) -o $@ $(TCPDCHK_OBJ) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/tcpd/mapfile-intf-tcpdchk b/usr/src/cmd/tcpd/mapfile-intf-tcpdchk new file mode 100644 index 0000000000..92271c22c8 --- /dev/null +++ b/usr/src/cmd/tcpd/mapfile-intf-tcpdchk @@ -0,0 +1,48 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# tcpdchk interposes on numerous routines, and must export other data +# structures to satisfy external dependency requirements. +{ + global: + clean_exit = INTERPOSE; + closelog = INTERPOSE; + hosts_access_verbose = INTERPOSE; + hosts_allow_table = INTERPOSE; + hosts_deny_table = INTERPOSE; + openlog = INTERPOSE; + resident = INTERPOSE; + rfc931 = INTERPOSE; + rfc931_timeout = INTERPOSE; + shell_cmd = INTERPOSE; + syslog = INTERPOSE; + vsyslog = INTERPOSE; + + allow_severity; # required by libwrap + deny_severity; # required by libwrap +}; diff --git a/usr/src/cmd/tcpd/mapfile-intf-tcpdmatch b/usr/src/cmd/tcpd/mapfile-intf-tcpdmatch new file mode 100644 index 0000000000..c7593a942b --- /dev/null +++ b/usr/src/cmd/tcpd/mapfile-intf-tcpdmatch @@ -0,0 +1,44 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# tcpdmatch interposes on numerous routines, and must export other data +# structures to satisfy external dependency requirements. +{ + global: + clean_exit = INTERPOSE; + closelog = INTERPOSE; + openlog = INTERPOSE; + rfc931 = INTERPOSE; + rfc931_timeout = INTERPOSE; + shell_cmd = INTERPOSE; + syslog = INTERPOSE; + vsyslog = INTERPOSE; + + allow_severity; # required by libwrap + deny_severity; # required by libwrap +}; diff --git a/usr/src/cmd/tcpd/mapfile-intf-tryfrom b/usr/src/cmd/tcpd/mapfile-intf-tryfrom new file mode 100644 index 0000000000..31fab42fda --- /dev/null +++ b/usr/src/cmd/tcpd/mapfile-intf-tryfrom @@ -0,0 +1,39 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# try-from interposes on numerous routines, and must export other data +# structures to satisfy external dependency requirements. +{ + global: + closelog = INTERPOSE; + openlog = INTERPOSE; + syslog = INTERPOSE; + vsyslog = INTERPOSE; + + allow_severity; # required by libwrap + deny_severity; # required by libwrap +}; diff --git a/usr/src/cmd/tic/Makefile b/usr/src/cmd/tic/Makefile index 0bc08a394f..01b53de057 100644 --- a/usr/src/cmd/tic/Makefile +++ b/usr/src/cmd/tic/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,10 +19,10 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1989,1996 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # PROG= tic @@ -43,12 +42,14 @@ include ../Makefile.cmd LDLIBS += -lcurses CPPFLAGS += -I../../lib/libcurses/screen +MAPFILE = $(MAPFILE.INT) $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) .KEEP_STATE: all: $(PROG) -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILES) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/tic/mapfile-intf b/usr/src/cmd/tic/mapfile-intf new file mode 100644 index 0000000000..fec5bb5282 --- /dev/null +++ b/usr/src/cmd/tic/mapfile-intf @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# tic interposes on progname[], so identify this as an interposer. +{ + global: + progname = INTERPOSE; +}; diff --git a/usr/src/cmd/tplot/Makefile b/usr/src/cmd/tplot/Makefile index 355fa7c7e5..018d914c70 100644 --- a/usr/src/cmd/tplot/Makefile +++ b/usr/src/cmd/tplot/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ # # CDDL HEADER END # + # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,12 +37,14 @@ CLOBBERFILES += $(SHFILES) # conditional assignments t% := LDLIBS += -l$(@F:t%=%) +t% := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +t% := LDFLAGS += $(MAPFILES:%=-M%) .KEEP_STATE: all: $(PROG) $(SHFILES) -$(TPROG): driver.o +$(TPROG): driver.o $$(MAPFILES) $(LINK.c) -o $@ driver.o $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/tplot/mapfile-intf b/usr/src/cmd/tplot/mapfile-intf new file mode 100644 index 0000000000..5790049a59 --- /dev/null +++ b/usr/src/cmd/tplot/mapfile-intf @@ -0,0 +1,35 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# t* utilities interpose on a couple of libm and libt* items. +{ + global: + matherr = INTERPOSE; + deltx = INTERPOSE; + delty = INTERPOSE; +}; diff --git a/usr/src/cmd/ttymon/Makefile b/usr/src/cmd/ttymon/Makefile index e146b6f468..2f47689912 100644 --- a/usr/src/cmd/ttymon/Makefile +++ b/usr/src/cmd/ttymon/Makefile @@ -18,8 +18,9 @@ # # CDDL HEADER END # + # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -72,6 +73,7 @@ $(XPG4STTYOBJ) := CPPFLAGS += -DEUC LINTFLAGS = -b -x CFLAGS += $(CCVERBOSE) +LDFLAGS += $(MAPFILE.NGB:%=-M%) # # Message catalog @@ -102,11 +104,11 @@ ROOTXPG6SYMLINK= $(ROOTXPG6BIN)/stty all: $(PROG) $(XPG4) -stty: sttyobjs $(STTYOBJ) +stty: sttyobjs $(STTYOBJ) $(MAPFILE.NGB) $(LINK.c) $(STTYOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -stty.xpg4: $(XPG4STTYOBJ) +stty.xpg4: $(XPG4STTYOBJ) $(MAPFILE.NGB) $(LINK.c) $(XPG4STTYOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) @@ -124,15 +126,15 @@ sttyobjs: sttyobjs.xpg4: -@mkdir -p $@ -ttymon: $(TTYMONOBJ) +ttymon: $(TTYMONOBJ) $(MAPFILE.NGB) $(LINK.c) $(TTYMONOBJ) -o $@ $(LDLIBS) -lpam $(POST_PROCESS) -ttyadm: $(TTYADMOBJ) +ttyadm: $(TTYADMOBJ) $(MAPFILE.NGB) $(LINK.c) $(TTYADMOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -sttydefs: $(STTYDEFSOBJ) +sttydefs: $(STTYDEFSOBJ) $(MAPFILE.NGB) $(LINK.c) $(STTYDEFSOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/vi/port/Makefile b/usr/src/cmd/vi/port/Makefile index 155862a4b1..4b9c17ee22 100644 --- a/usr/src/cmd/vi/port/Makefile +++ b/usr/src/cmd/vi/port/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -65,6 +64,11 @@ $(XPG4) := CFLAGS += -DXPG4 -DXPG4ONLY $(XPG6) := CFLAGS += -DXPG4 -DXPG6 -I$(SRC)/lib/libc/inc CPPFLAGS += -DUSG -DSTDIO -DVMUNIX -DTABS=8 -DSINGLE -DTAG_STACK + +# vi maintains its own versions of various routines from libc and libcurses, +# so localize all symbols to avoid name space collisions. +LDFLAGS += $(MAPFILE.NGB:%=-M%) + CLOBBERFILES += $(LIBPROGS) ex := LDLIBS += -lmapmalloc -lcurses \ $(ZLAZYLOAD) -lgen -lcrypt_i $(ZNOLAZYLOAD) diff --git a/usr/src/cmd/xntpd/xntpd/Makefile b/usr/src/cmd/xntpd/xntpd/Makefile index d5d8bbced8..4c2fb3e55a 100644 --- a/usr/src/cmd/xntpd/xntpd/Makefile +++ b/usr/src/cmd/xntpd/xntpd/Makefile @@ -39,7 +39,8 @@ LIBNTP= ../$(LIBNTP_A) LIBPARSE= ../$(LIBPARSE_A) LINTLIB= ../$(LLIBNTP_A) LIBS += -lscf -LDLIBS += $(LIBNTP) $(LIBPARSE) $(LIBS) +LDLIBS += $(LIBNTP) $(LIBPARSE) $(LIBS) +LDFLAGS += $(MAPFILE.NGB:%=-M%) # SOURCE= ntp_config.c ntp_control.c ntp_io.c ntp_leap.c \ ntp_loopfilter.c ntp_monitor.c ntp_peer.c ntp_proto.c \ @@ -74,7 +75,7 @@ OBJS= ntp_config.o ntp_control.o ntp_io.o ntp_leap.o \ $(REFCLK_OBJS) := CFLAGS += $(CLOCKDEFS) -$(PROG): $(OBJS) $(LIBNTP) $(LIBPARSE) +$(PROG): $(OBJS) $(LIBNTP) $(LIBPARSE) $(MAPFILE.NGB) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/ypcmd/Makefile b/usr/src/cmd/ypcmd/Makefile index 115627b885..2f3cb308d0 100644 --- a/usr/src/cmd/ypcmd/Makefile +++ b/usr/src/cmd/ypcmd/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -57,6 +57,8 @@ $(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb ypinit := LDLIBS += -lnsl yppoll := LDLIBS += -lnsl ypset := LDLIBS += -lnsl +makedbm := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +makedbm := LDFLAGS += $(MAPFILES:%=-M%) $(ROOTVAR_YP)/aliases := GROUP=bin $(ROOTVAR_YP)/aliases := FILEMODE=555 @@ -191,7 +193,7 @@ ypbind: $(YPBINDOBJ) $(LINK.c) $(YPBINDOBJ) -o $@ $(LDLIBS) $(POST_PROCESS) -makedbm ypalias: $$@.o $(COMMONOBJ) +makedbm ypalias: $$@.o $(COMMONOBJ) $$(MAPFILES) $(LINK.c) -o $@ $@.o $(COMMONOBJ) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/ypcmd/mapfile-intf b/usr/src/cmd/ypcmd/mapfile-intf new file mode 100644 index 0000000000..25b7f05d10 --- /dev/null +++ b/usr/src/cmd/ypcmd/mapfile-intf @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# makedbm interposes on _close. +{ + global: + _close = INTERPOSE; +}; diff --git a/usr/src/cmd/ypcmd/yppasswd/Makefile b/usr/src/cmd/ypcmd/yppasswd/Makefile index 50a54bc1f6..5049d9d8e9 100644 --- a/usr/src/cmd/ypcmd/yppasswd/Makefile +++ b/usr/src/cmd/ypcmd/yppasswd/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,6 +44,8 @@ ROOTDIRS = $(NETSVC) $(NETYP) # include library definitions #LDLIBS += -lrpcsvc -lnsl -lcrypt -lintl -lgen LDLIBS += -lnsl -lnisdb -lc +MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) +LDFLAGS += $(MAPFILES:%=-M%) # Pick up includes from library CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol @@ -83,7 +85,7 @@ $(ETCDFLTFILE) := FILEMODE=0444 all: $(PROG) -rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) +rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES) $(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \ $(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/ypcmd/yppasswd/mapfile-intf b/usr/src/cmd/ypcmd/yppasswd/mapfile-intf new file mode 100644 index 0000000000..2c2849c3f6 --- /dev/null +++ b/usr/src/cmd/ypcmd/yppasswd/mapfile-intf @@ -0,0 +1,50 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# rpc.yppasswdd interposes on a number of routines from libnisdb and libnsl, so +# define these as interposers. Note, libnisdb is itself an interposer, so +# these rpc.yppasswdd definitions are required to override libnisdb. +{ + global: + delete_map = INTERPOSE; + hash = INTERPOSE; + init_lock_map = INTERPOSE; + lock_core = INTERPOSE; + lock_map = INTERPOSE; + mflag = INTERPOSE; + nogecos = INTERPOSE; + nopw = INTERPOSE; + noshell = INTERPOSE; + rename_map = INTERPOSE; + single = INTERPOSE; + unlock_core = INTERPOSE; + unlock_map = INTERPOSE; + validloginshell = INTERPOSE; + validstr = INTERPOSE; + xdr_yppasswd = INTERPOSE; +}; diff --git a/usr/src/cmd/zonecfg/Makefile b/usr/src/cmd/zonecfg/Makefile index f4a4d2d287..26c52e097d 100644 --- a/usr/src/cmd/zonecfg/Makefile +++ b/usr/src/cmd/zonecfg/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -34,13 +34,14 @@ LFLAGS = -t YFLAGS = -d -b zonecfg_grammar LDLIBS += -lzonecfg -ll -lnsl -ltecla -lzfs -lbrand CPPFLAGS += -I. +LDFLAGS += $(MAPFILE.NGB:%=-M%) CLEANFILES += zonecfg_lex.c zonecfg_grammar.tab.c zonecfg_grammar.tab.h .KEEP_STATE: all: $(PROG) -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(MAPFILE.NGB) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/mapfiles/Makefile b/usr/src/common/mapfiles/Makefile index df298f815e..83550322c0 100644 --- a/usr/src/cmd/sgs/mapfiles/Makefile +++ b/usr/src/common/mapfiles/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ # # CDDL HEADER END # + # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1998,2001 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# cmd/sgs/mapfiles/Makefile +# ident "%Z%%M% %I% %E% SMI" # -include ../../../Makefile.master +include $(SRC)/Makefile.master -SUBDIRS= common $(MACH) +SUBDIRS= gen common $(MACH) $(BUILD64)SUBDIRS += $(MACH64) all:= TARGET= all @@ -42,9 +40,11 @@ package:= TARGET= package .KEEP_STATE: -all clean clobber lint package: +clean clobber lint package: + +all: gen -install: $(SUBDIRS) +install: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/sgs/mapfiles/amd64/Makefile b/usr/src/common/mapfiles/amd64/Makefile index 6df70df75f..e773979df4 100644 --- a/usr/src/cmd/sgs/mapfiles/amd64/Makefile +++ b/usr/src/common/mapfiles/amd64/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ # # CDDL HEADER END # + # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" diff --git a/usr/src/cmd/sgs/mapfiles/amd64/map.above4G b/usr/src/common/mapfiles/amd64/map.above4G index c5dd49f0ea..c5dd49f0ea 100644 --- a/usr/src/cmd/sgs/mapfiles/amd64/map.above4G +++ b/usr/src/common/mapfiles/amd64/map.above4G diff --git a/usr/src/cmd/sgs/mapfiles/amd64/map.below4G b/usr/src/common/mapfiles/amd64/map.below4G index 8ed835620e..8ed835620e 100644 --- a/usr/src/cmd/sgs/mapfiles/amd64/map.below4G +++ b/usr/src/common/mapfiles/amd64/map.below4G diff --git a/usr/src/cmd/sgs/mapfiles/common/Makefile b/usr/src/common/mapfiles/common/Makefile index 5a6502cffd..663ebf2fdb 100644 --- a/usr/src/cmd/sgs/mapfiles/common/Makefile +++ b/usr/src/common/mapfiles/common/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,26 @@ # # CDDL HEADER END # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # -include $(SRC)/Makefile.master +include $(SRC)/Makefile.master ROOTDIR= $(ROOT)/usr/lib/ld DIRS= $(ROOTDIR) -FILES= $(ROOTDIR)/map.noexstk $(ROOTDIR)/map.bssalign \ - $(ROOTDIR)/map.noexdata $(ROOTDIR)/map.execdata - +FILES= \ + $(ROOTDIR)/map.execdata \ + $(ROOTDIR)/map.filter \ + $(ROOTDIR)/map.bssalign \ + $(ROOTDIR)/map.noexstk -install: $(DIRS) $(FILES) +install: $(DIRS) $(FILES) $(FILES):= FILEMODE=444 $(FILES):= GROUP=bin @@ -45,5 +48,5 @@ $(DIRS):= GROUP=bin $(DIRS): $(INS.dir) -$(ROOTDIR)/map.%: $(SRC)/cmd/mapfile_% - $(INS.rename) +$(ROOTDIR)/%: % + $(INS.file) diff --git a/usr/src/cmd/mapfile_bssalign b/usr/src/common/mapfiles/common/map.bssalign index ee28a2b309..ee28a2b309 100644 --- a/usr/src/cmd/mapfile_bssalign +++ b/usr/src/common/mapfiles/common/map.bssalign diff --git a/usr/src/cmd/mapfile_execdata b/usr/src/common/mapfiles/common/map.execdata index 4de8bbe3bb..4de8bbe3bb 100644 --- a/usr/src/cmd/mapfile_execdata +++ b/usr/src/common/mapfiles/common/map.execdata diff --git a/usr/src/lib/common/mapfile-filter b/usr/src/common/mapfiles/common/map.filter index 1059b1b61d..1059b1b61d 100644 --- a/usr/src/lib/common/mapfile-filter +++ b/usr/src/common/mapfiles/common/map.filter diff --git a/usr/src/cmd/mapfile_noexstk b/usr/src/common/mapfiles/common/map.noexstk index d71942d2b5..d71942d2b5 100644 --- a/usr/src/cmd/mapfile_noexstk +++ b/usr/src/common/mapfiles/common/map.noexstk diff --git a/usr/src/common/mapfiles/gen/Makefile b/usr/src/common/mapfiles/gen/Makefile new file mode 100644 index 0000000000..f1496fcea9 --- /dev/null +++ b/usr/src/common/mapfiles/gen/Makefile @@ -0,0 +1,112 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include $(SRC)/Makefile.master + +FILES= \ + $(MACH)_cc_map.noexeglobs \ + $(MACH)_gcc_map.noexeglobs + +$(BUILD64)FILES += \ + $(MACH64)_cc_map.noexeglobs \ + $(MACH64)_gcc_map.noexeglobs + +SYMS1= syms.1 +SYMS2= syms.2 +MAIN1= main.1 +MAIN2= main.2 + +TEMPLATE1= map.noexeglobs.1.template +TEMPLATE2= map.noexeglobs.2.template + +all install: $(FILES) + +lint: + +clean: + $(RM) $(SYMS1) $(SYMS2) $(MAIN1) $(MAIN2) + +clobber: clean + $(RM) $(FILES) + +# A number of dynamic executables have their own definitions of interfaces that +# exist in system libraries. To prevent name-space pollution it is desirable +# to demote the interfaces within these executable to locals. However, various +# symbols defined by the compiler drivers crt/values files need to remain +# global in any dynamic object that includes these files. These symbols +# interpose on symbols in libc, or provide call backs for other system +# libraries. The various compiler drivers (cc and gcc), and the crt/values +# files that these drivers are configured to include, differ between the +# various compilations environments (platform, 32/64-bit). Therefore, the +# only means of creating a mapfile to demote symbols is to dynamically generate +# the mapfile for a specific compilation environment. +# +# Here, template mapfiles are used to generate a number of compilation specific +# mapfiles. These mapfiles are referenced by components of the build through +# the MAPFILE.NGB macro defined in Makefile.master. These dynamically created +# mapfiles are not delivered into the $ROOT area, and therefore are not +# delivered as packaged components of the OSNet. + +$(MACH)_cc_map.noexeglobs := LINK = $(LINK.c) +$(MACH64)_cc_map.noexeglobs := LINK = $(LINK64.c) + +$(MACH)_gcc_map.noexeglobs := CC = $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc +$(MACH)_gcc_map.noexeglobs := LINK = $(LINK.c) +$(MACH64)_gcc_map.noexeglobs := CC = $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc +$(MACH64)_gcc_map.noexeglobs := LINK = $(LINK64.c) + +# This generic target creates two dynamic executables from an empty "main" +# program. These objects are not executed, but are analyzed to determine the +# global symbols each provides. +# +# The first executable demotes a family of known interfaces to local and allows +# all other symbol definitions to remain global. This executables provides the +# base for discovering all symbol definitions provided by the various +# compilation environments. The second executable demotes all symbols to +# locals. Within both executables, some symbols remain globals (_end, _etext, +# etc.) as the link-editor has special knowledge of these symbols and their +# expected visibility requirements. By inspecting the deferences between the +# global symbols within the two executables, a mapfile can be generated to +# ensure the symbols defined by the compilation environments files remain +# global. + +%map.noexeglobs:main.c $(TEMPLATE1) $(TEMPLATE2) + $(LINK) -o $(MAIN1) -M$(TEMPLATE1) main.c + $(ELFDUMP) -s -N.dynsym $(MAIN1) | $(EGREP) "WEAK|GLOB" | \ + $(GREP) -v UNDEF | $(NAWK) '{print $$9 }' | $(SORT) > $(SYMS1) + $(LINK) -o $(MAIN2) -M$(TEMPLATE2) main.c + $(ELFDUMP) -s -N.dynsym $(MAIN2) | $(EGREP) "WEAK|GLOB" | \ + $(GREP) -v UNDEF | $(NAWK) '{print $$9 }' | $(SORT) > $(SYMS2) + $(ECHO) "# GENERATED FILE - DO NOT EDIT" > $@ + $(GREP) MAP-HEAD $(TEMPLATE2) | \ + $(SED) -e "s/ *# MAP-HEAD//" >> $@ + $(DIFF) $(SYMS1) $(SYMS2) | $(GREP) "^<" | \ + $(SED) -e "s/^< \(.*\)/ \1;/" >> $@ + $(GREP) MAP-TAIL $(TEMPLATE2) | \ + $(SED) -e "s/ *# MAP-TAIL//" >> $@ + $(RM) $(SYMS1) $(SYMS2) $(MAIN1) $(MAIN2) diff --git a/usr/src/common/mapfiles/gen/main.c b/usr/src/common/mapfiles/gen/main.c new file mode 100644 index 0000000000..021da3ba98 --- /dev/null +++ b/usr/src/common/mapfiles/gen/main.c @@ -0,0 +1,31 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +int +main() +{ + return (0); +} diff --git a/usr/src/common/mapfiles/gen/map.noexeglobs.1.template b/usr/src/common/mapfiles/gen/map.noexeglobs.1.template new file mode 100644 index 0000000000..30df715d83 --- /dev/null +++ b/usr/src/common/mapfiles/gen/map.noexeglobs.1.template @@ -0,0 +1,37 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# Template mapfile for generating a final mapfile to demote all user global +# symbols to local within a dynamic executable. +# +{ + local: + _fini; + _init; + _start; + main; +}; diff --git a/usr/src/common/mapfiles/gen/map.noexeglobs.2.template b/usr/src/common/mapfiles/gen/map.noexeglobs.2.template new file mode 100644 index 0000000000..c7a1a79752 --- /dev/null +++ b/usr/src/common/mapfiles/gen/map.noexeglobs.2.template @@ -0,0 +1,37 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# Template mapfile for generating a final mapfile to demote all user global +# symbols to local within a dynamic executable. This mapfile also provides +# the "MAP-" commented entries to select lines for the final mapfile. +# +{ # MAP-HEAD + global: # MAP-HEAD + _lib_version; # MAP-HEAD + local: # MAP-TAIL + *; # MAP-TAIL +}; # MAP-TAIL diff --git a/usr/src/cmd/sgs/mapfiles/sparc/Makefile b/usr/src/common/mapfiles/i386/Makefile index 27ae49f2f1..5443f895da 100644 --- a/usr/src/cmd/sgs/mapfiles/sparc/Makefile +++ b/usr/src/common/mapfiles/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,23 @@ # # CDDL HEADER END # + # -# Copyright 1998,2001-2003 Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # -include $(SRC)/Makefile.master -include $(SRC)/cmd/sgs/Makefile.var +include $(SRC)/Makefile.master ROOTDIR= $(ROOT)/usr/lib/ld DIRS= $(ROOTDIR) -FILES= $(VAR_MAPFILES_FILES) +FILES= \ + $(ROOTDIR)/map.default \ + $(ROOTDIR)/map.pagealign \ + $(ROOTDIR)/map.noexdata install: $(DIRS) $(FILES) diff --git a/usr/src/cmd/sgs/mapfiles/i386/map.default b/usr/src/common/mapfiles/i386/map.default index 0b3900a1ae..0b3900a1ae 100644 --- a/usr/src/cmd/sgs/mapfiles/i386/map.default +++ b/usr/src/common/mapfiles/i386/map.default diff --git a/usr/src/cmd/mapfile_noexdata b/usr/src/common/mapfiles/i386/map.noexdata index 5df43c2663..5df43c2663 100644 --- a/usr/src/cmd/mapfile_noexdata +++ b/usr/src/common/mapfiles/i386/map.noexdata diff --git a/usr/src/cmd/sgs/mapfiles/i386/map.pagealign b/usr/src/common/mapfiles/i386/map.pagealign index 892779a73c..892779a73c 100644 --- a/usr/src/cmd/sgs/mapfiles/i386/map.pagealign +++ b/usr/src/common/mapfiles/i386/map.pagealign diff --git a/usr/src/cmd/sgs/mapfiles/i386/Makefile b/usr/src/common/mapfiles/sparc/Makefile index 3e9a5142e4..bd7bc823c4 100644 --- a/usr/src/cmd/sgs/mapfiles/i386/Makefile +++ b/usr/src/common/mapfiles/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,22 @@ # # CDDL HEADER END # + # -# Copyright 1998, 2001-2003 Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # -include $(SRC)/Makefile.master -include $(SRC)/cmd/sgs/Makefile.var +include $(SRC)/Makefile.master ROOTDIR= $(ROOT)/usr/lib/ld DIRS= $(ROOTDIR) -FILES= $(VAR_MAPFILES_FILES) +FILES= \ + $(ROOTDIR)/map.default \ + $(ROOTDIR)/map.pagealign install: $(DIRS) $(FILES) diff --git a/usr/src/cmd/sgs/mapfiles/sparc/map.default b/usr/src/common/mapfiles/sparc/map.default index c38e747e12..c38e747e12 100644 --- a/usr/src/cmd/sgs/mapfiles/sparc/map.default +++ b/usr/src/common/mapfiles/sparc/map.default diff --git a/usr/src/cmd/sgs/mapfiles/sparc/map.pagealign b/usr/src/common/mapfiles/sparc/map.pagealign index 1ecb9e0d97..1ecb9e0d97 100644 --- a/usr/src/cmd/sgs/mapfiles/sparc/map.pagealign +++ b/usr/src/common/mapfiles/sparc/map.pagealign diff --git a/usr/src/cmd/sgs/mapfiles/sparcv9/Makefile b/usr/src/common/mapfiles/sparcv9/Makefile index 990836d33c..e8769fc088 100644 --- a/usr/src/cmd/sgs/mapfiles/sparcv9/Makefile +++ b/usr/src/common/mapfiles/sparcv9/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ # # CDDL HEADER END # + # -# Copyright (c) 1998 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # -include $(SRC)/Makefile.master +include $(SRC)/Makefile.master ROOTDIR= $(ROOT)/usr/lib/ld ROOTDIR64= $(ROOT)/usr/lib/ld/$(MACH64) @@ -34,7 +34,6 @@ ROOTDIR64= $(ROOT)/usr/lib/ld/$(MACH64) DIRS= $(ROOTDIR) $(ROOTDIR64) FILES= $(ROOTDIR64)/map.above4G $(ROOTDIR64)/map.below4G - install: $(DIRS) $(FILES) map.link $(FILES):= FILEMODE=444 @@ -43,7 +42,6 @@ $(FILES):= GROUP=bin $(DIRS):= DIRMODE=755 $(DIRS):= GROUP=bin - map.link: $(RM) $(ROOTDIR64)/map.default $(SYMLINK) ./map.above4G $(ROOTDIR64)/map.default diff --git a/usr/src/cmd/sgs/mapfiles/sparcv9/map.above4G b/usr/src/common/mapfiles/sparcv9/map.above4G index b3353fd18b..b3353fd18b 100644 --- a/usr/src/cmd/sgs/mapfiles/sparcv9/map.above4G +++ b/usr/src/common/mapfiles/sparcv9/map.above4G diff --git a/usr/src/cmd/sgs/mapfiles/sparcv9/map.below4G b/usr/src/common/mapfiles/sparcv9/map.below4G index 08b432f76d..08b432f76d 100644 --- a/usr/src/cmd/sgs/mapfiles/sparcv9/map.below4G +++ b/usr/src/common/mapfiles/sparcv9/map.below4G diff --git a/usr/src/grub/grub-0.95/grub/Makefile.solaris b/usr/src/grub/grub-0.95/grub/Makefile.solaris index b81cf7b374..9d2b2e40ba 100644 --- a/usr/src/grub/grub-0.95/grub/Makefile.solaris +++ b/usr/src/grub/grub-0.95/grub/Makefile.solaris @@ -1,5 +1,5 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -14,9 +14,16 @@ $(GRUB) := LIBS = ../stage2/libgrub.a ../lib/libcommon.a -lcurses $(GRUB) := LDFLAGS += $(LDLIBS.cmd) $(GRUB) := CCLD = $(CC) +# +# The grub shell interposes on the getopt() family. Should direct bindings be +# enabled, these interfaces should be explicitly defined as interposes. Use a +# mapfile to associate the necessary interposer definitions. +# +MAPFILES = $(MAPFILE.INT) + INCLUDES = -I. -I.. -I../stage1 -I../stage2 -I../lib CFLAGS += -O2 -LINKFLAGS += -O2 +LINKFLAGS += -O2 $(MAPFILES:%=-Wl,-M%) CPPFLAGS += -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 \ -DFSYS_REISERFS=1 -DFSYS_ZFS=1 -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 \ @@ -41,7 +48,7 @@ INSTALL_TARGETS += $(SRC_FILES:%=$(SRC_DIR)/%) all: $(PROGRAMS) -$(GRUB): $(GRUB_OBJS) +$(GRUB): $(GRUB_OBJS) $(MAPFILES) $(LINK) -o $@ $(GRUB_OBJS) $(LIBS) $(POST_PROCESS) diff --git a/usr/src/grub/grub-0.95/grub/mapfile-intf b/usr/src/grub/grub-0.95/grub/mapfile-intf new file mode 100644 index 0000000000..d265fe30d7 --- /dev/null +++ b/usr/src/grub/grub-0.95/grub/mapfile-intf @@ -0,0 +1,43 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# The grub shell interposes on the getopt() family - this reimplementation is +# required for the real grub loader which can't depend on libc. The grub shell +# is built from the same source as the grub loader. +{ + global: + getopt = INTERPOSE; + getopt_long = INTERPOSE; + getopt_long_only = INTERPOSE; + optarg = INTERPOSE; + opterr = INTERPOSE; + optind = INTERPOSE; + optopt = INTERPOSE; + local: + *; +}; diff --git a/usr/src/lib/Makefile.lib b/usr/src/lib/Makefile.lib index f68c2e21e2..2c2954c356 100644 --- a/usr/src/lib/Makefile.lib +++ b/usr/src/lib/Makefile.lib @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,13 +37,6 @@ LORDER= lorder TSORT= tsort AWK= awk -MAPFILE-FLTR= $(SRC)/lib/common/mapfile-filter - -NX_MAP_i386= $(SRC)/cmd/mapfile_noexdata -NX_MAP_sparc= - -NX_MAP= $(NX_MAP_$(MACH)) - # # By default, we define the source directory for libraries to be # one level up from the ISA-specific directory, where the code is @@ -169,7 +162,7 @@ SONAME= $(DYNLIB) HSONAME= -h$(SONAME) DYNFLAGS= $(HSONAME) $(ZTEXT) $(ZDEFS) $(ZCOMBRELOC) \ - $(MAPFILES:%=-M%) $(PGA_MAPFILE:%=-M%) $(NX_MAP:%=-M%) + $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) LDLIBS= $(LDLIBS.lib) @@ -243,7 +236,7 @@ HSONAMECCC= -h $(SONAMECCC) # Keep in sync with the standard DYNFLAGS # $(DYNLIBCCC):= DYNFLAGS = $(HSONAMECCC) $(ZTEXT) $(ZDEFS) $(ZCOMBRELOC) \ - $(MAPFILES:%=-M%) $(PGA_MAPFILE:%=-M%) $(NX_MAP:%=-M%) \ + $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) \ $(NORUNPATH) diff --git a/usr/src/lib/brand/lx/lx_thunk/Makefile.com b/usr/src/lib/brand/lx/lx_thunk/Makefile.com index 2a537b0535..75629a6d61 100644 --- a/usr/src/lib/brand/lx/lx_thunk/Makefile.com +++ b/usr/src/lib/brand/lx/lx_thunk/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -55,7 +55,9 @@ LDLIBS += -lc CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_REENTRANT -I../ -I ../../lx_brand \ -I$(UTSBASE)/common/brand/lx -DYNFLAGS += $(MAPOPTS) + +# lx_think.so.1 interposes on a number of libc.so.1 routines. +DYNFLAGS += $(MAPOPTS) $(ZINTERPOSE) LIBS = $(DYNLIB) diff --git a/usr/src/lib/common/amd64/crt1.s b/usr/src/lib/common/amd64/crt1.s index c88cb25c84..2d3cd220ce 100644 --- a/usr/src/lib/common/amd64/crt1.s +++ b/usr/src/lib/common/amd64/crt1.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -54,6 +54,13 @@ _environ: .8byte 0x0 + .globl __environ_lock + .type __environ_lock,@object + .size __environ_lock,24 + .align 8 +__environ_lock: + .zero 24 + .globl ___Argv .type ___Argv,@object .size ___Argv,8 diff --git a/usr/src/lib/common/i386/crt1.s b/usr/src/lib/common/i386/crt1.s index da75be7fcc..dbac57eee9 100644 --- a/usr/src/lib/common/i386/crt1.s +++ b/usr/src/lib/common/i386/crt1.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -54,6 +54,13 @@ _environ: .4byte 0x0 + .globl __environ_lock + .type __environ_lock,@object + .size __environ_lock,24 + .align 4 +__environ_lock: + .zero 24 + .globl ___Argv .type ___Argv,@object .size ___Argv,4 diff --git a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com index 4a7d265965..063526c050 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com +++ b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -153,7 +153,7 @@ K5_OS= an_to_ln.o def_realm.o ccdefname.o free_krbhs.o free_hstrl.o \ read_msg.o read_pwd.o realm_dom.o sendto_kdc.o sn2princ.o \ unlck_file.o ustime.o write_msg.o safechown.o \ prompter.o realm_iter.o foreachaddr.o \ - dnsglue.o dnssrv.o thread_safe.o changepw.o + dnsglue.o dnssrv.o thread_safe.o changepw.o getuid.o K5_OS_UTS=init_os_ctx.o timeofday.o toffset.o c_ustime.o diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/ccache/cc_file.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/ccache/cc_file.c index ad3d0e6511..35c7c1838a 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/krb5/ccache/cc_file.c +++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/ccache/cc_file.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1286,7 +1286,11 @@ krb5_fcc_open_nounlink(char *filename, int open_flag, int *ret_fd, int *new) return (-1); } - uid = getuid(); + /* + * Solaris Kerberos + * Use krb5_getuid to select the mechanism to obtain the uid. + */ + uid = krb5_getuid(); euid = geteuid(); /* * Some apps (gssd, via a priv version of getuid()) diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/getuid.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/getuid.c new file mode 100644 index 0000000000..783a2945ef --- /dev/null +++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/getuid.c @@ -0,0 +1,70 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/types.h> +#include <unistd.h> +#include <dlfcn.h> +#include "k5-int.h" + +#define KRB5_UID "app_krb5_user_uid" + +/* + * mech_krb5 makes various calls to getuid(). When employed by gssd(1M) and + * ktkt_warnd(1M), app_krb5_user_uid() is used to select a given user's + * credential cache, rather than the id of the process. + */ +uid_t +krb5_getuid() +{ + static uid_t (*gptr)() = NULL; + void *handle; + + if (gptr == NULL) { + /* + * Specifically look for app_krb5_user_uid() in the application, + * and don't fall into an exhaustive search through all of the + * process dependencies. This interface is suplied from + * gssd(1M) and ktkt_warnd(1M). + */ + if (((handle = dlopen(0, (RTLD_LAZY | RTLD_FIRST))) == NULL) || + ((gptr = (uid_t (*)())dlsym(handle, KRB5_UID)) == NULL)) { + /* + * Fall back to the default getuid(), which is probably + * libc. + */ + gptr = &getuid; + } + } + + /* + * Return the appropriate uid. Note, if a default getuid() couldn't + * be found, the getuid assignment would have failed to relocate, and + * hence this module would fail to load. + */ + return ((*gptr)()); +} diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ccdefname.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ccdefname.c index 39022bc7c9..b56c5a93b1 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ccdefname.c +++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ccdefname.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -53,7 +53,12 @@ static krb5_error_code get_from_os( { krb5_error_code retval; - retval = snprintf(name_buf, name_size, "FILE:/tmp/krb5cc_%d", getuid()); + /* + * Solaris Kerberos + * Use krb5_getuid() to select the mechanism to obtain the uid. + */ + retval = snprintf(name_buf, name_size, "FILE:/tmp/krb5cc_%d", + krb5_getuid()); KRB5_LOG(KRB5_INFO, "get_from_os() FILE=%s\n", name_buf); if (retval < 0) return retval; diff --git a/usr/src/lib/gss_mechs/mech_krb5/mech/init_sec_context.c b/usr/src/lib/gss_mechs/mech_krb5/mech/init_sec_context.c index eb41f88a86..eaaaf36ff2 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/mech/init_sec_context.c +++ b/usr/src/lib/gss_mechs/mech_krb5/mech/init_sec_context.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -908,7 +908,11 @@ get_default_cred(OM_uint32 *minor_status, void *ct, gss_cred_id_t *cred_handle) krb5_gss_cred_id_t cred; OM_uint32 major; OM_uint32 mntmp; - uid_t uid = getuid(); + /* + * Solaris Kerberos + * Use krb5_getuid() to select the mechanism to obtain the uid. + */ + uid_t uid = krb5_getuid(); krb5_context context = (krb5_context)ct; KRB5_LOG0(KRB5_INFO, "get_default_cred() start\n"); diff --git a/usr/src/lib/libaio/Makefile.com b/usr/src/lib/libaio/Makefile.com index 3dc97f8300..4f96d7e871 100644 --- a/usr/src/lib/libaio/Makefile.com +++ b/usr/src/lib/libaio/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -31,7 +31,7 @@ VERS = .1 include ../../Makefile.lib include ../../Makefile.rootfs -MAPFILES = mapfile-vers $(MAPFILE-FLTR) +MAPFILES = mapfile-vers $(MAPFILE.FLT) DYNFLAGS += -F libc.so.1 diff --git a/usr/src/lib/libbc/sparc/Makefile b/usr/src/lib/libbc/sparc/Makefile index c66e6cc6cc..e005d01ed6 100644 --- a/usr/src/lib/libbc/sparc/Makefile +++ b/usr/src/lib/libbc/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -338,6 +338,7 @@ $(DYNLIBS5) := SONAME = $(DYNLIBS5) pics/%.o:= ASFLAGS += -K pic -DPIC pics/%.o:= CPPFLAGS += -K pic -DPIC s5pics/%.o:= ASFLAGS += -K pic -DPIC +DYNFLAGS += $(ZINTERPOSE) BUILD.s= $(AS) $(ASFLAGS) $< -o $@ diff --git a/usr/src/lib/libc/amd64/mapfile-vers b/usr/src/lib/libc/amd64/mapfile-vers index 4c3570420c..7abfaef170 100644 --- a/usr/src/lib/libc/amd64/mapfile-vers +++ b/usr/src/lib/libc/amd64/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -144,7 +144,7 @@ SUNW_0.7 { endpwent; environ = NODIRECT; _environ = NODIRECT; - errno; + errno = NODIRECT; ___errno; execl; _execl; @@ -745,15 +745,11 @@ SUNWprivate_1.1 { gtty; _gtty; _hasmntopt; - htonl; - htons; _ld_libc = FUNCTION FILTER /usr/lib/amd64/ld.so.1; _memcmp; _memcpy; _memmove; _memset; - ntohl; - ntohs; sysi86; _sysi86; _X_cplx_div; diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com index d59790ac8c..61d1454346 100644 --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -983,7 +983,7 @@ DTRACE_DATA = -zdtrace=dtrace_data DYNFLAGS += $(DTRACE_DATA) # DTrace needs an executable data segment. -NX_MAP= +MAPFILE.NED= BUILD.s= $(AS) $(ASFLAGS) $< -o $@ diff --git a/usr/src/lib/libc/i386/mapfile-vers b/usr/src/lib/libc/i386/mapfile-vers index 6923652e79..e9a3049d52 100644 --- a/usr/src/lib/libc/i386/mapfile-vers +++ b/usr/src/lib/libc/i386/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -157,7 +157,7 @@ SUNW_0.7 { _encrypt; endgrent; endpwent; - errno; + errno = NODIRECT; ___errno; fgetgrent; fgetgrent_r; @@ -844,8 +844,6 @@ SUNWprivate_1.1 { gtty; _gtty; _hasmntopt; - htonl; - htons; _imaxabs_c89; _imaxdiv_c89; _ld_libc = FUNCTION FILTER /usr/lib/ld.so.1; @@ -854,8 +852,6 @@ SUNWprivate_1.1 { _memmove; _memset; __moddi3; - ntohl; - ntohs; _printf_c89; _scanf_c89; _snprintf_c89; diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers index 1fd247c28e..2b4a48f3f9 100644 --- a/usr/src/lib/libc/port/mapfile-vers +++ b/usr/src/lib/libc/port/mapfile-vers @@ -63,6 +63,8 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11) fdatasync; forkallx; forkx; + htonl; + htons; lio_listio; mkdtemp; _mkdtemp; @@ -81,6 +83,8 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11) mq_timedsend; mq_unlink; nanosleep; + ntohl; + ntohs; posix_fallocate; pthread_key_create_once_np; _renameat; diff --git a/usr/src/lib/libc/sparc/Makefile b/usr/src/lib/libc/sparc/Makefile index 97cb934f46..cabf23b2a8 100644 --- a/usr/src/lib/libc/sparc/Makefile +++ b/usr/src/lib/libc/sparc/Makefile @@ -121,6 +121,7 @@ GENOBJS= \ _xregs_clrptr.o \ abs.o \ alloca.o \ + byteorder.o \ cuexit.o \ ecvt.o \ errlst.o \ @@ -1000,7 +1001,7 @@ DTRACE_DATA = -zdtrace=dtrace_data DYNFLAGS += $(DTRACE_DATA) # DTrace needs an executable data segment. -NX_MAP= +MAPFILE.NED= BUILD.s= $(AS) $(ASFLAGS) $< -o $@ @@ -1049,6 +1050,7 @@ SRCS= \ $(FPOBJS:%.o=../$(MACH)/fp/%.c) \ $(LIBCBASE)/crt/_ftou.c \ $(LIBCBASE)/gen/_xregs_clrptr.c \ + $(LIBCBASE)/gen/byteorder.c \ $(LIBCBASE)/gen/ecvt.c \ $(LIBCBASE)/gen/getctxt.c \ $(LIBCBASE)/gen/lexp10.c \ diff --git a/usr/src/lib/libsocket/inet/byteorder.c b/usr/src/lib/libc/sparc/gen/byteorder.c index b28bfebdd0..b28bfebdd0 100644 --- a/usr/src/lib/libsocket/inet/byteorder.c +++ b/usr/src/lib/libc/sparc/gen/byteorder.c diff --git a/usr/src/lib/libc/sparc/mapfile-vers b/usr/src/lib/libc/sparc/mapfile-vers index 1de1823a76..d7c2f89726 100644 --- a/usr/src/lib/libc/sparc/mapfile-vers +++ b/usr/src/lib/libc/sparc/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -194,7 +194,7 @@ SISCD_2.3 { _encrypt; endgrent; endpwent; - errno; + errno = NODIRECT; ___errno; fgetgrent; fgetgrent_r; diff --git a/usr/src/lib/libc/sparcv9/Makefile b/usr/src/lib/libc/sparcv9/Makefile index e4bd499cce..595c0a40c5 100644 --- a/usr/src/lib/libc/sparcv9/Makefile +++ b/usr/src/lib/libc/sparcv9/Makefile @@ -123,6 +123,7 @@ GENOBJS= \ _xregs_clrptr.o \ abs.o \ alloca.o \ + byteorder.o \ cuexit.o \ ecvt.o \ getctxt.o \ @@ -983,6 +984,7 @@ SRCS= \ $(FPOBJS64:%.o=$(LIBCBASE)/fp/%.c) \ $(LIBCBASE)/crt/_ftou.c \ $(LIBCBASE)/gen/_xregs_clrptr.c \ + $(LIBCBASE)/gen/byteorder.c \ $(LIBCBASE)/gen/ecvt.c \ $(LIBCBASE)/gen/getctxt.c \ $(LIBCBASE)/gen/lexp10.c \ diff --git a/usr/src/lib/libc/sparcv9/gen/byteorder.c b/usr/src/lib/libc/sparcv9/gen/byteorder.c new file mode 100644 index 0000000000..3c26622a2d --- /dev/null +++ b/usr/src/lib/libc/sparcv9/gen/byteorder.c @@ -0,0 +1,63 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/isa_defs.h> +#include <sys/types.h> + + +#if defined(_LITTLE_ENDIAN) && !defined(__lint) + +#error Use ISA-specific byteorder.s on a little-endian machine. + +#else /* !_LITTLE_ENDIAN */ + +uint32_t +htonl(uint32_t in) +{ + return (in); +} + +uint32_t +ntohl(uint32_t in) +{ + return (in); +} + +uint16_t +htons(uint16_t in) +{ + return (in); +} + +uint16_t +ntohs(uint16_t in) +{ + return (in); +} + +#endif /* _LITTLE_ENDIAN */ diff --git a/usr/src/lib/libc/sparcv9/mapfile-vers b/usr/src/lib/libc/sparcv9/mapfile-vers index 35ba6af356..208faa1ba6 100644 --- a/usr/src/lib/libc/sparcv9/mapfile-vers +++ b/usr/src/lib/libc/sparcv9/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -136,7 +136,7 @@ SUNW_0.7 { endpwent; environ = NODIRECT; _environ = NODIRECT; - errno; + errno = NODIRECT; ___errno; execl; _execl; diff --git a/usr/src/lib/libc_psr/sun4u-opl/sparc/Makefile b/usr/src/lib/libc_psr/sun4u-opl/sparc/Makefile index 39a6c4a39f..90cc968db8 100644 --- a/usr/src/lib/libc_psr/sun4u-opl/sparc/Makefile +++ b/usr/src/lib/libc_psr/sun4u-opl/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,7 +37,7 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE-FLTR) +MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE.FLT) ASFLAGS += -xarch=v8plusb diff --git a/usr/src/lib/libc_psr/sun4u-opl/sparcv9/Makefile b/usr/src/lib/libc_psr/sun4u-opl/sparcv9/Makefile index 9a5173690f..769f18d0c8 100644 --- a/usr/src/lib/libc_psr/sun4u-opl/sparcv9/Makefile +++ b/usr/src/lib/libc_psr/sun4u-opl/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,7 +37,7 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE-FLTR) +MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE.FLT) ASDEFS += -D__sparcv9 ASFLAGS += -xarch=v9b diff --git a/usr/src/lib/libc_psr/sun4u/Makefile.com b/usr/src/lib/libc_psr/sun4u/Makefile.com index b9c0b7dc6d..a4fa785d0d 100644 --- a/usr/src/lib/libc_psr/sun4u/Makefile.com +++ b/usr/src/lib/libc_psr/sun4u/Makefile.com @@ -18,6 +18,7 @@ # # CDDL HEADER END # + # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. @@ -49,6 +50,8 @@ CPPFLAGS = -D_REENTRANT -D$(MACH) $(IFLAGS) $(CPPFLAGS.master) ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) ASFLAGS = -P $(ASDEFS) +MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE.FLT) + # # Used when building links in /platform/$(PLATFORM)/lib # diff --git a/usr/src/lib/libc_psr/sun4u/sparc/Makefile b/usr/src/lib/libc_psr/sun4u/sparc/Makefile index 6ad52d1151..184190b771 100644 --- a/usr/src/lib/libc_psr/sun4u/sparc/Makefile +++ b/usr/src/lib/libc_psr/sun4u/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,8 +36,6 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE-FLTR) - ASFLAGS += -xarch=v8plusa -warn # Redefine shared object build rule to use $(LD) directly (this avoids .init diff --git a/usr/src/lib/libc_psr/sun4u/sparcv9/Makefile b/usr/src/lib/libc_psr/sun4u/sparcv9/Makefile index 1322d7d13f..deafd15f65 100644 --- a/usr/src/lib/libc_psr/sun4u/sparcv9/Makefile +++ b/usr/src/lib/libc_psr/sun4u/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,8 +36,6 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE-FLTR) - ASDEFS += -D__sparcv9 ASFLAGS += -xarch=v9a diff --git a/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com b/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com index 85e4ba36a4..b04ba6255d 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com +++ b/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,11 +18,12 @@ # # CDDL HEADER END # + # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragam ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # # @@ -52,6 +52,8 @@ CPPFLAGS = -DBSTORE_SIZE=256 \ ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) ASFLAGS = -P $(ASDEFS) +MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE.FLT) + # # build rules # diff --git a/usr/src/lib/libc_psr/sun4u_hwcap1/sparc/Makefile b/usr/src/lib/libc_psr/sun4u_hwcap1/sparc/Makefile index 960154a17c..9c56c16c57 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap1/sparc/Makefile +++ b/usr/src/lib/libc_psr/sun4u_hwcap1/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,8 +38,6 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE-FLTR) - ASFLAGS += -xarch=v8plusb # Redefine shared object build rule to use $(LD) directly (this avoids .init diff --git a/usr/src/lib/libc_psr/sun4u_hwcap1/sparcv9/Makefile b/usr/src/lib/libc_psr/sun4u_hwcap1/sparcv9/Makefile index fbd5cf74d5..15e2aab263 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap1/sparcv9/Makefile +++ b/usr/src/lib/libc_psr/sun4u_hwcap1/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,8 +38,6 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers $(MAPFILE-FLTR) - ASDEFS += -D__sparcv9 ASFLAGS += -xarch=v9b diff --git a/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com b/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com index 44e380880f..fabbd777bd 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com +++ b/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,11 +18,12 @@ # # CDDL HEADER END # + # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragam ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # # @@ -52,6 +52,8 @@ CPPFLAGS = -DBSTORE_SIZE=65536 -DPANTHER_ONLY \ ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) ASFLAGS = -P $(ASDEFS) +MAPFILES = ../../sun4u/mapfile-vers ../mapfile $(MAPFILE.FLT) + # # build rules # diff --git a/usr/src/lib/libc_psr/sun4u_hwcap2/sparc/Makefile b/usr/src/lib/libc_psr/sun4u_hwcap2/sparc/Makefile index c9f9b8daf6..1a260ada61 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap2/sparc/Makefile +++ b/usr/src/lib/libc_psr/sun4u_hwcap2/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,8 +38,6 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers ../mapfile $(MAPFILE-FLTR) - ASFLAGS += -xarch=v8plusb # Redefine shared object build rule to use $(LD) directly (this avoids .init diff --git a/usr/src/lib/libc_psr/sun4u_hwcap2/sparcv9/Makefile b/usr/src/lib/libc_psr/sun4u_hwcap2/sparcv9/Makefile index 7ee110438f..7d6173ca52 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap2/sparcv9/Makefile +++ b/usr/src/lib/libc_psr/sun4u_hwcap2/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,8 +38,6 @@ OBJECTS = memcpy.o memset.o memcmp.o include ../Makefile.com -MAPFILES = ../../sun4u/mapfile-vers ../mapfile $(MAPFILE-FLTR) - ASDEFS += -D__sparcv9 ASFLAGS += -xarch=v9b diff --git a/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com b/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com index 02118967cf..2085c80f0c 100644 --- a/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com +++ b/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com @@ -44,6 +44,8 @@ CPPFLAGS = -D_REENTRANT -D$(MACH) -DNIAGARA_IMPL $(IFLAGS) $(CPPFLAGS.master) ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) ASFLAGS = -P $(ASDEFS) +MAPFILES = ../../sun4v/mapfile-vers ../mapfile $(MAPFILE.FLT) + # # build rules # diff --git a/usr/src/lib/libc_psr/sun4v_hwcap1/sparc/Makefile b/usr/src/lib/libc_psr/sun4v_hwcap1/sparc/Makefile index 159468395b..7cb52418d0 100644 --- a/usr/src/lib/libc_psr/sun4v_hwcap1/sparc/Makefile +++ b/usr/src/lib/libc_psr/sun4v_hwcap1/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,8 +37,6 @@ OBJECTS = memcpy.o memset.o include ../Makefile.com -MAPFILES = ../../sun4v/mapfile-vers ../mapfile $(MAPFILE-FLTR) - ASFLAGS += -xarch=v8plus # Redefine shared object build rule to use $(LD) directly (this avoids .init diff --git a/usr/src/lib/libc_psr/sun4v_hwcap1/sparcv9/Makefile b/usr/src/lib/libc_psr/sun4v_hwcap1/sparcv9/Makefile index fc8f543a34..e2626b7457 100644 --- a/usr/src/lib/libc_psr/sun4v_hwcap1/sparcv9/Makefile +++ b/usr/src/lib/libc_psr/sun4v_hwcap1/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,8 +38,6 @@ OBJECTS = memcpy.o memset.o include ../Makefile.com -MAPFILES = ../../sun4v/mapfile-vers ../mapfile $(MAPFILE-FLTR) - ASDEFS += -D__sparcv9 ASFLAGS += -xarch=v9 diff --git a/usr/src/lib/libcurses/screen/mapfile-vers b/usr/src/lib/libcurses/screen/mapfile-vers index d499d4689a..89c99bcb5e 100644 --- a/usr/src/lib/libcurses/screen/mapfile-vers +++ b/usr/src/lib/libcurses/screen/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -495,7 +495,7 @@ SUNWprivate_1.1 { pr_nheading; pr_number; prog_istermios; - progname; + progname = NODIRECT; pr_onecolumn; pr_sfooting; pr_sheading; diff --git a/usr/src/lib/libdisasm/Makefile.com b/usr/src/lib/libdisasm/Makefile.com index a742d3e525..343ff60f5b 100644 --- a/usr/src/lib/libdisasm/Makefile.com +++ b/usr/src/lib/libdisasm/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -90,7 +90,7 @@ MAPFILES = $(COMDIR)/mapfile-vers LDLIBS += -lc -LDFLAGS_standalone = -znoversion -Breduce -dy -r +LDFLAGS_standalone = $(ZNOVERSION) $(BREDUCE) -dy -r LDFLAGS = $(LDFLAGS_$(CURTYPE)) ASFLAGS_standalone = -DDIS_STANDALONE diff --git a/usr/src/lib/libdisasm/Makefile.targ b/usr/src/lib/libdisasm/Makefile.targ index 3d4f928527..2354fc811e 100644 --- a/usr/src/lib/libdisasm/Makefile.targ +++ b/usr/src/lib/libdisasm/Makefile.targ @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -57,7 +57,7 @@ $(TYPES:%=lint.%): @CURTYPE=$(@:lint.%=%) $(MAKE) lintcheck $(STANDLIBRARY): $(OBJS) $(LINKTEST_OBJ) - $(LD) -Breduce -zdefs $(LDFLAGS) -o $@.linktest $(OBJS) $(LINKTEST_OBJ) + $(LD) $(BREDUCE) $(ZDEFS) $(LDFLAGS) -o $@.linktest $(OBJS) $(LINKTEST_OBJ) rm $@.linktest $(LD) $(LDFLAGS) -o $@ $(OBJS) diff --git a/usr/src/lib/libdoor/Makefile.com b/usr/src/lib/libdoor/Makefile.com index afd16152e0..284d1b49e4 100644 --- a/usr/src/lib/libdoor/Makefile.com +++ b/usr/src/lib/libdoor/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -31,7 +31,7 @@ VERS = .1 include ../../Makefile.lib include ../../Makefile.rootfs -MAPFILES += $(MAPFILE-FLTR) +MAPFILES += $(MAPFILE.FLT) DYNFLAGS += -F libc.so.1 diff --git a/usr/src/lib/libeti/form/amd64/Makefile b/usr/src/lib/libeti/form/amd64/Makefile index 04160e850a..3470e303f8 100644 --- a/usr/src/lib/libeti/form/amd64/Makefile +++ b/usr/src/lib/libeti/form/amd64/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -30,6 +30,8 @@ include ../../../Makefile.lib.64 DYNFLAGS += $(DYNFLAGS64) +MAPFILES += $(SRCDIR)/mapfile64-vers + .KEEP_STATE: install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libeti/form/common/mapfile-vers b/usr/src/lib/libeti/form/common/mapfile-vers index 168cda804f..7c5f8a96ce 100644 --- a/usr/src/lib/libeti/form/common/mapfile-vers +++ b/usr/src/lib/libeti/form/common/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -146,13 +146,12 @@ SUNWprivate_1.1 { _ins_char; _ins_line; _ins_mode; - __i_size; + __i_size = DATA FILTER libc.so.1 S0x4; _last_field; _last_page; _left_char; _left_field; _lib_version; - __loc1; __lptr_; _makearg; _misc_request; diff --git a/usr/src/lib/libeti/form/common/mapfile32-vers b/usr/src/lib/libeti/form/common/mapfile32-vers new file mode 100644 index 0000000000..ddf4a251b0 --- /dev/null +++ b/usr/src/lib/libeti/form/common/mapfile32-vers @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +SUNWprivate_1.1 { + global: + __loc1 = DATA FILTER libc.so.1 S0x4; +}; diff --git a/usr/src/lib/libeti/form/common/mapfile64-vers b/usr/src/lib/libeti/form/common/mapfile64-vers new file mode 100644 index 0000000000..c739c5b6ff --- /dev/null +++ b/usr/src/lib/libeti/form/common/mapfile64-vers @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +SUNWprivate_1.1 { + global: + __loc1 = DATA FILTER libc.so.1 S0x8; +}; diff --git a/usr/src/lib/libeti/form/i386/Makefile b/usr/src/lib/libeti/form/i386/Makefile index 775621cd27..ed27aa7c3c 100644 --- a/usr/src/lib/libeti/form/i386/Makefile +++ b/usr/src/lib/libeti/form/i386/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -29,4 +29,6 @@ include ../Makefile.com .KEEP_STATE: +MAPFILES += $(SRCDIR)/mapfile32-vers + install: all $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) diff --git a/usr/src/lib/libeti/form/sparc/Makefile b/usr/src/lib/libeti/form/sparc/Makefile index 775621cd27..ed27aa7c3c 100644 --- a/usr/src/lib/libeti/form/sparc/Makefile +++ b/usr/src/lib/libeti/form/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -29,4 +29,6 @@ include ../Makefile.com .KEEP_STATE: +MAPFILES += $(SRCDIR)/mapfile32-vers + install: all $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) diff --git a/usr/src/lib/libeti/form/sparcv9/Makefile b/usr/src/lib/libeti/form/sparcv9/Makefile index 04160e850a..3470e303f8 100644 --- a/usr/src/lib/libeti/form/sparcv9/Makefile +++ b/usr/src/lib/libeti/form/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -30,6 +30,8 @@ include ../../../Makefile.lib.64 DYNFLAGS += $(DYNFLAGS64) +MAPFILES += $(SRCDIR)/mapfile64-vers + .KEEP_STATE: install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libfru/include/libfrup.h b/usr/src/lib/libfru/include/libfrup.h index a7634f86eb..ccfdd49ee8 100644 --- a/usr/src/lib/libfru/include/libfrup.h +++ b/usr/src/lib/libfru/include/libfrup.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2000-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -53,12 +52,11 @@ typedef void (*end_node_fp_t)(fru_nodehdl_t node, const char *path, /* * Project-private exported symbols */ -fru_encrypt_func_t encrypt_func; +extern fru_encrypt_func_t encrypt_func; -fru_errno_t fru_encryption_supported(void); +extern fru_errno_t fru_encryption_supported(void); -fru_errno_t -fru_walk_tree(fru_nodehdl_t node, const char *prior_path, +extern fru_errno_t fru_walk_tree(fru_nodehdl_t node, const char *prior_path, fru_errno_t (*process_node)(fru_nodehdl_t node, const char *path, const char *name, void *args, @@ -66,14 +64,14 @@ fru_walk_tree(fru_nodehdl_t node, const char *prior_path, void **end_args), void *args); -int fru_pathmatch(const char *path, const char *searchpath); +extern int fru_pathmatch(const char *path, const char *searchpath); -fru_errno_t fru_for_each_segment(fru_nodehdl_t node, +extern fru_errno_t fru_for_each_segment(fru_nodehdl_t node, int (*function)(fru_seghdl_t segment, void *args), void *args); -fru_errno_t fru_get_segment_name(fru_seghdl_t segment, char **name); -fru_errno_t fru_for_each_packet(fru_seghdl_t segment, +extern fru_errno_t fru_get_segment_name(fru_seghdl_t segment, char **name); +extern fru_errno_t fru_for_each_packet(fru_seghdl_t segment, int (*function)(fru_tag_t *tag, uint8_t *payload, size_t length, void *args), diff --git a/usr/src/lib/libfru/libfru/libfru.cc b/usr/src/lib/libfru/libfru/libfru.cc index 0abb0a94ff..c76a70fc67 100644 --- a/usr/src/lib/libfru/libfru/libfru.cc +++ b/usr/src/lib/libfru/libfru/libfru.cc @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -94,6 +93,8 @@ struct cont_lock }; typedef struct cont_lock cont_lock_t; +fru_encrypt_func_t encrypt_func; + #define CONT_LOCK_HASH_NUM 128 cont_lock_t *cont_lock_hash[CONT_LOCK_HASH_NUM]; pthread_mutex_t cont_lock_hash_lock; diff --git a/usr/src/lib/libintl/Makefile.com b/usr/src/lib/libintl/Makefile.com index e229aa353e..a01dc6772e 100644 --- a/usr/src/lib/libintl/Makefile.com +++ b/usr/src/lib/libintl/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -31,7 +31,7 @@ VERS= .1 include ../../Makefile.lib include ../../Makefile.rootfs -MAPFILES += $(MAPFILE-FLTR) +MAPFILES += $(MAPFILE.FLT) SRCDIR= ../common diff --git a/usr/src/lib/libkrb5/Makefile.com b/usr/src/lib/libkrb5/Makefile.com index 0af464673e..d7e596cd00 100755 --- a/usr/src/lib/libkrb5/Makefile.com +++ b/usr/src/lib/libkrb5/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -28,13 +28,15 @@ # include library definitions include $(SRC)/lib/Makefile.lib -LIBRARY= libkrb5.a -LLIBRARY= libkrb5.so.1 -VERS= .1 -MAPFILE=../common/mapfile +LIBRARY = libkrb5.a +LLIBRARY = libkrb5.so.1 +VERS = .1 +MAPFILES = ../common/mapfile $(MAPFILE.FLT) -LIBS= $(DYNLIB) +DYNFLAGS += -G $(ZLOADFLTR) + +LIBS = $(DYNLIB) #override liblink INS.liblink= -$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@ @@ -43,10 +45,8 @@ INS.liblink= -$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@ all: $(LIBS) - -$(LIBS): $(MAPFILE) - $(LD) $(DYNFLAGS) -o $@ -M$(MAPFILE) - +$(LIBS): $(MAPFILES) + $(LD) $(DYNFLAGS) -o $@ $(ROOTLIBDIR)/$(DYNLIB) := FILEMODE= 755 diff --git a/usr/src/lib/libkrb5/amd64/Makefile b/usr/src/lib/libkrb5/amd64/Makefile index ed38f8157b..8cb76d200d 100644 --- a/usr/src/lib/libkrb5/amd64/Makefile +++ b/usr/src/lib/libkrb5/amd64/Makefile @@ -19,14 +19,14 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -include ../Makefile.com +include ../Makefile.com -DYNFLAGS = -64 -G -h$(DYNLIB) -ztext -zdefs -zcombreloc -zloadfltr -R/usr/lib/64/gss +DYNFLAGS += -64 -R/usr/lib/64/gss -install: all $(ROOTLIBS64) $(ROOTLINKS64) +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libkrb5/i386/Makefile b/usr/src/lib/libkrb5/i386/Makefile index eefe1d221f..d53a981575 100755 --- a/usr/src/lib/libkrb5/i386/Makefile +++ b/usr/src/lib/libkrb5/i386/Makefile @@ -19,15 +19,14 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -include ../Makefile.com +include ../Makefile.com -DYNFLAGS = -G -h$(DYNLIB) -ztext -zdefs -zcombreloc -zloadfltr \ - -R/usr/lib/gss -M$(NX_MAP) +DYNFLAGS += -R/usr/lib/gss -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) +install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/lib/libkrb5/sparc/Makefile b/usr/src/lib/libkrb5/sparc/Makefile index 2f8f7bfaa7..d53a981575 100755 --- a/usr/src/lib/libkrb5/sparc/Makefile +++ b/usr/src/lib/libkrb5/sparc/Makefile @@ -19,14 +19,14 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -include ../Makefile.com +include ../Makefile.com -DYNFLAGS = -G -h$(DYNLIB) -ztext -zdefs -zcombreloc -zloadfltr -R/usr/lib/gss +DYNFLAGS += -R/usr/lib/gss -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) +install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/lib/libkrb5/sparcv9/Makefile b/usr/src/lib/libkrb5/sparcv9/Makefile index ed38f8157b..8cb76d200d 100755 --- a/usr/src/lib/libkrb5/sparcv9/Makefile +++ b/usr/src/lib/libkrb5/sparcv9/Makefile @@ -19,14 +19,14 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -include ../Makefile.com +include ../Makefile.com -DYNFLAGS = -64 -G -h$(DYNLIB) -ztext -zdefs -zcombreloc -zloadfltr -R/usr/lib/64/gss +DYNFLAGS += -64 -R/usr/lib/64/gss -install: all $(ROOTLIBS64) $(ROOTLINKS64) +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libmd5/Makefile.com b/usr/src/lib/libmd5/Makefile.com index c07efd95b6..16f4f6dc7b 100644 --- a/usr/src/lib/libmd5/Makefile.com +++ b/usr/src/lib/libmd5/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,7 +38,7 @@ LIBS = $(DYNLIB) $(LINTLIB) SRCDIR = ../common $(LINTLIB) := SRCS = $(SRCDIR)/llib-lmd5 -MAPFILES += $(MAPFILE-FLTR) +MAPFILES += $(MAPFILE.FLT) # Redefine shared object build rule to use $(LD) directly (this avoids .init # and .fini sections being added). Also, since there are no OBJECTS, turn diff --git a/usr/src/lib/libmp/i386/Makefile b/usr/src/lib/libmp/i386/Makefile index 5e129bfd7f..1a8e40aba8 100644 --- a/usr/src/lib/libmp/i386/Makefile +++ b/usr/src/lib/libmp/i386/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -40,9 +40,9 @@ $(ROOTLIBDIR)/$(OLIBRARY) := FILEMODE= 755 .KEEP_STATE: $(OLIBRARY): pics/pics_mp.o libmp.so.2 $(OMAPFILE) - $(CC) $(CFLAGS) -o $@ $(GSHARED) -h $(OLIBRARY) \ - $(ZTEXT) $(ZDEFS) $(ZCOMBRELOC) \ - pics/pics_mp.o libmp.so.2 -M$(OMAPFILE) $(NX_MAP:%=-M%) + $(CC) $(CFLAGS) -o $@ $(GSHARED) -h $(OLIBRARY) $(ZTEXT) $(ZDEFS) \ + $(ZCOMBRELOC) pics/pics_mp.o libmp.so.2 -M$(OMAPFILE) \ + $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(POST_PROCESS_SO) pics/pics_mp.o: diff --git a/usr/src/lib/libmp/sparc/Makefile b/usr/src/lib/libmp/sparc/Makefile index c69ce25350..1a8e40aba8 100644 --- a/usr/src/lib/libmp/sparc/Makefile +++ b/usr/src/lib/libmp/sparc/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -42,11 +42,11 @@ $(ROOTLIBDIR)/$(OLIBRARY) := FILEMODE= 755 $(OLIBRARY): pics/pics_mp.o libmp.so.2 $(OMAPFILE) $(CC) $(CFLAGS) -o $@ $(GSHARED) -h $(OLIBRARY) $(ZTEXT) $(ZDEFS) \ $(ZCOMBRELOC) pics/pics_mp.o libmp.so.2 -M$(OMAPFILE) \ - # -R/lib $(ZNODEFAULTLIB) + $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(POST_PROCESS_SO) pics/pics_mp.o: - $(COMPILE.c) -o $@ -K pic ../common/old_mp.c + $(COMPILE.c) -o $@ $(C_PICFLAGS) ../common/old_mp.c $(PROCESS_COMMENT) $@ all: $(LIBS) $(OLIBRARY) diff --git a/usr/src/lib/libnisdb/Makefile b/usr/src/lib/libnisdb/Makefile index 539760931f..82c08530fd 100644 --- a/usr/src/lib/libnisdb/Makefile +++ b/usr/src/lib/libnisdb/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -144,6 +144,11 @@ LIBS = $(DYNLIB) ZDEFS= LDLIBS += -lnsl -lldap -lc +# A number of interfaces are interposed by numerous applications, therefore +# prevent direct binding to anything in this shared object. In addition, +# libnisdb.so.1 interposes on socket(). +DYNFLAGS += $(BNODIRECT) $(ZINTERPOSE) + all := TARGET= all clean := TARGET= clean clobber := TARGET= clobber diff --git a/usr/src/lib/libnsl/common/mapfile-vers b/usr/src/lib/libnsl/common/mapfile-vers index a0aa823152..79acf8cd81 100644 --- a/usr/src/lib/libnsl/common/mapfile-vers +++ b/usr/src/lib/libnsl/common/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -197,7 +197,7 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3) getrpcbynumber_r; getrpcent; getrpcent_r; - h_errno; + h_errno = NODIRECT; inet_ntoa_r; key_secretkey_is_set; maxbno; diff --git a/usr/src/lib/libproc/Makefile.com b/usr/src/lib/libproc/Makefile.com index e9bd629f9d..f6f48e0531 100644 --- a/usr/src/lib/libproc/Makefile.com +++ b/usr/src/lib/libproc/Makefile.com @@ -94,6 +94,10 @@ MAPFILES += mapfile-vers CFLAGS += $(CCVERBOSE) CPPFLAGS += -I$(SRCDIR) +# All interfaces are interposable, therefore don't allow direct binding to this +# shared object. +DYNFLAGS += $(BNODIRECT) + .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/lib/libpthread/Makefile.com b/usr/src/lib/libpthread/Makefile.com index f313249ed2..d943a84ff6 100644 --- a/usr/src/lib/libpthread/Makefile.com +++ b/usr/src/lib/libpthread/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,7 +38,7 @@ LIBS = $(DYNLIB) $(LINTLIB) SRCDIR = ../common $(LINTLIB) := SRCS = $(SRCDIR)/llib-lpthread -MAPFILES = mapfile-vers $(MAPFILE-FLTR) +MAPFILES = mapfile-vers $(MAPFILE.FLT) # Redefine shared object build rule to use $(LD) directly (this avoids .init # and .fini sections being added). Also, since there are no OBJECTS, turn diff --git a/usr/src/lib/libresolv2/cylink/Makefile.com b/usr/src/lib/libresolv2/cylink/Makefile.com index e8eedebc14..fe74ef0750 100644 --- a/usr/src/lib/libresolv2/cylink/Makefile.com +++ b/usr/src/lib/libresolv2/cylink/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -69,8 +69,6 @@ CPPFLAGS += $(CRYPTFLAGS) $(CRYPTINCL) CPPFLAGS += -D_SYS_STREAM_H -D_REENTRANT -DSVR4 -DSUNW_OPTIONS \ $(SOLCOMPAT) -I../../include -I../../../common/inc -REDLOC= $(ZREDLOCSYM) - .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/lib/libresolv2/dnssafe/Makefile.com b/usr/src/lib/libresolv2/dnssafe/Makefile.com index ec11476c81..980ac7a77b 100644 --- a/usr/src/lib/libresolv2/dnssafe/Makefile.com +++ b/usr/src/lib/libresolv2/dnssafe/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -88,8 +88,6 @@ CPPFLAGS += $(CRYPTFLAGS) $(CRYPTINCL) CPPFLAGS += -D_SYS_STREAM_H -D_REENTRANT -DSVR4 -DSUNW_OPTIONS \ $(SOLCOMPAT) -I../../include -I../../../common/inc -REDLOC= $(ZREDLOCSYM) - .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/lib/librestart/Makefile.com b/usr/src/lib/librestart/Makefile.com index 4871d4bac5..88115f928c 100644 --- a/usr/src/lib/librestart/Makefile.com +++ b/usr/src/lib/librestart/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -35,8 +35,8 @@ include ../../Makefile.rootfs LIBS = $(DYNLIB) $(LINTLIB) -START_LAZY = -z lazyload -END_LAZY = -z nolazyload +START_LAZY = $(ZLAZYLOAD) +END_LAZY = $(ZNOLAZYLOAD) lintcheck := START_LAZY = lintcheck := END_LAZY = diff --git a/usr/src/lib/librt/Makefile.com b/usr/src/lib/librt/Makefile.com index 9e9c0075fa..bbaebd88c2 100644 --- a/usr/src/lib/librt/Makefile.com +++ b/usr/src/lib/librt/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,7 +38,7 @@ LIBS = $(DYNLIB) $(LINTLIB) SRCDIR = ../common $(LINTLIB) := SRCS = $(SRCDIR)/llib-lrt -MAPFILES = mapfile-vers $(MAPFILE-FLTR) +MAPFILES = mapfile-vers $(MAPFILE.FLT) # Redefine shared object build rule to use $(LD) directly (this avoids .init # and .fini sections being added). Also, since there are no OBJECTS, turn diff --git a/usr/src/lib/libsched/Makefile.com b/usr/src/lib/libsched/Makefile.com index c2d68d7f75..1e04a43ab2 100644 --- a/usr/src/lib/libsched/Makefile.com +++ b/usr/src/lib/libsched/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -35,7 +35,7 @@ $(LINTLIB) := SRCS = ../common/llib-lsched SRCDIR= ../common -MAPFILES += $(MAPFILE-FLTR) +MAPFILES += $(MAPFILE.FLT) DYNFLAGS += -F libc.so.1 diff --git a/usr/src/lib/libsocket/Makefile.com b/usr/src/lib/libsocket/Makefile.com index 74b3b5c364..3e4c403fe3 100644 --- a/usr/src/lib/libsocket/Makefile.com +++ b/usr/src/lib/libsocket/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -28,7 +28,7 @@ LIBRARY = libsocket.a VERS = .1 -INETOBJS = bindresvport.o bootparams_getbyname.o byteorder.o ether_addr.o \ +INETOBJS = bindresvport.o bootparams_getbyname.o ether_addr.o \ getaddrinfo.o getnameinfo.o getnetent.o getnetent_r.o \ getprotoent.o getprotoent_r.o getservbyname_r.o getservent.o \ getservent_r.o inet_lnaof.o inet_mkaddr.o inet_network.o \ diff --git a/usr/src/lib/libsocket/amd64/Makefile b/usr/src/lib/libsocket/amd64/Makefile index de119509d4..9fcd5cdbcb 100644 --- a/usr/src/lib/libsocket/amd64/Makefile +++ b/usr/src/lib/libsocket/amd64/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,22 +19,12 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -# the following entry needs to be defined before the inclusion -# of ../Makefile.com, otherwise inet/byteorder.c will be used -# instead of amd64/byteorder.s - -objs/%.o pics/%.o: %.s - $(COMPILE.s) -o $@ $< - $(POST_PROCESS_O) - -ASFLAGS += -P -D__STDC__ -D_ASM - include ../Makefile.com include ../../Makefile.lib.64 diff --git a/usr/src/lib/libsocket/amd64/byteorder.s b/usr/src/lib/libsocket/amd64/byteorder.s deleted file mode 100644 index 04d10df546..0000000000 --- a/usr/src/lib/libsocket/amd64/byteorder.s +++ /dev/null @@ -1,60 +0,0 @@ -/ -/ Copyright 2005 Sun Microsystems, Inc. All rights reserved. -/ Use is subject to license terms. -/ -/ CDDL HEADER START -/ -/ The contents of this file are subject to the terms of the -/ Common Development and Distribution License, Version 1.0 only -/ (the "License"). You may not use this file except in compliance -/ with the License. -/ -/ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -/ or http://www.opensolaris.org/os/licensing. -/ See the License for the specific language governing permissions -/ and limitations under the License. -/ -/ When distributing Covered Code, include this CDDL HEADER in each -/ file and include the License file at usr/src/OPENSOLARIS.LICENSE. -/ If applicable, add the following below this CDDL HEADER, with the -/ fields enclosed by brackets "[]" replaced with your own identifying -/ information: Portions Copyright [yyyy] [name of copyright owner] -/ -/ CDDL HEADER END -/ - .ident "%Z%%M% %I% %E% SMI" - - .file "byteorder.s" - -#include <sys/asm_linkage.h> - -/ -/ uint32_t htonl(uint32_t hl); -/ uint32_t ntohl(uint32_t nl); -/ -/ reverses the byte order of the argument. -/ - - ENTRY(htonl) - ENTRY(ntohl) - movl %edi, %eax - bswap %eax - ret - SET_SIZE(htonl) - SET_SIZE(ntohl) - -/ -/ uint16_t htons(uint16_t hs); -/ uint16_t ntohs(uint16_t ns); -/ -/ reverses the byte order of the argument. -/ - - ENTRY(htons) - ENTRY(ntohs) - movl %edi, %eax - bswap %eax - shr $16, %eax - ret - SET_SIZE(htons) - SET_SIZE(ntohs) diff --git a/usr/src/lib/libsocket/common/mapfile-vers b/usr/src/lib/libsocket/common/mapfile-vers index c4fdda3f62..cf419b0622 100644 --- a/usr/src/lib/libsocket/common/mapfile-vers +++ b/usr/src/lib/libsocket/common/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -119,10 +119,10 @@ SUNW_0.7 { getservbyport_r; getservent; getservent_r; - htonl; - htons; - ntohl; - ntohs; + htonl = FUNCTION FILTER libc.so.1; + htons = FUNCTION FILTER libc.so.1; + ntohl = FUNCTION FILTER libc.so.1; + ntohs = FUNCTION FILTER libc.so.1; rcmd; rexec; rresvport; diff --git a/usr/src/lib/libsocket/i386/Makefile b/usr/src/lib/libsocket/i386/Makefile index ea3915839c..a1257bea6f 100644 --- a/usr/src/lib/libsocket/i386/Makefile +++ b/usr/src/lib/libsocket/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,22 +19,12 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -# the following entry needs to be defined before the inclusion -# of ../Makefile.com, otherwise inet/byteorder.c will be used -# instead of i386/byteorder.s - -objs/%.o pics/%.o: %.s - $(COMPILE.s) -o $@ $< - $(POST_PROCESS_O) - -ASFLAGS += -P -D__STDC__ -D_ASM - include ../Makefile.com all: $(LIBS) diff --git a/usr/src/lib/libsocket/i386/byteorder.s b/usr/src/lib/libsocket/i386/byteorder.s deleted file mode 100644 index 3b58df4707..0000000000 --- a/usr/src/lib/libsocket/i386/byteorder.s +++ /dev/null @@ -1,60 +0,0 @@ -/ -/ Copyright 2005 Sun Microsystems, Inc. All rights reserved. -/ Use is subject to license terms. -/ -/ CDDL HEADER START -/ -/ The contents of this file are subject to the terms of the -/ Common Development and Distribution License, Version 1.0 only -/ (the "License"). You may not use this file except in compliance -/ with the License. -/ -/ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -/ or http://www.opensolaris.org/os/licensing. -/ See the License for the specific language governing permissions -/ and limitations under the License. -/ -/ When distributing Covered Code, include this CDDL HEADER in each -/ file and include the License file at usr/src/OPENSOLARIS.LICENSE. -/ If applicable, add the following below this CDDL HEADER, with the -/ fields enclosed by brackets "[]" replaced with your own identifying -/ information: Portions Copyright [yyyy] [name of copyright owner] -/ -/ CDDL HEADER END -/ - .ident "%Z%%M% %I% %E% SMI" - - .file "byteorder.s" - -#include <sys/asm_linkage.h> - -/ -/ uint32_t htonl(uint32_t hl); -/ uint32_t ntohl(uint32_t nl); -/ -/ reverses the byte order of the argument. -/ - - ENTRY(htonl) - ENTRY(ntohl) - movl 4(%esp), %eax / %eax = hl - bswap %eax / reverses the byte order of %eax - ret / return (%eax) - SET_SIZE(htonl) - SET_SIZE(ntohl) - -/ -/ uint16_t htons(uint16_t hs); -/ uint16_t ntohs(uint16_t ns); -/ -/ reverses the byte order of the argument. -/ - - ENTRY(htons) - ENTRY(ntohs) - movl 4(%esp), %eax / %eax = hs - bswap %eax / reverses the byte order of %eax - shrl $16, %eax / moves high 16-bit to low 16-bit - ret / return (%eax) - SET_SIZE(htons) - SET_SIZE(ntohs) diff --git a/usr/src/lib/libsys/Makefile.com b/usr/src/lib/libsys/Makefile.com index 3f5359c93e..c27219af5b 100644 --- a/usr/src/lib/libsys/Makefile.com +++ b/usr/src/lib/libsys/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -33,7 +33,7 @@ OBJECTS= $(COMOBJ) $(MACHOBJ) include ../../../lib/Makefile.lib -MAPFILES = mapfile-vers $(MAPFILE-FLTR) +MAPFILES = mapfile-vers $(MAPFILE.FLT) # Define libsys to be a filter on libc. The ABI requires the runtime linker as # the soname. diff --git a/usr/src/lib/libthread/Makefile.com b/usr/src/lib/libthread/Makefile.com index 0b67d6a562..a8954595b7 100644 --- a/usr/src/lib/libthread/Makefile.com +++ b/usr/src/lib/libthread/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,7 +38,7 @@ LIBS = $(DYNLIB) $(LINTLIB) SRCDIR = ../common $(LINTLIB) := SRCS = $(SRCDIR)/llib-lthread -MAPFILES = mapfile-vers $(MAPFILE-FLTR) +MAPFILES = mapfile-vers $(MAPFILE.FLT) # Redefine shared object build rule to use $(LD) directly (this avoids .init # and .fini sections being added). Also, since there are no OBJECTS, turn diff --git a/usr/src/lib/libthread/amd64/mapfile-vers b/usr/src/lib/libthread/amd64/mapfile-vers index f4a4e58730..e119d1e421 100644 --- a/usr/src/lib/libthread/amd64/mapfile-vers +++ b/usr/src/lib/libthread/amd64/mapfile-vers @@ -1,13 +1,12 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -174,10 +173,10 @@ SUNW_0.9 { thr_main = FUNCTION; thr_stksegment = FUNCTION; alarm = FUNCTION; - close = FUNCTION; + close = FUNCTION NODIRECT; creat = FUNCTION; fcntl = FUNCTION; - fork = FUNCTION; + fork = FUNCTION NODIRECT; fsync = FUNCTION; msync = FUNCTION; open = FUNCTION; @@ -238,7 +237,7 @@ SUNW_0.7 { sema_trywait = FUNCTION; sema_wait = FUNCTION; _getfp = FUNCTION; - sigaction = FUNCTION; + sigaction = FUNCTION NODIRECT; sigprocmask = FUNCTION; sigwait = FUNCTION; sleep = FUNCTION; @@ -416,7 +415,7 @@ SUNWprivate_1.1 { _fork = FUNCTION; _fork1 = FUNCTION; _setcontext = FUNCTION; - _sigaction = FUNCTION; + _sigaction = FUNCTION NODIRECT; _sigprocmask = FUNCTION; _sigwait = FUNCTION; _sigsuspend = FUNCTION; diff --git a/usr/src/lib/libthread/i386/mapfile-vers b/usr/src/lib/libthread/i386/mapfile-vers index f9e692cf95..9c8abbf15e 100644 --- a/usr/src/lib/libthread/i386/mapfile-vers +++ b/usr/src/lib/libthread/i386/mapfile-vers @@ -1,13 +1,12 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -123,7 +122,7 @@ SUNW_0.9 { pthread_cond_timedwait = FUNCTION; pthread_mutex_lock = FUNCTION; pthread_setspecific = FUNCTION; - fork = FUNCTION; + fork = FUNCTION NODIRECT; pthread_mutex_getprioceiling = FUNCTION; thr_main = FUNCTION; pthread_attr_setstackaddr = FUNCTION; @@ -185,7 +184,7 @@ SUNW_0.9 { pthread_kill = FUNCTION; waitpid = FUNCTION; pthread_mutexattr_setprotocol = FUNCTION; - close = FUNCTION; + close = FUNCTION NODIRECT; wait = FUNCTION; pthread_attr_getinheritsched = FUNCTION; pthread_condattr_setpshared = FUNCTION; @@ -200,7 +199,7 @@ SUNW_0.9 { SUNW_0.7 { global: - sigaction = FUNCTION; + sigaction = FUNCTION NODIRECT; sema_trywait = FUNCTION; cond_init = FUNCTION; thr_kill = FUNCTION; @@ -275,7 +274,7 @@ SUNWprivate_1.1 { _thr_sighndlrinfo = FUNCTION; thr_suspend_mutator = FUNCTION; _thr_setspecific = FUNCTION; - _sigaction = FUNCTION; + _sigaction = FUNCTION NODIRECT; _thr_keycreate = FUNCTION; _pthread_attr_setinheritsched = FUNCTION; _pthread_mutexattr_destroy = FUNCTION; diff --git a/usr/src/lib/libthread/sparc/mapfile-vers b/usr/src/lib/libthread/sparc/mapfile-vers index 6e9f16b63a..080f7f1afa 100644 --- a/usr/src/lib/libthread/sparc/mapfile-vers +++ b/usr/src/lib/libthread/sparc/mapfile-vers @@ -1,13 +1,12 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -177,10 +176,10 @@ SUNW_0.9 { pthread_sigmask = FUNCTION; pthread_testcancel = FUNCTION; alarm = FUNCTION; - close = FUNCTION; + close = FUNCTION NODIRECT; creat = FUNCTION; fcntl = FUNCTION; - fork = FUNCTION; + fork = FUNCTION NODIRECT; fsync = FUNCTION; msync = FUNCTION; open = FUNCTION; @@ -200,7 +199,7 @@ SUNW_0.7 { global: lwp_self = FUNCTION; _getfp = FUNCTION; - sigaction = FUNCTION; + sigaction = FUNCTION NODIRECT; sigprocmask = FUNCTION; sleep = FUNCTION; setcontext = FUNCTION; @@ -429,7 +428,7 @@ SUNWprivate_1.1 { _fork = FUNCTION; _fork1 = FUNCTION; _setcontext = FUNCTION; - _sigaction = FUNCTION; + _sigaction = FUNCTION NODIRECT; _sigprocmask = FUNCTION; _sigwait = FUNCTION; _sigsuspend = FUNCTION; diff --git a/usr/src/lib/libthread/sparcv9/mapfile-vers b/usr/src/lib/libthread/sparcv9/mapfile-vers index f4a4e58730..e119d1e421 100644 --- a/usr/src/lib/libthread/sparcv9/mapfile-vers +++ b/usr/src/lib/libthread/sparcv9/mapfile-vers @@ -1,13 +1,12 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -174,10 +173,10 @@ SUNW_0.9 { thr_main = FUNCTION; thr_stksegment = FUNCTION; alarm = FUNCTION; - close = FUNCTION; + close = FUNCTION NODIRECT; creat = FUNCTION; fcntl = FUNCTION; - fork = FUNCTION; + fork = FUNCTION NODIRECT; fsync = FUNCTION; msync = FUNCTION; open = FUNCTION; @@ -238,7 +237,7 @@ SUNW_0.7 { sema_trywait = FUNCTION; sema_wait = FUNCTION; _getfp = FUNCTION; - sigaction = FUNCTION; + sigaction = FUNCTION NODIRECT; sigprocmask = FUNCTION; sigwait = FUNCTION; sleep = FUNCTION; @@ -416,7 +415,7 @@ SUNWprivate_1.1 { _fork = FUNCTION; _fork1 = FUNCTION; _setcontext = FUNCTION; - _sigaction = FUNCTION; + _sigaction = FUNCTION NODIRECT; _sigprocmask = FUNCTION; _sigwait = FUNCTION; _sigsuspend = FUNCTION; diff --git a/usr/src/lib/libtnfprobe/Makefile.com b/usr/src/lib/libtnfprobe/Makefile.com index 50448d6d64..fade30ae8a 100644 --- a/usr/src/lib/libtnfprobe/Makefile.com +++ b/usr/src/lib/libtnfprobe/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -51,6 +51,7 @@ SRCS= $(OBJECTS.c:%.o=../%.c) $(UFSOBJS:%.o=$(UFSDIR)/%.c) LIBS= $(DYNLIB) MAPFILES += mapfile-vers +DYNFLAGS += $(ZINTERPOSE) HDRS= com.h writer.h probe.h ROOTHDRDIR= $(ROOT)/usr/include/tnf diff --git a/usr/src/lib/libumem/Makefile.com b/usr/src/lib/libumem/Makefile.com index cc1385f4a1..bb914af280 100644 --- a/usr/src/lib/libumem/Makefile.com +++ b/usr/src/lib/libumem/Makefile.com @@ -117,7 +117,7 @@ MAPFILE_SUPPLEMENTAL = $(MAPFILE_SUPPLEMENTAL_$(CURTYPE)) LDLIBS += -lc -LDFLAGS_standalone = -znoversion -Breduce -M../common/mapfile-vers \ +LDFLAGS_standalone = $(ZNOVERSION) $(BREDUCE) -M../common/mapfile-vers \ -M$(MAPFILE_SUPPLEMENTAL) -dy -r LDFLAGS = $(LDFLAGS_$(CURTYPE)) diff --git a/usr/src/lib/libumem/Makefile.targ b/usr/src/lib/libumem/Makefile.targ index 380d00ad0e..1e5cad3062 100644 --- a/usr/src/lib/libumem/Makefile.targ +++ b/usr/src/lib/libumem/Makefile.targ @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -51,7 +51,7 @@ $(TYPES:%=lint.%): @CURTYPE=$(@:lint.%=%) $(MAKE) lintcheck $(STANDLIBRARY): $(OBJS) $(LINKTEST_OBJ) - $(LD) -Breduce -zdefs $(LDFLAGS) -o $@.linktest $(OBJS) $(LINKTEST_OBJ) + $(LD) $(BREDUCE) $(ZDEFS) $(LDFLAGS) -o $@.linktest $(OBJS) $(LINKTEST_OBJ) rm $@.linktest $(LD) $(LDFLAGS) -o $@ $(OBJS) diff --git a/usr/src/lib/libw/Makefile.com b/usr/src/lib/libw/Makefile.com index 00cb20e480..5e9c37aa0a 100644 --- a/usr/src/lib/libw/Makefile.com +++ b/usr/src/lib/libw/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -33,7 +33,7 @@ include ../../Makefile.rootfs SRCDIR = ../common -MAPFILES += $(MAPFILE-FLTR) +MAPFILES += $(MAPFILE.FLT) DYNFLAGS += -F libc.so.1 diff --git a/usr/src/lib/libxnet/Makefile.com b/usr/src/lib/libxnet/Makefile.com index 0e905e3ca3..8d36e1daa1 100644 --- a/usr/src/lib/libxnet/Makefile.com +++ b/usr/src/lib/libxnet/Makefile.com @@ -34,7 +34,7 @@ include ../../Makefile.lib # install this library in the root filesystem include ../../Makefile.rootfs -MAPFILES += $(MAPFILE-FLTR) +MAPFILES += $(MAPFILE.FLT) SRCDIR= ../common LIBS= $(DYNLIB) $(LINTLIB) diff --git a/usr/src/lib/libxnet/common/mapfile-vers b/usr/src/lib/libxnet/common/mapfile-vers index f131ee5d61..ab438c0c3e 100644 --- a/usr/src/lib/libxnet/common/mapfile-vers +++ b/usr/src/lib/libxnet/common/mapfile-vers @@ -1,13 +1,12 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -120,17 +119,17 @@ SUNW_1.1 { getsockname = FUNCTION FILTER libsocket.so.1; getsockopt = FUNCTION FILTER libsocket.so.1; h_errno = FILTER libnsl.so.1; - htonl = FUNCTION FILTER libsocket.so.1; - htons = FUNCTION FILTER libsocket.so.1; - inet_addr = FUNCTION FILTER libsocket.so.1; + htonl = FUNCTION FILTER libc.so.1; + htons = FUNCTION FILTER libc.so.1; + inet_addr = FUNCTION FILTER libnsl.so.1; inet_lnaof = FUNCTION FILTER libsocket.so.1; inet_makeaddr = FUNCTION FILTER libsocket.so.1; inet_netof = FUNCTION FILTER libnsl.so.1; inet_network = FUNCTION FILTER libsocket.so.1; inet_ntoa = FUNCTION FILTER libnsl.so.1; listen = FUNCTION FILTER libsocket.so.1; - ntohl = FUNCTION FILTER libsocket.so.1; - ntohs = FUNCTION FILTER libsocket.so.1; + ntohl = FUNCTION FILTER libc.so.1; + ntohs = FUNCTION FILTER libc.so.1; recv = FUNCTION FILTER libsocket.so.1; recvfrom = FUNCTION FILTER libsocket.so.1; recvmsg = FUNCTION FILTER libsocket.so.1; diff --git a/usr/src/lib/lvm/libmeta/common/mapfile-vers b/usr/src/lib/lvm/libmeta/common/mapfile-vers index 63b52177d6..346b1d4ee7 100644 --- a/usr/src/lib/lvm/libmeta/common/mapfile-vers +++ b/usr/src/lib/lvm/libmeta/common/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -695,40 +695,40 @@ SUNWprivate_1.1 { resync_genid; s_delrec; s_delset; - sdssc_add_hosts; - sdssc_bindclusterdevs; - sdssc_binddevs; - sdssc_bind_library; - sdssc_clnt_bind_devs; - sdssc_clnt_proxy_cmd; - sdssc_cmd_proxy; - sdssc_cm_nid2nm; - sdssc_cm_nm2nid; - sdssc_cm_sr_nid2nm; - sdssc_cm_sr_nm2nid; - sdssc_convert_cluster_path; - sdssc_convert_ctd_path; - sdssc_convert_path_free; - sdssc_create_begin; - sdssc_create_end; - sdssc_delete_begin; - sdssc_delete_end; - sdssc_delete_hosts; - sdssc_free_mdcerr_list; - sdssc_freenodelist; - sdssc_get_index; - sdssc_getnodelist; - sdssc_get_primary_host; - sdssc_get_priv_ipaddr; - sdssc_get_services; - sdssc_get_services_free; - sdssc_gettransportbynode; - sdssc_mo_create_begin; - sdssc_notify_service; - sdssc_property_get; - sdssc_property_set; - sdssc_suspend; - sdssc_version; + sdssc_add_hosts = NODIRECT; + sdssc_bindclusterdevs = NODIRECT; + sdssc_binddevs = NODIRECT; + sdssc_bind_library = NODIRECT; + sdssc_clnt_bind_devs = NODIRECT; + sdssc_clnt_proxy_cmd = NODIRECT; + sdssc_cmd_proxy = NODIRECT; + sdssc_cm_nid2nm = NODIRECT; + sdssc_cm_nm2nid = NODIRECT; + sdssc_cm_sr_nid2nm = NODIRECT; + sdssc_cm_sr_nm2nid = NODIRECT; + sdssc_convert_cluster_path = NODIRECT; + sdssc_convert_ctd_path = NODIRECT; + sdssc_convert_path_free = NODIRECT; + sdssc_create_begin = NODIRECT; + sdssc_create_end = NODIRECT; + sdssc_delete_begin = NODIRECT; + sdssc_delete_end = NODIRECT; + sdssc_delete_hosts = NODIRECT; + sdssc_free_mdcerr_list = NODIRECT; + sdssc_freenodelist = NODIRECT; + sdssc_get_index = NODIRECT; + sdssc_getnodelist = NODIRECT; + sdssc_get_primary_host = NODIRECT; + sdssc_get_priv_ipaddr = NODIRECT; + sdssc_get_services = NODIRECT; + sdssc_get_services_free = NODIRECT; + sdssc_gettransportbynode = NODIRECT; + sdssc_mo_create_begin = NODIRECT; + sdssc_notify_service = NODIRECT; + sdssc_property_get = NODIRECT; + sdssc_property_set = NODIRECT; + sdssc_suspend = NODIRECT; + sdssc_version = NODIRECT; setdevstamp; setdup; set_snarf; diff --git a/usr/src/lib/madv/Makefile.com b/usr/src/lib/madv/Makefile.com index 0957b2b510..4304a8ed83 100644 --- a/usr/src/lib/madv/Makefile.com +++ b/usr/src/lib/madv/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -40,7 +40,7 @@ LIBS = $(DYNLIB) LDLIBS += -lc -lgen CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_REENTRANT -DYNFLAGS += $(ZNOVERSION) +DYNFLAGS += $(ZNOVERSION) $(ZINTERPOSE) .KEEP_STATE: diff --git a/usr/src/lib/openssl/libcrypto_extra/Makefile.com b/usr/src/lib/openssl/libcrypto_extra/Makefile.com index 57ce7d28e4..ca589c285c 100644 --- a/usr/src/lib/openssl/libcrypto_extra/Makefile.com +++ b/usr/src/lib/openssl/libcrypto_extra/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -52,7 +52,7 @@ MAPFILES = CFLAGS += -K PIC -DCRYPTO_UNLIMITED CFLAGS64 += -K PIC -DCRYPTO_UNLIMITED -ZDEFS = -znodefs +ZDEFS = $(ZNODEFS) SONAME = $(LIBRARY:.a=.so)$(VERS) diff --git a/usr/src/lib/print/libpapi-lpd/Makefile.com b/usr/src/lib/print/libpapi-lpd/Makefile.com index 2896f25913..31076c5fb6 100644 --- a/usr/src/lib/print/libpapi-lpd/Makefile.com +++ b/usr/src/lib/print/libpapi-lpd/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -76,14 +76,9 @@ $(PROG) := LDLIBS += -lsocket -lnsl -lsendfile -lpapi PROG_OBJS = $(LPD_PORT_OBJS:%=pics/%) OBJS += $(PROG_OBJS) -NX_MAP_i386= $(SRC)/cmd/mapfile_noexdata -NX_MAP_sparc= -NX_MAP= $(NX_MAP_$(MACH)) -NES_MAPFILE= $(SRC)/cmd/mapfile_noexstk $(NX_MAP) - LDFLAGS.cmd = \ $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \ - $(NES_MAPFILE:%=-M%) $(PGA_MAPFILE:%=-M%) + $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(PROG): $(PROG_OBJS) $(LINK.c) -o $@ $(PROG_OBJS) $(LDFLAGS.cmd) $(LDLIBS) diff --git a/usr/src/lib/req.flg b/usr/src/lib/req.flg index c7537ef5ba..afe21c920d 100644 --- a/usr/src/lib/req.flg +++ b/usr/src/lib/req.flg @@ -20,7 +20,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -32,4 +32,5 @@ echo_file usr/src/lib/Makefile.mach echo_file usr/src/lib/Makefile.lib.64 echo_file usr/src/lib/Makefile.rootfs find_files "s.*" usr/src/lib/common +find_files "s.*" usr/src/common/mapfiles exec_file usr/src/cmd/req.flg diff --git a/usr/src/pkgdefs/SUNWtoo/prototype_com b/usr/src/pkgdefs/SUNWtoo/prototype_com index 750ae8588c..810664a4bc 100644 --- a/usr/src/pkgdefs/SUNWtoo/prototype_com +++ b/usr/src/pkgdefs/SUNWtoo/prototype_com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -68,10 +68,10 @@ s none usr/ccs/lib/link_audit=../../lib/link_audit d none usr/lib 755 root bin d none usr/lib/ld 755 root bin f none usr/lib/ld/map.bssalign 444 root bin +f none usr/lib/ld/map.execdata 444 root bin +f none usr/lib/ld/map.filter 444 root bin f none usr/lib/ld/map.default 444 root bin f none usr/lib/ld/map.noexstk 444 root bin -f none usr/lib/ld/map.execdata 444 root bin -f none usr/lib/ld/map.noexdata 444 root bin f none usr/lib/ld/map.pagealign 444 root bin f none usr/lib/lddstub 555 root bin f none usr/lib/libldstab.so.1 755 root bin diff --git a/usr/src/pkgdefs/SUNWtoo/prototype_i386 b/usr/src/pkgdefs/SUNWtoo/prototype_i386 index 72610f4b52..a52d2c6edb 100644 --- a/usr/src/pkgdefs/SUNWtoo/prototype_i386 +++ b/usr/src/pkgdefs/SUNWtoo/prototype_i386 @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -59,6 +59,7 @@ f none usr/bin/amd64/pvs 555 root bin f none usr/bin/amd64/truss 555 root bin d none usr/ccs/bin/amd64 755 root bin f none usr/ccs/bin/amd64/ld 755 root bin +f none usr/lib/ld/map.noexdata 444 root bin d none usr/lib/ld/amd64 755 root bin f none usr/lib/ld/amd64/map.above4G 444 root bin f none usr/lib/ld/amd64/map.below4G 444 root bin diff --git a/usr/src/tools/Makefile.tools b/usr/src/tools/Makefile.tools index 3dd154695f..216e7ba31b 100644 --- a/usr/src/tools/Makefile.tools +++ b/usr/src/tools/Makefile.tools @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -43,15 +43,11 @@ ROOTONBLDMAN= $(ROOTONBLD)/man ROOTONBLDMAN1= $(ROOTONBLD)/man/man1 ROOTONBLDETCABI= $(ROOTONBLD)/etc/abi -NX_MAP_i386= $(SRC)/cmd/mapfile_noexdata -NX_MAP_sparc= -NX_MAP= $(NX_MAP_$(MACH)) -NES_MAPFILE= $(SRC)/cmd/mapfile_noexstk $(NX_MAP) - CPPFLAGS= -D_TS_ERRNO ELFSIGN_O= $(TRUE) LDLIBS= -LDFLAGS= $(NES_MAPFILE:%=-M%) +LDFLAGS= $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \ + $(MAPFILE.PGA:%=-M%) ROOTONBLDPROG= $(PROG:%=$(ROOTONBLDBIN)/%) ROOTONBLDMACHPROG= $(PROG:%=$(ROOTONBLDBINMACH)/%) diff --git a/usr/src/tools/cw/Makefile b/usr/src/tools/cw/Makefile index 62b5522264..667b7d4874 100644 --- a/usr/src/tools/cw/Makefile +++ b/usr/src/tools/cw/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -45,7 +45,7 @@ $(__GNUC)CFLAGS= -O -D__sun -Wall -Wno-unknown-pragmas -Werror \ -std=gnu89 -nodefaultlibs $(__GNUC)LDLIBS += -lc -$(__GNUC)LDFLAGS= $(NES_MAPFILE:%=-Wl,-M%) +$(__GNUC)LDFLAGS= $(MAPFILE.NES:%=-Wl,-M%) CPPFLAGS += -DDEFAULT_CC_DIR='"$(SPRO_VROOT)/bin"' CPPFLAGS += -DDEFAULT_GCC_DIR='"$(GNU_ROOT)/bin"' diff --git a/usr/src/tools/req.flg b/usr/src/tools/req.flg index 5343d54d79..995c2ad1b6 100644 --- a/usr/src/tools/req.flg +++ b/usr/src/tools/req.flg @@ -19,16 +19,11 @@ # # CDDL HEADER END # -# # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" -echo_file usr/src/cmd/mapfile_noexstk -echo_file usr/src/cmd/mapfile_noexdata -echo_file usr/src/cmd/sgs/mapfiles/i386/map.pagealign -echo_file usr/src/cmd/sgs/mapfiles/sparc/map.pagealign echo_file usr/src/lib/Makefile.lib echo_file usr/src/lib/Makefile.targ echo_file usr/src/lib/libctf/common/libctf.h @@ -40,3 +35,4 @@ echo_file usr/src/tools/Makefile.targ echo_file usr/src/tools/Makefile.tools echo_file usr/src/uts/common/sys/ctf.h echo_file usr/src/uts/common/sys/multiboot.h +find_files "s.*" usr/src/common/mapfiles diff --git a/usr/src/tools/tokenize/Makefile b/usr/src/tools/tokenize/Makefile index 976939c4f1..20a5715834 100644 --- a/usr/src/tools/tokenize/Makefile +++ b/usr/src/tools/tokenize/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -41,7 +41,7 @@ LIBS = $(DYNLIB) MAPFILES = -DYNFLAGS += -z interpose +DYNFLAGS += $(ZINTERPOSE) LDLIBS = -lc -ldl ASFLAGS += -P -D_ASM diff --git a/usr/src/ucbcmd/Makefile.ucbcmd b/usr/src/ucbcmd/Makefile.ucbcmd index 641333b644..7a34bff97b 100644 --- a/usr/src/ucbcmd/Makefile.ucbcmd +++ b/usr/src/ucbcmd/Makefile.ucbcmd @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,7 +18,9 @@ # # CDDL HEADER END # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -59,19 +60,13 @@ ROOTPROG32= $(PROG:%=$(ROOTBIN32)/%) ISAEXEC= $(ROOT)/usr/lib/isaexec -NX_MAP_i386= $(SRC)/cmd/mapfile_noexdata -NX_MAP_sparc= -NX_MAP= $(NX_MAP_$(MACH)) -NES_MAPFILE= $(SRC)/cmd/mapfile_noexstk $(NX_MAP) - # storing LDLIBS in two macros allows reordering of options LDLIBS.cmd = $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3) LDLIBS = $(LDLIBS.cmd) LDFLAGS.cmd = \ $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \ - $(NES_MAPFILE:%=-M%) \ - $(PGA_MAPFILE:%=-M%) + $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) LDFLAGS = $(LDFLAGS.cmd) diff --git a/usr/src/ucbcmd/chown/Makefile b/usr/src/ucbcmd/chown/Makefile index 9317d63e8a..cc85a9941a 100644 --- a/usr/src/ucbcmd/chown/Makefile +++ b/usr/src/ucbcmd/chown/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,11 +18,12 @@ # # CDDL HEADER END # + # -#ident "%Z%%M% %I% %E% SMI" +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 1989,1996 by Sun Microsystems, Inc. -# All rights reserved. +# ident "%Z%%M% %I% %E% SMI" # PROG= chown @@ -33,10 +33,11 @@ include ../Makefile.ucbcmd FILEMODE= 755 CPPFLAGS += -D_FILE_OFFSET_BITS=64 +LDFLAGS += $(MAPFILE.NGB:%=-M%) .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/ucbcmd/expr/Makefile b/usr/src/ucbcmd/expr/Makefile index 4db98c4b7d..6f1610dbda 100644 --- a/usr/src/ucbcmd/expr/Makefile +++ b/usr/src/ucbcmd/expr/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -19,10 +18,10 @@ # # CDDL HEADER END # -# Copyright 1991 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# ident "%Z%%M% %I% %E% SMI" # PROG= expr @@ -31,6 +30,8 @@ include ../Makefile.ucbcmd FILEMODE= 755 +LDFLAGS += $(MAPFILE.NGB:%=-M%) + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/ucbcmd/req.flg b/usr/src/ucbcmd/req.flg index aacd6e0489..3c51415527 100644 --- a/usr/src/ucbcmd/req.flg +++ b/usr/src/ucbcmd/req.flg @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -32,7 +31,4 @@ echo_file usr/src/ucbcmd/Makefile.ucbcmd echo_file usr/src/ucbcmd/Makefile.ucbcmd.64 echo_file usr/src/ucbcmd/Makefile.ucbtarg echo_file usr/src/cmd/Makefile.targ -echo_file usr/src/cmd/mapfile_noexstk -echo_file usr/src/cmd/mapfile_noexdata -echo_file usr/src/cmd/sgs/mapfiles/sparc/map.pagealign -echo_file usr/src/cmd/sgs/mapfiles/i386/map.pagealign +find_files "s.*" usr/src/common/mapfiles diff --git a/usr/src/ucbcmd/sbcp/Makefile b/usr/src/ucbcmd/sbcp/Makefile index e582d39fb5..f81c6e0459 100644 --- a/usr/src/ucbcmd/sbcp/Makefile +++ b/usr/src/ucbcmd/sbcp/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -50,7 +50,7 @@ LIBUCB= ../../ucblib/libucb/sparc/libucb.so.1 # need libc/sparc/inc for PIC.h ASFLAGS= -P -D_ASM -DPIC -K pic LDFLAGS= -R /usr/4lib:/usr/ucblib -e _start -G -t \ - -zdefs -z text -zcombreloc -I /usr/lib/ld.so.1 + $(ZDEFS) $(ZTEXT) $(ZCOMBRELOC) -I /usr/lib/ld.so.1 OBJS= sbcp.o LIBS= $(LDLIBS.lib) -lmapmalloc $(LIBBC) $(LIBUCB) -lnsl -lc diff --git a/usr/src/ucblib/libcurses/Makefile.com b/usr/src/ucblib/libcurses/Makefile.com index 6172001c28..60cff941a1 100644 --- a/usr/src/ucblib/libcurses/Makefile.com +++ b/usr/src/ucblib/libcurses/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -94,7 +94,7 @@ $(LINTLIB):= SRCS=../llib-lcurses CFLAGS += $(CCVERBOSE) CFLAGS64 += $(CCVERBOSE) -DYNFLAGS += +DYNFLAGS += $(ZINTERPOSE) DYNFLAGS32 = -R/usr/ucblib DYNFLAGS64 = -R/usr/ucblib/$(MACH64) LDLIBS += -ltermcap -lucb -lc diff --git a/usr/src/ucblib/librpcsoc/Makefile.com b/usr/src/ucblib/librpcsoc/Makefile.com index b4f8320cad..86a4edf8a8 100644 --- a/usr/src/ucblib/librpcsoc/Makefile.com +++ b/usr/src/ucblib/librpcsoc/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,6 +44,7 @@ LIBS = $(DYNLIB) LDLIBS += -lnsl -lsocket -lc CPPFLAGS += -DPORTMAP +DYNFLAGS += $(ZINTERPOSE) ROOTLIBDIR= $(ROOT)/usr/ucblib ROOTLIBDIR64= $(ROOT)/usr/ucblib/$(MACH64) diff --git a/usr/src/uts/common/gssapi/mechs/krb5/include/k5-int.h b/usr/src/uts/common/gssapi/mechs/krb5/include/k5-int.h index 8481640d09..8fa321886f 100644 --- a/usr/src/uts/common/gssapi/mechs/krb5/include/k5-int.h +++ b/usr/src/uts/common/gssapi/mechs/krb5/include/k5-int.h @@ -2225,5 +2225,10 @@ krb5_boolean KRB5_CALLCONV is_in_keytype (krb5_const krb5_enctype *keytype, int numkeytypes, krb5_enctype enctype); +/* + * Solaris Kerberos + * Use krb5_getuid() to select the mechanism to obtain the uid. + */ +extern uid_t krb5_getuid(); #endif /* _KRB5_INT_H */ diff --git a/usr/src/uts/common/io/ib/inc.flg b/usr/src/uts/common/io/ib/inc.flg index 246076a9a1..e10da39f8d 100644 --- a/usr/src/uts/common/io/ib/inc.flg +++ b/usr/src/uts/common/io/ib/inc.flg @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,9 @@ # # CDDL HEADER END # + # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -148,5 +148,4 @@ echo_file usr/src/pkgdefs/Makefile.prtarg echo_file usr/src/pkgdefs/Makefile.targ echo_file usr/src/pkgdefs/etc/exception_list_sparc echo_file usr/src/pkgdefs/etc/exception_list_i386 -echo_file usr/src/cmd/mapfile_noexstk -echo_file usr/src/cmd/sgs/mapfiles/sparc/map.pagealign +find_files "s.*" usr/src/common/mapfiles diff --git a/usr/src/uts/i86pc/io/pciex/inc.flg b/usr/src/uts/i86pc/io/pciex/inc.flg index 116e21284c..94a1f157fa 100644 --- a/usr/src/uts/i86pc/io/pciex/inc.flg +++ b/usr/src/uts/i86pc/io/pciex/inc.flg @@ -19,6 +19,7 @@ # # CDDL HEADER END # + # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. @@ -118,5 +119,4 @@ echo_file usr/src/pkgdefs/Makefile.prtarg echo_file usr/src/pkgdefs/Makefile.targ echo_file usr/src/pkgdefs/etc/exception_list_sparc echo_file usr/src/pkgdefs/etc/exception_list_i386 -echo_file usr/src/cmd/mapfile_noexstk -echo_file usr/src/cmd/sgs/mapfiles/sparc/map.pagealign +find_files "s.*" usr/src/common/mapfiles diff --git a/usr/src/uts/intel/ctf/Makefile b/usr/src/uts/intel/ctf/Makefile index ecd389f7a6..d95308321a 100644 --- a/usr/src/uts/intel/ctf/Makefile +++ b/usr/src/uts/intel/ctf/Makefile @@ -38,7 +38,7 @@ LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) CPPFLAGS += -I$(SRC)/common/ctf -DCTF_OLD_VERSIONS -LDFLAGS += -Breduce -M$(UTSBASE)/common/ctf/mapfile -dy +LDFLAGS += $(BREDUCE) -M$(UTSBASE)/common/ctf/mapfile -dy # # For now, disable these lint checks; maintainers should endeavor diff --git a/usr/src/uts/req.flg b/usr/src/uts/req.flg index 64495a7f73..09001d17c6 100644 --- a/usr/src/uts/req.flg +++ b/usr/src/uts/req.flg @@ -20,7 +20,7 @@ # # CDDL HEADER END # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" @@ -51,3 +51,4 @@ find_files "s.*" usr/src/common/acl find_files "s.*" usr/src/common/zfs find_files "s.*" usr/src/common/smbios find_files "s.*" usr/src/common/tsol +find_files "s.*" usr/src/common/mapfiles diff --git a/usr/src/uts/sparc/ctf/Makefile b/usr/src/uts/sparc/ctf/Makefile index e97e20fbe1..511d622450 100644 --- a/usr/src/uts/sparc/ctf/Makefile +++ b/usr/src/uts/sparc/ctf/Makefile @@ -39,7 +39,7 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) CFLAGS += $(CCVERBOSE) CPPFLAGS += -I$(SRC)/common/ctf -DCTF_OLD_VERSIONS -LDFLAGS += -Breduce -M$(UTSBASE)/common/ctf/mapfile -dy +LDFLAGS += $(BREDUCE) -M$(UTSBASE)/common/ctf/mapfile -dy # # For now, disable these lint checks; maintainers should endeavor diff --git a/usr/src/uts/sparc/krtld/Makefile b/usr/src/uts/sparc/krtld/Makefile index 02094af09d..e6e2e44b90 100644 --- a/usr/src/uts/sparc/krtld/Makefile +++ b/usr/src/uts/sparc/krtld/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -74,8 +74,7 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) CFLAGS += $(CCVERBOSE) CPPFLAGS += -DELF_TARGET_SPARC -D_KRTLD $(MODSUFFIX) MAPFILE = $(UTSBASE)/sparc/krtld/mapfile -LDFLAGS = -e _kobj_boot -M$(MAPFILE) \ - -Breduce -znoversion +LDFLAGS = -e _kobj_boot -M$(MAPFILE) $(BREDUCE) $(ZNOVERSION) # krtld uses a mapfile during the link to hide some symbols, thus changing # their scope from global to local. This will fool ctfmerge (it won't record diff --git a/usr/src/uts/sun4u/serengeti/unix/Makefile b/usr/src/uts/sun4u/serengeti/unix/Makefile index c67619c513..e909cd31e1 100644 --- a/usr/src/uts/sun4u/serengeti/unix/Makefile +++ b/usr/src/uts/sun4u/serengeti/unix/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -144,11 +144,6 @@ symcheck.targ: $(UNIX_O) $(MODSTUBS_O) $(LIBS) $(DTRACESTUBS) $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \ $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS) -#$(UNIX).glom: $(UNIX) -# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \ -# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX) -# $(POST_PROCESS) - $(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o diff --git a/usr/src/uts/sun4u/starcat/unix/Makefile b/usr/src/uts/sun4u/starcat/unix/Makefile index 5ff22b4727..9d1c3b50f5 100644 --- a/usr/src/uts/sun4u/starcat/unix/Makefile +++ b/usr/src/uts/sun4u/starcat/unix/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -144,11 +144,6 @@ symcheck.targ: $(UNIX_O) $(MODSTUBS_O) $(LIBS) $(DTRACESTUBS) $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \ $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS) -#$(UNIX).glom: $(UNIX) -# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \ -# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX) -# $(POST_PROCESS) - $(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o diff --git a/usr/src/uts/sun4u/starfire/unix/Makefile b/usr/src/uts/sun4u/starfire/unix/Makefile index 6c2ef99417..889cfa5b4d 100644 --- a/usr/src/uts/sun4u/starfire/unix/Makefile +++ b/usr/src/uts/sun4u/starfire/unix/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -138,11 +138,6 @@ symcheck: $(UNIX_O) $(MODSTUBS_O) $(LIBS) $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \ $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS) -#$(UNIX).glom: $(UNIX) -# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \ -# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX) -# $(POST_PROCESS) - $(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o diff --git a/usr/src/uts/sun4u/unix/Makefile b/usr/src/uts/sun4u/unix/Makefile index 78a49cd1bd..90535da2de 100644 --- a/usr/src/uts/sun4u/unix/Makefile +++ b/usr/src/uts/sun4u/unix/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -151,11 +151,6 @@ symcheck: $(UNIX_O) $(MODSTUBS_O) $(LIBS) $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \ $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS) -#$(UNIX).glom: $(UNIX) -# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \ -# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX) -# $(POST_PROCESS) - $(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o diff --git a/usr/src/uts/sun4v/unix/Makefile b/usr/src/uts/sun4v/unix/Makefile index 9cf746fa44..cc2f63dd7e 100644 --- a/usr/src/uts/sun4v/unix/Makefile +++ b/usr/src/uts/sun4v/unix/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -151,11 +151,6 @@ symcheck: $(UNIX_O) $(MODSTUBS_O) $(LIBS) $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \ $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS) -#$(UNIX).glom: $(UNIX) -# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \ -# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX) -# $(POST_PROCESS) - $(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o |