From patchwork Thu May 11 15:56:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 761228 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wNyYX2b3jz9s7j for ; Fri, 12 May 2017 02:02:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eDQ4C9FE"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wNyYX1VbHzDqZr for ; Fri, 12 May 2017 02:02:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eDQ4C9FE"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wNyRJ34fhzDqZb for ; Fri, 12 May 2017 01:57:16 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eDQ4C9FE"; dkim-atps=neutral Received: by mail-pg0-x242.google.com with SMTP id s62so4058044pgc.0 for ; Thu, 11 May 2017 08:57:16 -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=USegI9QlewOfrz8jJQ/naIXXz2mICEW3D1/PZcZ5nok=; b=eDQ4C9FEoBKhNTNqLjdWrbzTlcp0UFkZ9CwXqgcC2q45LUvPtTTqFPf5S35vYHUhIB XTwB7aLArMv+aU+SGqOjz4XOW674BtEGPDuSDgflUKBWJIXdQIm18u3GwrWSlvIAjEiD WhmUCpgw72SQNGVhpnOxqORCyyQXv30k7S1SLmV1Cp77cjQPGeVw6z2Pgx1dz+duCXQH uMnEuvLs96ZqLSfUpcO3KdJI5T3Ge040nmKFG1rb/MRHZoaZWT5sVyLyFIHMaYwiHsR4 cZNiKMI9JBT3nmHSdKNsXeVWg5Q34d+jCOzZkaka1QVY1sifu2JQGXjF4h8G41TXMp5f M2+A== 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=USegI9QlewOfrz8jJQ/naIXXz2mICEW3D1/PZcZ5nok=; b=U8oM3IYtHMOxkYcRgJiXglWBEVQuvFLwT4Gec+b2IRe/5CdNnFwh7tGOKT3v5D+ahH BEWnO+VtNKfjPCGLlXQ2+yMnFwmh/Cj/GYv2uyCd2kCaacYJ5Jvpgfsq7vg0RXTQ2n4h si0j3Pk8MqPkyBQg+OV+ysjvlPBHakmslcT75U3hL/tLhz1OK6b8JSLzNRHl+jtSnxqN 63LYOifWyrpCV6bpg5ULRrm+jWlVMz5omPa5qCYDx/uW2ipZQWX6P5rYpCMSFl+ZG6Gp 5CNSkz5sAwVapwnJNe844NT+wKNCL9/DhpJVyFciLXfRfbnst+J9vYWho4CaDEqYF8Rv /gzA== X-Gm-Message-State: AODbwcBi3jl9VZ8bN+arKDzaqFrXTN7JPH+X+/vjMuYy9Infq7QM9cug vDEgzGHNUFyeDA== X-Received: by 10.84.217.91 with SMTP id e27mr1410361plj.87.1494518234837; Thu, 11 May 2017 08:57:14 -0700 (PDT) Received: from roar.au.ibm.com ([210.185.118.93]) by smtp.gmail.com with ESMTPSA id c7sm1194002pfk.103.2017.05.11.08.57.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 08:57:13 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/5] powerpc/64: do not link crtsavres.o in vmlinux Date: Fri, 12 May 2017 01:56:49 +1000 Message-Id: <20170511155652.8287-3-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170511155652.8287-1-npiggin@gmail.com> References: <20170511155652.8287-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The 64-bit linker creates save/restore functions on demand with final links, so vmlinux does not require crtsavres.o. Make crtsavres.o extra-y on 64-bit (it is still required by modules). Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index ed7dfce331e0..0ca405a27ac1 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -9,8 +9,12 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE) -obj-y += string.o alloc.o crtsavres.o code-patching.o \ - feature-fixups.o +obj-y += string.o alloc.o code-patching.o feature-fixups.o + +# 64-bit linker creates .sfpr on demand for final link (vmlinux), +# so it is only needed for modules. +obj-$(CONFIG_PPC32) += crtsavres.o +extra-$(CONFIG_PPC64) += crtsavres.o obj-$(CONFIG_PPC32) += div64.o copy_32.o