From patchwork Tue Jan 2 11:34:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 10140351 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 859C760362 for ; Tue, 2 Jan 2018 11:35:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F66228AC4 for ; Tue, 2 Jan 2018 11:35:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8261128AD6; Tue, 2 Jan 2018 11:35:14 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1712628AC4 for ; Tue, 2 Jan 2018 11:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To :Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8q6aqJfjfFGcuS/OAeJLUNnosonTZ27w7PKOyr01tLI=; b=f5daOJA6DQEAeziSk67r1lxT4 jdu9a7OWby9SLZA161Kqq9LhHqTWLSqNFN0mvp11W0Qn4md91xog6jFwiAHtST7jkynGKbxg5ZyGB dj/elL5roIqKpbQZlO2O4NdulrpuaaYiizJno5DRNOF0k6WzoGnw8B6UG1qq+7/URXc32AvkyufCH XUG0GXop6eZYXiQtGe8cdBpf+o2NHBqtT/Cxf+sYnt8yovTDusG+sKD4Gq0gmLzMkaAU1Vr8Sx48g XZdgdkhkoFFyvdUyqZbtrIAQTWPyOuC+mZPyxVjw7r38/hNUvxI5PZSWpUdrrPZLKqGEiDhLglA/B myGoxcoKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWKqc-0002RJ-T5; Tue, 02 Jan 2018 11:35:10 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWKqY-0001DH-R6; Tue, 02 Jan 2018 11:35:08 +0000 Received: by mail-pf0-x243.google.com with SMTP id a90so25559874pfk.1; Tue, 02 Jan 2018 03:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=myrUxBBNrMLC7/LPm88NB1OpPp81vhUIty3hw6C+1JQ=; b=IstwvFBzZFmdceL5+4yPkPHo29mp5gWeybSeOdJ2Pw5M+0Z9bHd8Oa4kFeRnTfKkZk jSieN0fSCvurSvV/YlUd28l7LK/3wDd8ySiCJIbg/XXstytySz4/JMIWeN3vG8bjA+gk 2/fTZRggkGZ5I+wdZSflHkJF2IUw9wd40Mf9ArmVOwrnG9keTipyI2XgPq60Kmwn+GFX M8+FcGxE1HV2WhcG4tl32mpWT1X21ziT7fBtB6Ur8aiu3PoMBUMx3Mam1RvekRruRRUU LzBDq7olAT0exJZ77XO46ndnZnR5vKid38fwoQF/o9yxCXC0/9Q+9wdYxmMOWmf8tDM4 0bSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=myrUxBBNrMLC7/LPm88NB1OpPp81vhUIty3hw6C+1JQ=; b=gZxDPx76Nz826L95LpmpXnS/5g1MyRidrVhfgEZkVyAMNcT3TDNbWWVf4zPFc6X+Op MiWLGQQ00E9db5vLPD7g9rdnzJom6JUaLKwa4oE34micmyhOy+imEp3AYem+QM/E7BwM P1ZO3FMas9LmBY+0rLCxjEZr0txNXCps+GFFgDBI07G1MIiTFdq8c/UD77aY8+CC2iom qWNo4vuUwwEPO3Y3xS/3Nb3kZAK+1tUGH2/XO2/7XKCWpIRh9Ln5P1odCOEuyGwkysHi AbPT/uj1+llLbHtXfJPG0zVMAF3q0T3iEtKkCmBAULKmbDqxb9joZqHmHRuxt3o3S7P5 ugIQ== X-Gm-Message-State: AKGB3mK5UEc1/ClmPkC3DQzJUVhTciHhapU/Q7rWYagj+B6neoDilr6q 0Jc56Y89rKXQrW40yP7bCUo= X-Google-Smtp-Source: ACJfBouwVNfeG5IikSxg99n2jACbBOgpo23BH2+ZPmSAEMDM2f+6uzArONanHTAeqboQknUTrL9pqA== X-Received: by 10.99.177.66 with SMTP id g2mr18676996pgp.307.1514892895307; Tue, 02 Jan 2018 03:34:55 -0800 (PST) Received: from sudip-tp ([202.142.103.106]) by smtp.gmail.com with ESMTPSA id m63sm87865034pfj.80.2018.01.02.03.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 03:34:54 -0800 (PST) Date: Tue, 2 Jan 2018 11:34:45 +0000 From: Sudip Mukherjee To: Arnd Bergmann Subject: Re: [PATCH] arch: drop duplicate exports of abort() Message-ID: <20180102113417.GA5078@sudip-tp> References: <20180102103311.706364-1-arnd@arndb.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180102103311.706364-1-arnd@arndb.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180102_033506_942069_34E6259F X-CRM114-Status: GOOD ( 14.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose Abreu , Vineet Gupta , Russell King , linux-kernel@vger.kernel.org, Andrew Morton , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Arnd, On Tue, Jan 02, 2018 at 11:31:12AM +0100, Arnd Bergmann wrote: > We now have exports in both architecture code in in common code, > which causes a link failure when symbol versioning is eanbled, on > four architectures: > > kernel/exit.o: In function `__crc_abort': > exit.c:(*ABS*+0xc0e2ec8b): multiple definition of `__crc_abort' > > This removes the four architecture specific exports and only > leaves the export next to the __weak symbol. Will it not be better to remove the abort() as they are exactly same like the weak function. That was the original plan we had when this weak function was done. Like in the attached patch.. --- Regards Sudip diff --git a/arch/arc/kernel/traps.c b/arch/arc/kernel/traps.c index 51a55b0..133a4da 100644 --- a/arch/arc/kernel/traps.c +++ b/arch/arc/kernel/traps.c @@ -169,4 +169,3 @@ void abort(void) { __asm__ __volatile__("trap_s 5\n"); } -EXPORT_SYMBOL(abort); diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index e344bdd..917b425 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -786,15 +786,6 @@ asmlinkage void __div0(void) } EXPORT_SYMBOL(__div0); -void abort(void) -{ - BUG(); - - /* if that doesn't kill us, halt */ - panic("Oops failed to kill thread"); -} -EXPORT_SYMBOL(abort); - void __init trap_init(void) { return; diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index cb79fba..a6f300a 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c @@ -115,15 +115,6 @@ static void set_eit_vector_entries(void) _flush_cache_copyback_all(); } -void abort(void) -{ - BUG(); - - /* if that doesn't kill us, halt */ - panic("Oops failed to kill thread"); -} -EXPORT_SYMBOL(abort); - void __init trap_init(void) { set_eit_vector_entries(); diff --git a/arch/unicore32/kernel/traps.c b/arch/unicore32/kernel/traps.c index 5f25b39..30d6613 100644 --- a/arch/unicore32/kernel/traps.c +++ b/arch/unicore32/kernel/traps.c @@ -291,15 +291,6 @@ asmlinkage void __div0(void) } EXPORT_SYMBOL(__div0); -void abort(void) -{ - BUG(); - - /* if that doesn't kill us, halt */ - panic("Oops failed to kill thread"); -} -EXPORT_SYMBOL(abort); - void __init trap_init(void) { return;