From owner-svn-src-head@FreeBSD.ORG Wed Jul 2 08:49:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CBF2713; Wed, 2 Jul 2014 08:49:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19E16293D; Wed, 2 Jul 2014 08:49:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s628n6e8032406; Wed, 2 Jul 2014 08:49:06 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s628n68d032404; Wed, 2 Jul 2014 08:49:06 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407020849.s628n68d032404@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 2 Jul 2014 08:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268138 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 08:49:07 -0000 Author: hselasky Date: Wed Jul 2 08:49:06 2014 New Revision: 268138 URL: http://svnweb.freebsd.org/changeset/base/268138 Log: Add support for empty data sets. Data set begin and end pointers should resolve to "NULL" when not present. This is done by declaring the data set begin and end symbols as "weak". Modified: head/sys/sys/linker_set.h Modified: head/sys/sys/linker_set.h ============================================================================== --- head/sys/sys/linker_set.h Wed Jul 2 08:45:26 2014 (r268137) +++ head/sys/sys/linker_set.h Wed Jul 2 08:49:06 2014 (r268138) @@ -79,9 +79,9 @@ /* * Initialize before referring to a given linker set. */ -#define SET_DECLARE(set, ptype) \ - extern ptype *__CONCAT(__start_set_,set); \ - extern ptype *__CONCAT(__stop_set_,set) +#define SET_DECLARE(set, ptype) \ + extern ptype __weak *__CONCAT(__start_set_,set); \ + extern ptype __weak *__CONCAT(__stop_set_,set) #define SET_BEGIN(set) \ (&__CONCAT(__start_set_,set))