From patchwork Thu Jun 22 12:39:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9804215 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 542AE60234 for ; Thu, 22 Jun 2017 12:39:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45F8728655 for ; Thu, 22 Jun 2017 12:39:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ABC428666; Thu, 22 Jun 2017 12:39:53 +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 D5DD528655 for ; Thu, 22 Jun 2017 12:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbdFVMjw (ORCPT ); Thu, 22 Jun 2017 08:39:52 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34548 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbdFVMjv (ORCPT ); Thu, 22 Jun 2017 08:39:51 -0400 Received: by mail-pg0-f67.google.com with SMTP id j186so2280548pge.1; Thu, 22 Jun 2017 05:39:51 -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=WjbhIFm4M3HoNVX7mOTm+pHV4j0IEwWSI8R6wEWXK8Y=; b=kIkcmg057YLMolM5RapivuxEiQ0iGemlkcBXczPnyaKMfM42TqrXldAZ6BdKSCSBGF f4WlkWCzoRqXXUzbEdQCDHstpqNX2vSLc2XsSoYpRZIq70uNS1jtfguyzXDig+O0h2KB giaAgMSV7DadUKd+P7cqQ2olGX6CrqYL3RUQIye+seH3yYjqh/ki3cen9a6bFxTvSdJp BGH/fi/uMOTexfhP0qt3LFPX9iJfVZjl6ExwJ/8Dxu0VQupnt2nqrzYX8klgvWV8SiO+ TSRRsy9+79iatnenHikH33pMgAkCKI/CvzXPY7heytW8iWWRR/5qvMvafNEtLbAiLUVI Povw== 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=WjbhIFm4M3HoNVX7mOTm+pHV4j0IEwWSI8R6wEWXK8Y=; b=m8pvY9JYO0LhhN4ufrBSm0+KyWUnCXFA+aOcKSGu+hrnnzhpwm9CZOaBzUe/3Pjqni hx3GdSjoqIIF+UFSyyw186BZ91NecaU0JCxT0UXKSBWhxgTQMGXEr8VjgzfsY32fpBvJ Rbon6f/cdjrGbCmQFL1P+yvlti66ev8POpTWVIDVqRuyT+9kg+6dBEvn2UpF2cSCpDOy Gku6Z38WT6ZU/vVckCMMCJRGWiHpxAo4HrLO5fNM571Env/XjSdWFRkjgotEI0AoczHQ QWrSfxCF6encQLCk3SvuJi776EjNPdx+mdQGhc7PfxEkX7gF8KPs5uBvHPmE4bxWzDSV MkSw== X-Gm-Message-State: AKS2vOxQsl5+5q5WRN499dMvyEqjBvwxGxgAmZXHipAQhW1qhx1qnlLs 4g5zSvm09AdMQA== X-Received: by 10.98.155.218 with SMTP id e87mr2541221pfk.24.1498135190999; Thu, 22 Jun 2017 05:39:50 -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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 05:39:49 -0700 (PDT) From: Nicholas Piggin To: Masahiro Yamada Cc: Nicholas Piggin , linux-kbuild@vger.kernel.org, Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org Subject: [PATCH v2 2/3] ia64: thin archives fix linking Date: Thu, 22 Jun 2017 22:39:28 +1000 Message-Id: <20170622123929.15054-3-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-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@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: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Signed-off-by: Nicholas Piggin --- arch/ia64/kernel/Makefile.gate | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/ia64/kernel/Makefile.gate b/arch/ia64/kernel/Makefile.gate index a32903ada016..e20c711c2b1e 100644 --- a/arch/ia64/kernel/Makefile.gate +++ b/arch/ia64/kernel/Makefile.gate @@ -2,7 +2,9 @@ targets += gate.so gate-syms.o -extra-y += gate.so gate-syms.o gate.lds gate.o +obj-y += gate-syms.o + +extra-y += gate.so gate.lds gate.o CPPFLAGS_gate.lds := -P -C -U$(ARCH) @@ -14,12 +16,12 @@ GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE $(call if_changed,gate) -$(obj)/built-in.o: $(obj)/gate-syms.o -$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o +# create an object file to resolve gate symbols +quiet_cmd_gate_syms = GATESYM $@ + cmd_gate_syms = $(LD) -r -T $(obj)/gate.lds -R $(obj)/gate.o -o $@ -GATECFLAGS_gate-syms.o = -r $(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE - $(call if_changed,gate) + $(call if_changed,gate_syms) # gate-data.o contains the gate DSO image as data in section .data..gate. # We must build gate.so before we can assemble it.