From patchwork Mon Oct 31 15:52:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Zaman X-Patchwork-Id: 9405757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7889E601C0 for ; Mon, 31 Oct 2016 15:53:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BAD629332 for ; Mon, 31 Oct 2016 15:53:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6007729334; Mon, 31 Oct 2016 15:53:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from emsm-gh1-uea10.nsa.gov (smtp.nsa.gov [8.44.101.8]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A383529332 for ; Mon, 31 Oct 2016 15:53:31 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.31,575,1473120000"; d="scan'208";a="438862" IronPort-PHdr: =?us-ascii?q?9a23=3A5DzggRK+4dFb21MZMdmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgULvvxwZ3uMQTl6Ol3ixeRBMOAuqgC1Lud7f+ocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIs?= =?us-ascii?q?YL+kQMiN3o/piKibwN76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKK?= =?us-ascii?q?x8zGJsIk+PzV6nvp/jtKN592xsn95pt4sZCeSpN5g/GKdVCDUgLnAd+NzgtR6F?= =?us-ascii?q?SxCGoHQbTDY4iB1NVirM9xb8FqX4tyL8/r5/0TKdO+XuQKo6WDKj6KEtQxjt3n?= =?us-ascii?q?RUfwUl+X3a35QjxJlQpwis8lkmm4M=3D?= X-IPAS-Result: =?us-ascii?q?A2FSBgBNaBdY/wHyM5BcHgYMgxQWAQEBAQEfgUoLunAmgXu?= =?us-ascii?q?GFlMBAQEBAQEBAQIBAl8ogjMEAxMFeVs/AQQCDygGAQEMIAwCAwkCFykICAMBL?= =?us-ascii?q?QMBBQELHwsFGAQBiDIBomOBMj8yil+FMAEBBYg1CBCEG4sAEQFohRSPSIpVkDJ?= =?us-ascii?q?liH0lhXkCj1ExgRFUUgYIgxSCC2UBhV94gTEBAQE?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 31 Oct 2016 15:53:29 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u9VFqegI001254; Mon, 31 Oct 2016 11:52:52 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u9VFqbW8245591 for ; Mon, 31 Oct 2016 11:52:37 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u9VFqbkL001250 for ; Mon, 31 Oct 2016 11:52:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1BoAwCTaBdYdMLAVdFcHQEFAQsBgxQWAQEBAQGBaQu2Y4QWhiOCC1MBAgEBAQEBAhMBCgsUG4UXARUuAQE3AYEUAQUBNSKIMgGiZIEyPzKKX4UwAQEFiAwBAQgfCBCEG4t6ggALgwmPSIpVkDJliH2GHgKPUTGBEYEmBgiDFIILZQGICAEBAQ X-IPAS-Result: A1BoAwCTaBdYdMLAVdFcHQEFAQsBgxQWAQEBAQGBaQu2Y4QWhiOCC1MBAgEBAQEBAhMBCgsUG4UXARUuAQE3AYEUAQUBNSKIMgGiZIEyPzKKX4UwAQEFiAwBAQgfCBCEG4t6ggALgwmPSIpVkDJliH2GHgKPUTGBEYEmBgiDFIILZQGICAEBAQ X-IronPort-AV: E=Sophos;i="5.31,575,1473134400"; d="scan'208";a="5796221" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 31 Oct 2016 11:52:33 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AVQ4d6BLy3TBpdHWg4NmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgUKf7xwZ3uMQTl6Ol3ixeRBMOAuqgC1Lud7f+ocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIs?= =?us-ascii?q?YL+kQMiN3o/piKibwN76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKK?= =?us-ascii?q?x8zGJsIk+PzV6nvp/jtM0rzyMFoP8l9shdQY3mbq84SvpeFz1gPGcrt+PxshyW?= =?us-ascii?q?bwKU4X1UYGwTmxwAVwrM9xb8do/8qCX7sOt63m+ROsigHuN8Yiir86o+EEygsy?= =?us-ascii?q?wALTNsqGw=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0H6BQBNaBdYdMLAVdFcHQEFAQsBGAEFA?= =?us-ascii?q?QsBgmkWAQEBAQGBaQu2Y4QWghiEC4ILUwEBAQEBAQEBAgECEAEKCwwIGzKCMxi?= =?us-ascii?q?BAFs/ARUuAQE3AYEUAQUBNSKIMgGiY4EyPzKKX4UwAQEFiAwBAQgfCBCEG4t6g?= =?us-ascii?q?gALgwmPSIpVkDJliH2GHgKPUTGBEYEmBgiDFIILZQGICAEBAQ?= X-IPAS-Result: =?us-ascii?q?A0H6BQBNaBdYdMLAVdFcHQEFAQsBGAEFAQsBgmkWAQEBAQG?= =?us-ascii?q?BaQu2Y4QWghiEC4ILUwEBAQEBAQEBAgECEAEKCwwIGzKCMxiBAFs/ARUuAQE3A?= =?us-ascii?q?YEUAQUBNSKIMgGiY4EyPzKKX4UwAQEFiAwBAQgfCBCEG4t6ggALgwmPSIpVkDJ?= =?us-ascii?q?liH2GHgKPUTGBEYEmBgiDFIILZQGICAEBAQ?= X-IronPort-AV: E=Sophos;i="5.31,575,1473120000"; d="scan'208";a="356545" Received: from mail-pf0-f194.google.com ([209.85.192.194]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/AES128-GCM-SHA256; 31 Oct 2016 15:52:32 +0000 Received: by mail-pf0-f194.google.com with SMTP id n85so9060184pfi.3 for ; Mon, 31 Oct 2016 08:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perfinion-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=U9iJRIpEqdEaTTOlP6nRZ2o2Xgj4DZLllJmN922I+ng=; b=evASis+3iDlho8SaieCQmH06NX9LEFkap8OpUtWwIdMQQUHHhgEG5IG4D39QErbQO7 8h7B21XH6OwN5ZAxiabDNaheU2zuPq9RfDAdYTzpYUxti5PvChkyxMe2h/kkq5RwS4Eq Ngv8L3FuqQrqiY3NS/zjL8IBzOVR54TytPOtNR2Rz92pfEq5p7OZq/5zFF3S+proqB9B bind3SHJancCkXw38HUg4nd1Qlm6xEtJKa7TVffIXU7CGYccMnvWyQEpQIJUWdGAKnU0 uonDlTK/WWkPwgJ/r/qAngCBJXfhAAeVZoiKOKSq8Mjmdd/g2Yj1XuIiN3M3qo5PpYM1 HOUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=U9iJRIpEqdEaTTOlP6nRZ2o2Xgj4DZLllJmN922I+ng=; b=HmjFnsHL4z5PB/99NzN9C6lXgYZELd60r8GwlQ9rlBvs7xJ7zDGAq61TH2yG8LP+Th YLpQbyqVuUlw0FRKeyHQ17yGxliJvKZuv4enhuel6r+cAYr9u7o55SpxTWZofCZugv6J JMLELFrXIfm0XfHHFoqmEqaxaBfE4shByeQPBIlHzBu3twAar0NPYcQPlOUcymb+gS0w Q5ZzZvPxBBbZtJ3lEswfYXui3/zNbPr8Gpzp3Izv3nHK0DbOA9/CcxHujF2sYPLB1d8v 4j8keYLtAT4/A+jDS5mMJJXwwNX0Z9CFFXw5meoIJTBsl45st4SiNeeShwM72uFr0X3D /WSw== X-Gm-Message-State: ABUngveaTE1GCfrRMHDV4+s3Ij8b8FLjL6g0J+/8ePV5kG8PNmBbDJizyZ3Xmw12h6nmJg== X-Received: by 10.98.223.150 with SMTP id d22mr50826252pfl.2.1477929151444; Mon, 31 Oct 2016 08:52:31 -0700 (PDT) Received: from localhost ([2404:e800:e600:2a1:8c6e:9ec8:a661:98f0]) by smtp.gmail.com with ESMTPSA id q12sm36589618pfd.7.2016.10.31.08.52.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Oct 2016 08:52:31 -0700 (PDT) From: Jason Zaman To: selinux@tycho.nsa.gov Subject: [PATCH] libsepol: Add symver with explicit version to build with ld.gold Date: Mon, 31 Oct 2016 23:52:27 +0800 Message-Id: <1477929147-18929-1-git-send-email-jason@perfinion.com> X-Mailer: git-send-email 2.7.3 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP The blank default symver fails to compile with ld.gold. This updates the symver from blank to LIBSEPOL_1.0. The dynamic linker will first look for the symbol with the explicit version specified. If there is none, it will pick the first listed symbol so there is no breakage. This also matches how symvers are defined in libsemanage. Signed-off-by: Jason Zaman --- libsepol/cil/src/cil.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libsepol/cil/src/cil.c b/libsepol/cil/src/cil.c index 929ab19..9b18773 100644 --- a/libsepol/cil/src/cil.c +++ b/libsepol/cil/src/cil.c @@ -53,19 +53,19 @@ #include "dso.h" #ifndef DISABLE_SYMVER -asm(".symver cil_build_policydb_pdb, cil_build_policydb@"); +asm(".symver cil_build_policydb_pdb, cil_build_policydb@LIBSEPOL_1.0"); asm(".symver cil_build_policydb_create_pdb, cil_build_policydb@@LIBSEPOL_1.1"); -asm(".symver cil_compile_pdb, cil_compile@"); +asm(".symver cil_compile_pdb, cil_compile@LIBSEPOL_1.0"); asm(".symver cil_compile_nopdb, cil_compile@@LIBSEPOL_1.1"); -asm(".symver cil_userprefixes_to_string_pdb, cil_userprefixes_to_string@"); +asm(".symver cil_userprefixes_to_string_pdb, cil_userprefixes_to_string@LIBSEPOL_1.0"); asm(".symver cil_userprefixes_to_string_nopdb, cil_userprefixes_to_string@@LIBSEPOL_1.1"); -asm(".symver cil_selinuxusers_to_string_pdb, cil_selinuxusers_to_string@"); +asm(".symver cil_selinuxusers_to_string_pdb, cil_selinuxusers_to_string@LIBSEPOL_1.0"); asm(".symver cil_selinuxusers_to_string_nopdb, cil_selinuxusers_to_string@@LIBSEPOL_1.1"); -asm(".symver cil_filecons_to_string_pdb, cil_filecons_to_string@"); +asm(".symver cil_filecons_to_string_pdb, cil_filecons_to_string@LIBSEPOL_1.0"); asm(".symver cil_filecons_to_string_nopdb, cil_filecons_to_string@@LIBSEPOL_1.1"); #endif