From patchwork Fri Jun 9 05:24:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9777189 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 34A2F6034B for ; Fri, 9 Jun 2017 05:25:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25F5227F8F for ; Fri, 9 Jun 2017 05:25:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19B2928546; Fri, 9 Jun 2017 05:25: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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 7614A28423 for ; Fri, 9 Jun 2017 05:25:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751537AbdFIFZA (ORCPT ); Fri, 9 Jun 2017 01:25:00 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34816 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751519AbdFIFY6 (ORCPT ); Fri, 9 Jun 2017 01:24:58 -0400 Received: by mail-pg0-f65.google.com with SMTP id f127so6661965pgc.2; Thu, 08 Jun 2017 22:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sebm5CWGIG1oG2XoR/fp692bT46t/n8eTSbXHH/f8ow=; b=S5wVX/SSJeH5hnDN/yOWNPJjpzuFIl50nu4SXlW4bHou2avCCD0mLV4dj6nLA+EwSF lhnIlrpvbhoGH8PR5f+pom462dsqVRBqbE0bMfTu1+4xqzPPn5sVc+yj1TXs+8ggFu/H In24J/Egu1WIkHMmalwIDGiWk59NsyaWKIZTM1ce53dwenxPsCYrmxdcOR6W3lZIhCLl Jq9YxPO2Mo64knMjGuDAGcYnOMrRX2/+RuIONGw6ucw/zsE2aKc6K7SYVVS0P1/aeDFg JWEYPPKTHIx9aIl0Ii7Xq/cVgaWPvhAvVzuG3g5XoFiC3lDOu3B89Gq2UJ+z77euOplk oC3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sebm5CWGIG1oG2XoR/fp692bT46t/n8eTSbXHH/f8ow=; b=p/TxG4S7e7/ZdIUDNlTy9lY4zQeJ6UzxJAgxkRbbbP7SjB5c/9GtCWuDDvkUWWyvO7 hcSnAMO3hiQ9N4jRd6DjMwOfr3+uubZWyIINrLI1Qf21vCfViHDhAGlRyO1xev68qiU/ bqicrkVRy78dpFIkTridhNYrpixITvG/UcG5G9fkeqFGwEY2PLd8yUxLqAEUeNvVwUfc ypt/GA1gkmPEMhssSa8LfcE82NwU0otjQWmKLsdFckOWpKIfnGERoK2be/3USt7AemJl lIs8VlYC6UPCHFp1XNPulSuTDcLABsYFrDDnG2oJtdv0iF4AnRUgKyhqRLdm/5EF0gOl Tzhg== X-Gm-Message-State: AODbwcCjQDzu4Fc6PtYzUZkyPXhvsN7ruOfoPE96eTq+CvkGEIQU3Y7u U54yAWoOqp2sOOLn X-Received: by 10.98.15.29 with SMTP id x29mr33676365pfi.129.1496985897742; Thu, 08 Jun 2017 22:24:57 -0700 (PDT) Received: from roar.au.ibm.com (14-202-185-133.tpgi.com.au. [14.202.185.133]) by smtp.gmail.com with ESMTPSA id h15sm135375pfk.120.2017.06.08.22.24.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2017 22:24:56 -0700 (PDT) From: Nicholas Piggin To: linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org Cc: Nicholas Piggin , Masahiro Yamada , Michal Marek , Linus Torvalds , Stephen Rothwell , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: [PATCH 3/5] sh: thin archives fix linking Date: Fri, 9 Jun 2017 15:24:15 +1000 Message-Id: <20170609052417.561-4-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170609052417.561-1-npiggin@gmail.com> References: <20170609052417.561-1-npiggin@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking them into the final link. Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Nicholas Piggin --- Arch maintainers please give an ack if we can take this through the kbuild tree. Thanks, Nick arch/sh/Makefile | 2 ++ arch/sh/kernel/vsyscall/Makefile | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 280bbff12102..a907366f0352 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -97,6 +97,8 @@ defaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux boot := arch/sh/boot KBUILD_IMAGE := $(boot)/$(defaultimage-y) +LDFLAGS_vmlinux += -R arch/sh/kernel/vsyscall/vsyscall-syms.o + # # Choosing incompatible machines durings configuration will result in # error messages during linking. diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile index 8f0ea5fc835c..b82d13eb8d30 100644 --- a/arch/sh/kernel/vsyscall/Makefile +++ b/arch/sh/kernel/vsyscall/Makefile @@ -27,8 +27,6 @@ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE # table and layout of the linked DSO. With ld -R we can then refer to # these symbols in the kernel code rather than hand-coded addresses. extra-y += vsyscall-syms.o -$(obj)/built-in.o: $(obj)/vsyscall-syms.o -$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o SYSCFLAGS_vsyscall-syms.o = -r $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \