From patchwork Sun Aug 19 02:56:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 1343801 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1FE1EDF25A for ; Sun, 19 Aug 2012 03:15:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754548Ab2HSC6i (ORCPT ); Sat, 18 Aug 2012 22:58:38 -0400 Received: from mga03.intel.com ([143.182.124.21]:51768 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752954Ab2HSC51 (ORCPT ); Sat, 18 Aug 2012 22:57:27 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 18 Aug 2012 19:57:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.77,792,1336374000"; d="scan'208";a="182675624" Received: from tassilo.jf.intel.com ([10.7.201.151]) by azsmga001.ch.intel.com with ESMTP; 18 Aug 2012 19:57:25 -0700 Received: by tassilo.jf.intel.com (Postfix, from userid 501) id 5E87224198D; Sat, 18 Aug 2012 19:57:25 -0700 (PDT) From: Andi Kleen To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, mmarek@suse.cz, linux-kbuild@vger.kernel.org, JBeulich@suse.com, akpm@linux-foundation.org, Andi Kleen Subject: [PATCH 27/74] lto: Mark EXPORT_SYMBOL symbols __visible Date: Sat, 18 Aug 2012 19:56:23 -0700 Message-Id: <1345345030-22211-28-git-send-email-andi@firstfloor.org> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1345345030-22211-1-git-send-email-andi@firstfloor.org> References: <1345345030-22211-1-git-send-email-andi@firstfloor.org> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Andi Kleen Signed-off-by: Andi Kleen --- include/linux/export.h | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/linux/export.h b/include/linux/export.h index 696c0f4..784617e 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -47,7 +47,7 @@ extern struct module __this_module; /* For every exported symbol, place a struct in the __ksymtab section */ #define __EXPORT_SYMBOL(sym, sec) \ - extern typeof(sym) sym; \ + extern typeof(sym) sym __visible; \ __CRC_SYMBOL(sym, sec) \ static const char __kstrtab_##sym[] \ __attribute__((section("__ksymtab_strings"), aligned(1))) \ @@ -78,11 +78,13 @@ extern struct module __this_module; #else /* !CONFIG_MODULES... */ -#define EXPORT_SYMBOL(sym) -#define EXPORT_SYMBOL_GPL(sym) -#define EXPORT_SYMBOL_GPL_FUTURE(sym) -#define EXPORT_UNUSED_SYMBOL(sym) -#define EXPORT_UNUSED_SYMBOL_GPL(sym) +/* Even without modules keep the __visible side effect */ + +#define EXPORT_SYMBOL(sym) extern typeof(sym) sym __visible +#define EXPORT_SYMBOL_GPL(sym) extern typeof(sym) sym __visible +#define EXPORT_SYMBOL_GPL_FUTURE(sym) extern typeof(sym) sym __visible +#define EXPORT_UNUSED_SYMBOL(sym) extern typeof(sym) sym __visible +#define EXPORT_UNUSED_SYMBOL_GPL(sym) extern typeof(sym) sym __visible #endif /* CONFIG_MODULES */