From patchwork Thu Jun 22 12:39:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9804211 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 DF71660234 for ; Thu, 22 Jun 2017 12:39:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0A6E28650 for ; Thu, 22 Jun 2017 12:39:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C564228665; Thu, 22 Jun 2017 12:39:48 +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 253D928650 for ; Thu, 22 Jun 2017 12:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbdFVMjr (ORCPT ); Thu, 22 Jun 2017 08:39:47 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33418 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbdFVMjq (ORCPT ); Thu, 22 Jun 2017 08:39:46 -0400 Received: by mail-pf0-f196.google.com with SMTP id w12so2761549pfk.0; Thu, 22 Jun 2017 05:39:46 -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=8qfjLwk5G+1uY8+UC6mKXldk4x6S6bCteJukhu/5ra8=; b=Yu/RiaRavfXNCACbRH8dCD+28k9UMlfgfuk7Xr7oyRBGCXh9DiBBIUOM/GTsJMojC4 AaAd5FCmphYS/bP7H3I1be4+WKUBKNqMc8K0XlOns9o0kx8iVSZk8NdwAKSqyKTMhUnE K8yM69u72VABtZ8LIldv8/vxSvcjPcVTHUfxC21Ek+5q2ErPGcCUYDfaJd9if8slVy4+ Zayae8n5mBOA22R+KgNdFAug3ojTbtEjRiH2d1lvoqLru6XM2BRpzSBhkLrXVHZT9d/h OA5OSbs2HoujgKuTd38zG/3DZMkdqqIcfp6sUNANYZf7UuEtIBcMJJCp02GEKquE6MAz WxfA== 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=8qfjLwk5G+1uY8+UC6mKXldk4x6S6bCteJukhu/5ra8=; b=tm3v32ql8ubCiYabAkpyncndOq9erC5XlaXE7WxLPJiP31qRcfVzocTypA2CaDPz1d 5rSo3pm4mUDgdEeWWfh08kXyylkpriDeJfP/zU1ZEG1YL/crCalOCBzo+xWyNndoiyzB srTs0m732qF1dPDeR8B5ogM11kx4hzNo+yRHeFpFqIaBJkP+aerp39kafUHACq298lUk w7+WHNV6cgSig6N6rzh2rpoihj8C93W8cIMJpzsqPHXYnUoQV0nYGcrLjQM5zRfQhQfB XJKMALO0kuVEmgBcjnwmUvzYLqxtVnlaw45/0lmTuuP4cbcgvC6c/WqfOegt0uKxdu4e /YJg== X-Gm-Message-State: AKS2vOxCjpjTj3GtjaQ8vpLfRAN5QMG4ogWFR35fifkQUbXV9DGKgriT sTa4iAASvKnNRA== X-Received: by 10.84.236.66 with SMTP id h2mr2737148pln.233.1498135186242; Thu, 22 Jun 2017 05:39:46 -0700 (PDT) Received: from roar.au.ibm.com ([210.185.119.63]) by smtp.gmail.com with ESMTPSA id s68sm3820103pfj.33.2017.06.22.05.39.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 05:39:45 -0700 (PDT) From: Nicholas Piggin To: Masahiro Yamada Cc: Nicholas Piggin , linux-kbuild@vger.kernel.org, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: [PATCH v2 1/3] sh: thin archives fix linking Date: Thu, 22 Jun 2017 22:39:27 +1000 Message-Id: <20170622123929.15054-2-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170622123929.15054-1-npiggin@gmail.com> References: <20170622123929.15054-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 a new object file that is included into the built-in.o. Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Nicholas Piggin --- arch/sh/kernel/vsyscall/Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile index 8f0ea5fc835c..efc7a6837ef6 100644 --- a/arch/sh/kernel/vsyscall/Makefile +++ b/arch/sh/kernel/vsyscall/Makefile @@ -1,4 +1,4 @@ -obj-y += vsyscall.o vsyscall-syscall.o +obj-y += vsyscall.o vsyscall-syscall.o vsyscall-syms.o $(obj)/vsyscall-syscall.o: \ $(foreach F,trapa,$(obj)/vsyscall-$F.so) @@ -26,11 +26,13 @@ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE # We also create a special relocatable object that should mirror the symbol # 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 \ +SYSCFLAGS_vsyscall-dummy.o = -r +$(obj)/vsyscall-dummy.o: $(src)/vsyscall.lds \ $(obj)/vsyscall-trapa.o $(obj)/vsyscall-note.o FORCE $(call if_changed,syscall) + +quiet_cmd_syscall_syms = SYSCALL $@ + cmd_syscall_syms = $(LD) -r -R $(obj)/vsyscall-dummy.o -o $@ + +$(obj)/vsyscall-syms.o: $(obj)/vsyscall-dummy.o + $(call if_changed,syscall_syms)