diff options
author | Robert Mustacchi <rm@joyent.com> | 2019-02-09 16:04:39 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2019-06-14 21:23:50 +0000 |
commit | 3e3ca1ce307a7d82ef007b435088f3f04a0f3e65 (patch) | |
tree | 94d2dd222877148ec18b7be18ff4f42f54cd084c | |
parent | 32106ed6e3cf48fafbdcc54953821f590bc7b50b (diff) | |
download | illumos-joyent-3e3ca1ce307a7d82ef007b435088f3f04a0f3e65.tar.gz |
10362 Catch kernel module undefined symbols at build time
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Gergő Doma <domag02@gmail.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r-- | exception_lists/mapfilechk | 4 | ||||
-rw-r--r-- | usr/src/uts/Makefile.mapfile | 43 | ||||
-rw-r--r-- | usr/src/uts/Makefile.targ | 2 | ||||
-rw-r--r-- | usr/src/uts/common/mapfiles/README | 68 | ||||
-rw-r--r-- | usr/src/uts/common/mapfiles/ddi.mapfile | 191 | ||||
-rw-r--r-- | usr/src/uts/common/mapfiles/dtrace.mapfile.awk | 34 | ||||
-rw-r--r-- | usr/src/uts/common/mapfiles/kernel.mapfile | 41 | ||||
-rw-r--r-- | usr/src/uts/common/mapfiles/mac.mapfile | 57 | ||||
-rw-r--r-- | usr/src/uts/common/mapfiles/random.mapfile | 37 | ||||
-rw-r--r-- | usr/src/uts/intel/e1000g/Makefile | 2 | ||||
-rw-r--r-- | usr/src/uts/intel/i40e/Makefile | 3 | ||||
-rw-r--r-- | usr/src/uts/intel/igb/Makefile | 2 | ||||
-rw-r--r-- | usr/src/uts/intel/ixgbe/Makefile | 2 |
13 files changed, 484 insertions, 2 deletions
diff --git a/exception_lists/mapfilechk b/exception_lists/mapfilechk index e86e60c09b..df5084caae 100644 --- a/exception_lists/mapfilechk +++ b/exception_lists/mapfilechk @@ -33,7 +33,7 @@ # # This file provides an exception mechanism for specifying files # that match this pattern that should be skipped. -# +# syntax: glob exception_lists/mapfilechk @@ -49,3 +49,5 @@ usr/src/cmd/perl/* usr/src/cmd/mklocale/* usr/src/tools/onbld/Checks/Mapfile* usr/src/tools/scripts/* +usr/src/uts/common/mapfiles/dtrace.mapfile.awk +usr/src/uts/Makefile.mapfile diff --git a/usr/src/uts/Makefile.mapfile b/usr/src/uts/Makefile.mapfile new file mode 100644 index 0000000000..fb40e1cab9 --- /dev/null +++ b/usr/src/uts/Makefile.mapfile @@ -0,0 +1,43 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +# +# This Makefile should be included in individual kernel modules to opt +# into a -z defs world. Note, this should be included after a MAPFILES +# entry is defined. See uts/common/README.mapfiles for more information. +# + +# +# Mapfile base +# +MAPBASE = $(UTSBASE)/common/mapfiles +DTRACE_MAPFILE = $(OBJS_DIR)/dtrace.mapfile + +# +# Always append -z defs to the LD FLAGS and append all mapfiles. +# +LDFLAGS += -z defs $(MAPFILES:%=-M $(MAPBASE)/%.mapfile) -M $(DTRACE_MAPFILE) + +# +# Definitions and rules to assemble the DTrace probe mapfile. There's no +# good way to automatically do this, hence we have a slightly gross +# series of automated tools. This does mean that we have a bit more work +# to do, but also means that probes can be added arbitrarily without +# having to manually edit mapfiles. +# +DTRACE_AWK_FILE = $(MAPBASE)/dtrace.mapfile.awk + +$(OBJS_DIR)/dtrace.mapfile: $(OBJECTS) $(DTRACE_AWK_FILE) + $(NM) -u $(OBJECTS) | $(AWK) -f $(DTRACE_AWK_FILE) > $@ diff --git a/usr/src/uts/Makefile.targ b/usr/src/uts/Makefile.targ index 93a2bcc5ae..80e4e7d115 100644 --- a/usr/src/uts/Makefile.targ +++ b/usr/src/uts/Makefile.targ @@ -50,7 +50,7 @@ $(OBJECTS): $(INLINES) # Partially link .o files to generate the kmod. The fake dependency # on modstubs simplifies things... # -$(BINARY): $(OBJECTS) +$(BINARY): $(OBJECTS) $(DTRACE_MAPFILE) $(LD) -r $(LDFLAGS) -o $@ $(OBJECTS) $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX) $(POST_PROCESS) diff --git a/usr/src/uts/common/mapfiles/README b/usr/src/uts/common/mapfiles/README new file mode 100644 index 0000000000..5e8a455284 --- /dev/null +++ b/usr/src/uts/common/mapfiles/README @@ -0,0 +1,68 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +Kernel Module Build Time Symbol Verification +-------------------------------------------- + +Historically, kernel modules have all been built as relocatable objects. +They are not dynamic objects and dependency information is always noted +in individual makefiles. Along with this, there has never been any +verification of the symbols that are being used. This means that it's +possible for a kernel module author to refer to a symbol that doesn't +exist and not find out until they try to install the module. + +To help find these problems at build time, we provide an opt-in system +for modules to use, leveraging the link-editor's '-z defs' option. This +option ensures that there are no unknown definitons at link-edit time. +To supply these definitions we supply a series of mapfiles in this +directory. + +These mapfiles are not the traditional versioning mapfiles like those in +usr/src/lib/README.mapfiles! Please review the following differences +closely: + +* These mapfiles do not declare any versions! +* These mapfiles do not use the 'SYMBOL_VERSION' directive, instead they + use the 'SYMBOL_SCOPE' directive. +* These mapfiles do not hide symbols! Library mapfiles always have + something to catch all local symbols. That should *never* be used + here. These mapfiles should not affect visibility. +* All symbols in these mapfiles should be marked 'EXTERN' to indicate + that they are not provided by the kernel module but by another. +* These mapfiles do not declare what is or isn't a public interface, + though they are often grouped around interfaces, to make it easier for + a driver author to get this right. + +Mapfiles are organized based on kernel module. For example the GLDv3 +device driver interface is provided by the 'mac' module and thus is +found in the file 'mac.mapfile'. The DDI is currently in the 'ddi' +mapfile. Functions that are found in genunix and unix that aren't in +the DDI should not be put in that mapfile. + +Note, the existing files may not be complete. These are intended to only +have the public interfaces provided by modules and thus should not +include every symbol in them. As the need arises, add new symbols or +modules as appropriate. + +To opt a module into this, first declare a series of MAPFILES that they +should check against in the module. This should be a series of one or +more files, for example: + +MAPFILES += ddi mac + +Next, you should add an include of Makefile.mapfile right before you +include Makefile.targ. You can do this with the following line: + +include $(UTSBASE)/Makefile.mapfile diff --git a/usr/src/uts/common/mapfiles/ddi.mapfile b/usr/src/uts/common/mapfiles/ddi.mapfile new file mode 100644 index 0000000000..5a124766e2 --- /dev/null +++ b/usr/src/uts/common/mapfiles/ddi.mapfile @@ -0,0 +1,191 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object scoping must comply with the rules detailed in +# +# usr/src/uts/common/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 +# + +# +# This file contains core functions provided by the DDI and also items +# required as part of the platform's runime ABI (think compiler +# functions). +# + +$mapfile_version 2 + +SYMBOL_SCOPE { + global: + __divdi3 { FLAGS = EXTERN }; + __stack_chk_fail { FLAGS = EXTERN }; + __stack_chk_guard { FLAGS = EXTERN }; + allocb { FLAGS = EXTERN }; + assfail { FLAGS = EXTERN }; + assfail3 { FLAGS = EXTERN }; + atomic_dec_32_nv { FLAGS = EXTERN }; + bcmp { FLAGS = EXTERN }; + bcopy { FLAGS = EXTERN }; + bzero { FLAGS = EXTERN }; + cmn_err { FLAGS = EXTERN }; + cv_broadcast { FLAGS = EXTERN }; + cv_destroy { FLAGS = EXTERN }; + cv_init { FLAGS = EXTERN }; + cv_reltimedwait { FLAGS = EXTERN }; + ddi_cb_register { FLAGS = EXTERN }; + ddi_cb_unregister { FLAGS = EXTERN }; + ddi_dev_regsize { FLAGS = EXTERN }; + ddi_dma_addr_bind_handle { FLAGS = EXTERN }; + ddi_dma_alloc_handle { FLAGS = EXTERN }; + ddi_dma_free_handle { FLAGS = EXTERN }; + ddi_dma_mem_alloc { FLAGS = EXTERN }; + ddi_dma_mem_free { FLAGS = EXTERN }; + ddi_dma_nextcookie { FLAGS = EXTERN }; + ddi_dma_sync { FLAGS = EXTERN }; + ddi_dma_unbind_handle { FLAGS = EXTERN }; + ddi_fls { FLAGS = EXTERN }; + ddi_fm_acc_err_clear { FLAGS = EXTERN }; + ddi_fm_acc_err_get { FLAGS = EXTERN }; + ddi_fm_dma_err_get { FLAGS = EXTERN }; + ddi_fm_ereport_post { FLAGS = EXTERN }; + ddi_fm_fini { FLAGS = EXTERN }; + ddi_fm_handler_register { FLAGS = EXTERN }; + ddi_fm_handler_unregister { FLAGS = EXTERN }; + ddi_fm_init { FLAGS = EXTERN }; + ddi_fm_service_impact { FLAGS = EXTERN }; + ddi_get_driver_private { FLAGS = EXTERN }; + ddi_get_instance { FLAGS = EXTERN }; + ddi_get_lbolt { FLAGS = EXTERN }; + ddi_get_lbolt64 { FLAGS = EXTERN }; + ddi_get_name { FLAGS = EXTERN }; + ddi_get_parent { FLAGS = EXTERN }; + ddi_get16 { FLAGS = EXTERN }; + ddi_get32 { FLAGS = EXTERN }; + ddi_get64 { FLAGS = EXTERN }; + ddi_intr_add_handler { FLAGS = EXTERN }; + ddi_intr_alloc { FLAGS = EXTERN }; + ddi_intr_block_disable { FLAGS = EXTERN }; + ddi_intr_block_enable { FLAGS = EXTERN }; + ddi_intr_disable { FLAGS = EXTERN }; + ddi_intr_enable { FLAGS = EXTERN }; + ddi_intr_free { FLAGS = EXTERN }; + ddi_intr_get_cap { FLAGS = EXTERN }; + ddi_intr_get_navail { FLAGS = EXTERN }; + ddi_intr_get_nintrs { FLAGS = EXTERN }; + ddi_intr_get_pri { FLAGS = EXTERN }; + ddi_intr_get_supported_types { FLAGS = EXTERN }; + ddi_intr_remove_handler { FLAGS = EXTERN }; + ddi_periodic_add { FLAGS = EXTERN }; + ddi_periodic_delete { FLAGS = EXTERN }; + ddi_power { FLAGS = EXTERN }; + ddi_prop_free { FLAGS = EXTERN }; + ddi_prop_get_int { FLAGS = EXTERN }; + ddi_prop_lookup_int_array { FLAGS = EXTERN }; + ddi_prop_op { FLAGS = EXTERN }; + ddi_prop_remove_all { FLAGS = EXTERN }; + ddi_prop_update_int_array { FLAGS = EXTERN }; + ddi_prop_update_string { FLAGS = EXTERN }; + ddi_ptob { FLAGS = EXTERN }; + ddi_put16 { FLAGS = EXTERN }; + ddi_put32 { FLAGS = EXTERN }; + ddi_quiesce_not_supported { FLAGS = EXTERN }; + ddi_regs_map_free { FLAGS = EXTERN }; + ddi_regs_map_setup { FLAGS = EXTERN }; + ddi_set_driver_private { FLAGS = EXTERN }; + ddi_strtol { FLAGS = EXTERN }; + ddi_taskq_create { FLAGS = EXTERN }; + ddi_taskq_destroy { FLAGS = EXTERN }; + ddi_taskq_dispatch { FLAGS = EXTERN }; + delay { FLAGS = EXTERN }; + desballoc { FLAGS = EXTERN }; + dev_err { FLAGS = EXTERN }; + drv_usectohz { FLAGS = EXTERN }; + drv_usecwait { FLAGS = EXTERN }; + fm_ena_generate { FLAGS = EXTERN }; + freeb { FLAGS = EXTERN }; + freemsg { FLAGS = EXTERN }; + freemsgchain { FLAGS = EXTERN }; + gethrtime { FLAGS = EXTERN }; + kmem_alloc { FLAGS = EXTERN }; + kmem_free { FLAGS = EXTERN }; + kmem_zalloc { FLAGS = EXTERN }; + kstat_create { FLAGS = EXTERN }; + kstat_delete { FLAGS = EXTERN }; + kstat_install { FLAGS = EXTERN }; + kstat_named_init { FLAGS = EXTERN }; + list_create { FLAGS = EXTERN }; + list_destroy { FLAGS = EXTERN }; + list_head { FLAGS = EXTERN }; + list_insert_tail { FLAGS = EXTERN }; + list_next { FLAGS = EXTERN }; + list_remove { FLAGS = EXTERN }; + memcpy { FLAGS = EXTERN }; + memset { FLAGS = EXTERN }; + miocack { FLAGS = EXTERN }; + miocnak { FLAGS = EXTERN }; + mod_driverops { FLAGS = EXTERN }; + mod_info { FLAGS = EXTERN }; + mod_install { FLAGS = EXTERN }; + mod_remove { FLAGS = EXTERN }; + msgpullup { FLAGS = EXTERN }; + msgsize { FLAGS = EXTERN }; + mutex_destroy { FLAGS = EXTERN }; + mutex_enter { FLAGS = EXTERN }; + mutex_exit { FLAGS = EXTERN }; + mutex_init { FLAGS = EXTERN }; + mutex_owned { FLAGS = EXTERN }; + mutex_tryenter { FLAGS = EXTERN }; + nochpoll { FLAGS = EXTERN }; + nodev { FLAGS = EXTERN }; + nulldev { FLAGS = EXTERN }; + panic { FLAGS = EXTERN }; + pci_config_get16 { FLAGS = EXTERN }; + pci_config_get32 { FLAGS = EXTERN }; + pci_config_get64 { FLAGS = EXTERN }; + pci_config_get8 { FLAGS = EXTERN }; + pci_config_put16 { FLAGS = EXTERN }; + pci_config_put32 { FLAGS = EXTERN }; + pci_config_put64 { FLAGS = EXTERN }; + pci_config_put8 { FLAGS = EXTERN }; + pci_config_setup { FLAGS = EXTERN }; + pci_config_teardown { FLAGS = EXTERN }; + pci_ereport_post { FLAGS = EXTERN }; + pci_ereport_setup { FLAGS = EXTERN }; + pci_ereport_teardown { FLAGS = EXTERN }; + pci_lcap_locate { FLAGS = EXTERN }; + qreply { FLAGS = EXTERN }; + rw_destroy { FLAGS = EXTERN }; + rw_enter { FLAGS = EXTERN }; + rw_exit { FLAGS = EXTERN }; + rw_init { FLAGS = EXTERN }; + snprintf { FLAGS = EXTERN }; + sprintf { FLAGS = EXTERN }; + strcat { FLAGS = EXTERN }; + strcmp { FLAGS = EXTERN }; + strcpy { FLAGS = EXTERN }; + strlen { FLAGS = EXTERN }; + timeout { FLAGS = EXTERN }; + untimeout { FLAGS = EXTERN }; + vsnprintf { FLAGS = EXTERN }; + vsprintf { FLAGS = EXTERN }; +}; diff --git a/usr/src/uts/common/mapfiles/dtrace.mapfile.awk b/usr/src/uts/common/mapfiles/dtrace.mapfile.awk new file mode 100644 index 0000000000..b8a7e2d372 --- /dev/null +++ b/usr/src/uts/common/mapfiles/dtrace.mapfile.awk @@ -0,0 +1,34 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +# +# This script is designed to assemble a mapfile for DTrace probes. +# +BEGIN { + print "#" + print "# This file is autogenerated by dtrace.mapfile.awk" + print "#" + print "$mapfile_version 2" + print "SYMBOL_SCOPE {" + print " global:" +} + +/__dtrace_probe_/ { + printf "\t%s\t{ FLAGS = EXTERN };\n", $1 +} + +END { + print "};" +} diff --git a/usr/src/uts/common/mapfiles/kernel.mapfile b/usr/src/uts/common/mapfiles/kernel.mapfile new file mode 100644 index 0000000000..6bddb3c7ef --- /dev/null +++ b/usr/src/uts/common/mapfiles/kernel.mapfile @@ -0,0 +1,41 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object scoping must comply with the rules detailed in +# +# usr/src/uts/common/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 +# + +# +# This file contains functions provided by the kernel that various +# modules use. This is a combination of things in both unix and genunix. +# + +$mapfile_version 2 + +SYMBOL_SCOPE { + global: + bt_getlowbit { FLAGS = EXTERN }; + servicing_interrupt { FLAGS = EXTERN }; +}; diff --git a/usr/src/uts/common/mapfiles/mac.mapfile b/usr/src/uts/common/mapfiles/mac.mapfile new file mode 100644 index 0000000000..d40c09b311 --- /dev/null +++ b/usr/src/uts/common/mapfiles/mac.mapfile @@ -0,0 +1,57 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2017, Joyent, Inc. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object scoping must comply with the rules detailed in +# +# usr/src/uts/common/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 +# + +$mapfile_version 2 + +SYMBOL_SCOPE { + global: + mac_alloc { FLAGS = EXTERN }; + mac_fini_ops { FLAGS = EXTERN }; + mac_free { FLAGS = EXTERN }; + mac_hcksum_get { FLAGS = EXTERN }; + mac_hcksum_set { FLAGS = EXTERN }; + mac_init_ops { FLAGS = EXTERN }; + mac_link_update { FLAGS = EXTERN }; + mac_lso_get { FLAGS = EXTERN }; + mac_maxsdu_update { FLAGS = EXTERN }; + mac_prop_info_set_default_link_flowctrl { FLAGS = EXTERN }; + mac_prop_info_set_default_str { FLAGS = EXTERN }; + mac_prop_info_set_default_uint8 { FLAGS = EXTERN }; + mac_prop_info_set_perm { FLAGS = EXTERN }; + mac_prop_info_set_range_uint32 { FLAGS = EXTERN }; + mac_ring_intr_set { FLAGS = EXTERN }; + mac_register { FLAGS = EXTERN }; + mac_rx { FLAGS = EXTERN }; + mac_rx_ring { FLAGS = EXTERN }; + mac_transceiver_info_set_present { FLAGS = EXTERN }; + mac_transceiver_info_set_usable { FLAGS = EXTERN }; + mac_tx_ring_update { FLAGS = EXTERN }; + mac_tx_update { FLAGS = EXTERN }; + mac_unregister { FLAGS = EXTERN }; +}; diff --git a/usr/src/uts/common/mapfiles/random.mapfile b/usr/src/uts/common/mapfiles/random.mapfile new file mode 100644 index 0000000000..d3d8bc89fa --- /dev/null +++ b/usr/src/uts/common/mapfiles/random.mapfile @@ -0,0 +1,37 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object scoping must comply with the rules detailed in +# +# usr/src/uts/common/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 +# + +$mapfile_version 2 + +SYMBOL_SCOPE { + global: + random_get_bytes { FLAGS = EXTERN }; + random_get_blocking_bytes { FLAGS = EXTERN }; + random_get_pseudo_bytes { FLAGS = EXTERN }; +}; diff --git a/usr/src/uts/intel/e1000g/Makefile b/usr/src/uts/intel/e1000g/Makefile index 9a82a0e698..d48b8f77a0 100644 --- a/usr/src/uts/intel/e1000g/Makefile +++ b/usr/src/uts/intel/e1000g/Makefile @@ -80,6 +80,7 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # Driver depends on MAC # LDFLAGS += -dy -N misc/mac +MAPFILES += ddi mac # # Default build targets. @@ -106,4 +107,5 @@ install: $(INSTALL_DEPS) # # Include common targets. # +include $(UTSBASE)/Makefile.mapfile include $(UTSBASE)/intel/Makefile.targ diff --git a/usr/src/uts/intel/i40e/Makefile b/usr/src/uts/intel/i40e/Makefile index dd7a4940a6..06cb47cba3 100644 --- a/usr/src/uts/intel/i40e/Makefile +++ b/usr/src/uts/intel/i40e/Makefile @@ -48,6 +48,8 @@ SMOFF += all_func_returns LDFLAGS += -dy -N misc/mac +MAPFILES += ddi mac random + .KEEP_STATE: def: $(DEF_DEPS) @@ -66,4 +68,5 @@ clean.lint: $(CLEAN_LINT_DEPS) install: $(INSTALL_DEPS) +include $(UTSBASE)/Makefile.mapfile include $(UTSBASE)/intel/Makefile.targ diff --git a/usr/src/uts/intel/igb/Makefile b/usr/src/uts/intel/igb/Makefile index da31ce8a0a..1f6864efbe 100644 --- a/usr/src/uts/intel/igb/Makefile +++ b/usr/src/uts/intel/igb/Makefile @@ -69,6 +69,7 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # Driver depends on MAC # LDFLAGS += -dy -N misc/mac +MAPFILES += ddi mac random # # Default build targets. @@ -94,4 +95,5 @@ install: $(INSTALL_DEPS) # # Include common targets. # +include $(UTSBASE)/Makefile.mapfile include $(UTSBASE)/intel/Makefile.targ diff --git a/usr/src/uts/intel/ixgbe/Makefile b/usr/src/uts/intel/ixgbe/Makefile index 4b4cc45f6e..f19f151d60 100644 --- a/usr/src/uts/intel/ixgbe/Makefile +++ b/usr/src/uts/intel/ixgbe/Makefile @@ -75,6 +75,7 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # Driver depends on MAC # LDFLAGS += -dy -N misc/mac +MAPFILES += ddi mac random kernel # # Default build targets. @@ -100,4 +101,5 @@ install: $(INSTALL_DEPS) # # Include common targets. # +include $(UTSBASE)/Makefile.mapfile include $(UTSBASE)/intel/Makefile.targ |