From patchwork Thu Nov 17 00:28:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 9433243 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 7910E6021C for ; Thu, 17 Nov 2016 00:29:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A36A29198 for ; Thu, 17 Nov 2016 00:29:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D151291AF; Thu, 17 Nov 2016 00:29:02 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0115529198 for ; Thu, 17 Nov 2016 00:29:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754141AbcKQA2m (ORCPT ); Wed, 16 Nov 2016 19:28:42 -0500 Received: from mail-qt0-f173.google.com ([209.85.216.173]:32820 "EHLO mail-qt0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752906AbcKQA2l (ORCPT ); Wed, 16 Nov 2016 19:28:41 -0500 Received: by mail-qt0-f173.google.com with SMTP id p16so118093614qta.0 for ; Wed, 16 Nov 2016 16:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=DlH9CTCb2t65RpcfkYm1RmTioI3B+eETZfQl1akIA2k=; b=h5178iZkMMRK8d5VQTq4LDREu4AZS/NKs+R5Z76vtcVHUI/CRFvAt31VZxE7KYijH2 Fu8CbTtSlShiLh3zeZsV02xeE+HQeBF3T9ivVkFTUamnJ2N8VSEsVoiEZe+TSTbdNLUA rUSCUfDz0VtZiaYgPEO5YQ5t8xQ7wqTbQJ2BI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=DlH9CTCb2t65RpcfkYm1RmTioI3B+eETZfQl1akIA2k=; b=GmrW9/fmMW7LGwjKA/QNw6mYv+wKw9IyBCmt9tJOVmTEcoWqk6fLFLBg7a/NBIWPmf 2aucD/m0Vin+wswFp7Z6THaXWMB0FiLO5YF2DQFhaSIi1soSK4PS9SyScVFjPfl7Zhyj fXrIXr77ajjnrzRNjUYCL10QWlixuVd6zohUGLwjA/8GpR2pb4fYdZkTmaUbbFOTPekc 7WtcIMUXg9TB6GXgVW1S2a8/OeMirm8GbPASKA1Wkf+sIr3qHARWRApDwIJHOpPCUXho DkDeecQRcJ8pROYaNW7Mi0CstMR8wlh0O5dzSAlM3drOTte6M5quYOm6YISyV5kBmIQy stjQ== X-Gm-Message-State: AKaTC025fIZgoDeqBzfmUx7DiuhR17KCN+Ja8cgGGfwKCGMn1C7XSuHc5oYxMNIPsNiOaN4Y X-Received: by 10.200.33.252 with SMTP id 57mr208813qtz.255.1479342520799; Wed, 16 Nov 2016 16:28:40 -0800 (PST) Received: from xanadu.home ([2607:fa48:6e39:d410:feaa:14ff:fea7:ed77]) by smtp.gmail.com with ESMTPSA id q65sm211626qki.20.2016.11.16.16.28.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2016 16:28:39 -0800 (PST) Date: Wed, 16 Nov 2016 19:28:39 -0500 (EST) From: Nicolas Pitre To: Michal Marek cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: cmd_export_list: tighten the sed script Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When LTO is used, some ___ksymtab_string sections are seen by this sed script, creating lines containing a single ) such as: EXPORT(foo) ) ) EXPORT(bar) Let's make it so the + character is also required for any line to be printed. Signed-off-by: Nicolas Pitre --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 53b43f26bb..3066c8e61d 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -428,7 +428,7 @@ endif quiet_cmd_export_list = EXPORTS $@ cmd_export_list = $(OBJDUMP) -h $< | \ - sed -ne '/___ksymtab/{s/.*+/$(ref_prefix)/;s/ .*/)/;p}' >$(ksyms-lds);\ + sed -ne '/___ksymtab/s/.*+\([^ ]*\).*/$(ref_prefix)\1)/p' >$(ksyms-lds);\ rm -f $(dummy-object);\ $(AR) rcs$(KBUILD_ARFLAGS) $(dummy-object);\ $(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\