summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-02-19 18:56:25 +0000
committerGitHub <noreply@github.com>2020-02-19 18:56:25 +0000
commitdd712f24b7ebd3fb87031dcc089f9198928b2338 (patch)
tree630136ddb899e73f11b49294295eec6cccb15c80 /usr/src/lib
parent77d478ddacb21ab351a7726510b1d81236125173 (diff)
downloadillumos-joyent-dd712f24b7ebd3fb87031dcc089f9198928b2338.tar.gz
OS-8113 enable ld guidance (#262)
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/brand/jcommon/Makefile4
-rw-r--r--usr/src/lib/brand/lx/librtld_db/Makefile.com15
-rw-r--r--usr/src/lib/brand/lx/librtld_db/amd64/Makefile4
-rw-r--r--usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers44
-rw-r--r--usr/src/lib/brand/lx/librtld_db/common/mapfile-vers58
-rw-r--r--usr/src/lib/brand/lx/lx_brand/Makefile.com8
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/mapfile47
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/mapfile-vers9
-rw-r--r--usr/src/lib/fm/libfmd_snmp/Makefile.com2
-rw-r--r--usr/src/lib/libbunyan/Makefile.com4
-rw-r--r--usr/src/lib/libdladm/Makefile.com4
-rw-r--r--usr/src/lib/libsmartsshd/Makefile.com4
-rw-r--r--usr/src/lib/varpd/direct/Makefile.com4
-rw-r--r--usr/src/lib/varpd/files/Makefile.com4
-rw-r--r--usr/src/lib/varpd/svp/Makefile.com4
15 files changed, 35 insertions, 180 deletions
diff --git a/usr/src/lib/brand/jcommon/Makefile b/usr/src/lib/brand/jcommon/Makefile
index d6ca5fb229..59bc0de644 100644
--- a/usr/src/lib/brand/jcommon/Makefile
+++ b/usr/src/lib/brand/jcommon/Makefile
@@ -8,7 +8,7 @@
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
PROGS = cattach cdetach cinstall cuninstall libhooks.ksh \
@@ -23,4 +23,6 @@ clean:
clobber:
$(RM) $(ROOTPROGS)
+all:
+
install: $(ROOTPROGS)
diff --git a/usr/src/lib/brand/lx/librtld_db/Makefile.com b/usr/src/lib/brand/lx/librtld_db/Makefile.com
index 3f2645f157..0237de1cc3 100644
--- a/usr/src/lib/brand/lx/librtld_db/Makefile.com
+++ b/usr/src/lib/brand/lx/librtld_db/Makefile.com
@@ -23,7 +23,7 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
LIBRARY = lx_librtld_db.a
VERS = .1
@@ -49,7 +49,8 @@ UTSBASE = $(SRC)/uts
# brand plugin library can use to access a target process are the
# proc_service(3PROC) apis.
#
-DYNFLAGS += $(VERSREF) -M../common/mapfile-vers
+MAPFILES = $(BRAND_SHARED)/librtld_db/common/mapfile-vers
+DYNFLAGS += $(VERSREF)
LIBS = $(DYNLIB)
LDLIBS += -lc -lrtld_db
CFLAGS += $(CCVERBOSE)
@@ -65,10 +66,10 @@ ROOTLIBDIR = $(ROOT)/usr/lib/brand/lx
ROOTLIBDIR64 = $(ROOT)/usr/lib/brand/lx/$(MACH64)
#
-# The top level Makefiles define define TEXT_DOMAIN. But librtld_db.so.1
-# isn't internationalized and this library won't be either. The only
-# messages that this library can generate are messages used for debugging
-# the operation of the library itself.
+# The top level Makefiles define TEXT_DOMAIN. But librtld_db.so.1 isn't
+# internationalized and this library won't be either. The only messages that
+# this library can generate are messages used for debugging the operation of the
+# library itself.
#
DTEXTDOM =
@@ -76,8 +77,6 @@ DTEXTDOM =
all: $(LIBS)
-lint: lintcheck
-
pics/%64.o: ../common/%.c
$(COMPILE.c) -D_ELF64 $(PICFLAGS) -o $@ $<
$(POST_PROCESS_O)
diff --git a/usr/src/lib/brand/lx/librtld_db/amd64/Makefile b/usr/src/lib/brand/lx/librtld_db/amd64/Makefile
index 726e7ef6d3..bdef5f5adb 100644
--- a/usr/src/lib/brand/lx/librtld_db/amd64/Makefile
+++ b/usr/src/lib/brand/lx/librtld_db/amd64/Makefile
@@ -23,7 +23,7 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright 2020 Joyent, Inc.
#
COBJS64 = lx_librtld_db64.o
@@ -31,8 +31,6 @@ COBJS64 = lx_librtld_db64.o
include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
-DYNFLAGS += -Mmapfile-vers
-
CLOBBERFILES = $(ROOTLIBDIR64)/$(DYNLIB)
install: all $(ROOTLIBS64)
diff --git a/usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers b/usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers
deleted file mode 100644
index 4893b02998..0000000000
--- a/usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-SUNWprivate_1.1 {
- global:
- rtld_db_brand_ops64;
-};
diff --git a/usr/src/lib/brand/lx/librtld_db/common/mapfile-vers b/usr/src/lib/brand/lx/librtld_db/common/mapfile-vers
deleted file mode 100644
index 5e328d6075..0000000000
--- a/usr/src/lib/brand/lx/librtld_db/common/mapfile-vers
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-{
- global:
- rtld_db_brand_ops32;
- local:
- *;
-};
-
-#Externally defined symbols
-{
- global:
- ps_pauxv = NODIRECT PARENT;
- ps_pdmodel = NODIRECT PARENT;
- ps_pglobal_lookup = NODIRECT PARENT;
- ps_pglobal_sym = NODIRECT PARENT;
- ps_plog = NODIRECT PARENT;
- ps_pread = NODIRECT PARENT;
- ps_pwrite = NODIRECT PARENT;
-};
diff --git a/usr/src/lib/brand/lx/lx_brand/Makefile.com b/usr/src/lib/brand/lx/lx_brand/Makefile.com
index 01fe63d70e..f506fc49fc 100644
--- a/usr/src/lib/brand/lx/lx_brand/Makefile.com
+++ b/usr/src/lib/brand/lx/lx_brand/Makefile.com
@@ -21,7 +21,7 @@
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LX_CMN = $(SRC)/common/brand/lx
@@ -69,14 +69,16 @@ SRCDIR = ../common
UTSBASE = ../../../../../uts
LIBS = $(DYNLIB)
-LDLIBS += -lc -lsocket -lmapmalloc -lproc -lrtld_db -lrpcsvc -lnsl
+LDLIBS += -lmapmalloc -lsocket -lproc -lrtld_db -lrpcsvc -lnsl -lc
DYNFLAGS += $(DYNFLAGS_$(CLASS))
-DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start -M../common/mapfile
+DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I. -I../ -I$(UTSBASE)/common/brand/lx -I$(LX_CMN)
ASFLAGS = -P $(ASFLAGS_$(CURTYPE)) -D_ASM -I../ \
-I$(UTSBASE)/common/brand/lx
+ZGUIDANCE = -zguidance=nounused
+
# not linted
SMATCH=off
diff --git a/usr/src/lib/brand/lx/lx_brand/common/mapfile b/usr/src/lib/brand/lx/lx_brand/common/mapfile
deleted file mode 100644
index 0663f4bc19..0000000000
--- a/usr/src/lib/brand/lx/lx_brand/common/mapfile
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-#
-# Scope everything local -- our .init section is our only public interface.
-#
-{
- local:
- *;
-};
diff --git a/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers b/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers
index 0663f4bc19..9d2712a12f 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers
+++ b/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers
@@ -20,8 +20,9 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright 2020 Joyent, Inc.
#
#
@@ -38,10 +39,12 @@
# MAPFILE HEADER END
#
+$mapfile_version 2
+
#
# Scope everything local -- our .init section is our only public interface.
#
-{
+SYMBOL_SCOPE {
local:
*;
};
diff --git a/usr/src/lib/fm/libfmd_snmp/Makefile.com b/usr/src/lib/fm/libfmd_snmp/Makefile.com
index 99dd888363..e0abeeef0d 100644
--- a/usr/src/lib/fm/libfmd_snmp/Makefile.com
+++ b/usr/src/lib/fm/libfmd_snmp/Makefile.com
@@ -53,7 +53,7 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
-SNMPLIBS = -lnetsnmp -lnetsnmpagent
+SNMPLIBS = -lnetsnmp -lnetsnmpagent -lnetsnmphelpers
NATIVE_LIBS += libnetsnmp.so libnetsnmpagent.so
LDLIBS += $(MACH_LDLIBS)
diff --git a/usr/src/lib/libbunyan/Makefile.com b/usr/src/lib/libbunyan/Makefile.com
index 5214915c56..d0d00bf0e5 100644
--- a/usr/src/lib/libbunyan/Makefile.com
+++ b/usr/src/lib/libbunyan/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright (c) 2014 Joyent, Inc. All rights reserved.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libbunyan.a
@@ -21,7 +21,7 @@ USDT_PROVIDERS = bunyan_provider.d
include ../../Makefile.lib
LIBS = $(DYNLIB) $(LINTLIB)
-LDLIBS += -lc -lumem -lnvpair -lnsl
+LDLIBS += -lc -lumem -lnvpair
CPPFLAGS += -I../common -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
SRCDIR = ../common
diff --git a/usr/src/lib/libdladm/Makefile.com b/usr/src/lib/libdladm/Makefile.com
index d3d811b265..348061cb54 100644
--- a/usr/src/lib/libdladm/Makefile.com
+++ b/usr/src/lib/libdladm/Makefile.com
@@ -20,7 +20,7 @@
#
#
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libdladm.a
@@ -38,7 +38,7 @@ include ../../Makefile.rootfs
LIBS = $(DYNLIB) $(LINTLIB)
LDLIBS += -ldevinfo -lc -linetutil -lsocket -lscf -lrcm -lnvpair \
- -lexacct -lnsl -lkstat -lpool -lvarpd
+ -lexacct -lkstat -lpool -lvarpd
SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libsmartsshd/Makefile.com b/usr/src/lib/libsmartsshd/Makefile.com
index 1c189a88d8..b9c5b88f23 100644
--- a/usr/src/lib/libsmartsshd/Makefile.com
+++ b/usr/src/lib/libsmartsshd/Makefile.com
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright 2016 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY= libsmartsshd.a
@@ -33,7 +33,7 @@ SRCS = $(OBJECTS:%.o=$(SRCDIR)/%.c)
CPPFLAGS += -I$(SRCDIR) -D_REENTRANT -D_FILE_OFFSET_BITS=64
LIBS = $(DYNLIB) $(LINTLIB)
-LDLIBS += -lc -ldoor -lmd5
+LDLIBS += -lc -lmd5
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/varpd/direct/Makefile.com b/usr/src/lib/varpd/direct/Makefile.com
index 4072c9a0ab..c9baf53cd4 100644
--- a/usr/src/lib/varpd/direct/Makefile.com
+++ b/usr/src/lib/varpd/direct/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright 2015 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libvarpd_direct.a
@@ -21,7 +21,7 @@ include ../../../Makefile.lib
include ../../Makefile.plugin
LIBS = $(DYNLIB)
-LDLIBS += -lc -lumem -lnvpair -lnsl
+LDLIBS += -lc -lumem -lnvpair
CPPFLAGS += -I../common
C99MODE= -xc99=%all
diff --git a/usr/src/lib/varpd/files/Makefile.com b/usr/src/lib/varpd/files/Makefile.com
index cdd4d019a4..dd8009d002 100644
--- a/usr/src/lib/varpd/files/Makefile.com
+++ b/usr/src/lib/varpd/files/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright 2018 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libvarpd_files.a
@@ -22,7 +22,7 @@ include ../../../Makefile.lib
include ../../Makefile.plugin
LIBS = $(DYNLIB)
-LDLIBS += -lc -lumem -lnvpair -lsocket -lnsl -lcustr
+LDLIBS += -lc -lumem -lnvpair -lsocket -lcustr
CPPFLAGS += -I../common
LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
diff --git a/usr/src/lib/varpd/svp/Makefile.com b/usr/src/lib/varpd/svp/Makefile.com
index 15b6540e74..d5e6d73144 100644
--- a/usr/src/lib/varpd/svp/Makefile.com
+++ b/usr/src/lib/varpd/svp/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright 2015 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libvarpd_svp.a
@@ -34,7 +34,7 @@ LIBS = $(DYNLIB)
# functions and better to use that then compile list.o yet again
# ourselves... probably.
#
-LDLIBS += -lc -lumem -lnvpair -lsocket -lnsl -lavl \
+LDLIBS += -lc -lumem -lnvpair -lsocket -lavl \
-lcmdutils -lidspace -lbunyan
CPPFLAGS += -I../common