From patchwork Wed Nov 15 21:34:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10060393 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 AC24160231 for ; Wed, 15 Nov 2017 21:40:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B8D028F09 for ; Wed, 15 Nov 2017 21:40:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9051929F30; Wed, 15 Nov 2017 21:40:13 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1BCF028F09 for ; Wed, 15 Nov 2017 21:40:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=V3qaz/SL8duzMR+nsJwgWbuGm4CGOjFEW288pq/LcFc=; b=japMOKPP8kzOM4ewFS3ygNk2xT wdxtVp1G9B7L1HLu/iO61t8RfA0tmAkAG9z9qVqI0AoEDZqPsLHw5NF+ebo7FcvR8hz8xBduyqRUk fmSS05dj/shaiSxxu9VqqxHcAv/49ju0QktqPSWfD7STr3AWrowfFlWdR8AFA2Gk6GfmnlcLnIroI xdBIbqwl7dcnmseW4v++9aogWLFMqvSGH3ZRphvzR4x9zBVmYKH/qm6CgGO/Nz4ybqNngC6+g5wQx CR6pEq5KaXPDqyfDgbnsuci9oz/61F+izuipDX47JdNbTMIDAhX3m1B9TqqCGDTo3Hw/yVVtewMsP Z4Dv3sCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eF5Pg-0004Nk-3U; Wed, 15 Nov 2017 21:40:04 +0000 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eF5Kv-000890-BD for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2017 21:35:18 +0000 Received: by mail-io0-x242.google.com with SMTP id 134so3097692ioo.0 for ; Wed, 15 Nov 2017 13:34:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zko+2dW5fre/mRz7nu4KbKxHy6cwgY1Fh2MCB32Vop0=; b=bP7g8TkGmu9dLl7SBrFBYksyw36IWsBXBdBZ728fSWn8WNZfKsHnHiPDmxQDPDgIxR m3JBMa0GJD9WFgOw6GsVDhBtCkpWM5bk12WoSDw07cVVQV5bSfZXtlPI1nYNGSF1hfJ2 fybr3yvIjypehzIKU+P8nw1NtLcVq7IsocSEJveETP24WBrEIOaitEfzDZuVI6UsIjuB m1lYzeNJX4FqN/pIaJtfw1/FQg706aU3HnCLnvEF91PjXKiB5T1CA0oWOPL1wKRWWTmD /38uwI/fSDc4nXTRgafQb1X3dI3XWtvIHZcPmZzoprKCiasLnMQoZx76Jw6962qwvULO QnHw== 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=zko+2dW5fre/mRz7nu4KbKxHy6cwgY1Fh2MCB32Vop0=; b=X6kimeLOOkNFEPGrqjXafUB+cq0PsQxvMD6QAUWZTzG5D3DS1bZgvCff2Mr3Plvns9 uhcsbPHZyjLTuvPzWWZC7u/vgdS3jHEcNMsKF4fURwlDWbYjdU1TRUwnZpP3K0vCZQjV XXcgEBtO6752f385B/xSwFh9UPtE6KiM/LjP+u7tXhCdf9/04WkhXka19PD7YHIgw+5p leokFz91sm5/NHq3GmWdm0MsCh9c3U69OGgHrvYPYoCCLTOuqRgLwcb9J40ryJXjcMUP 9B8QN+Diu032qCaVjPAOL55+ZvZ1uK0DdMT+LSIxC8hNdqywRNaUXradtcXqx530EjNV K7KQ== X-Gm-Message-State: AJaThX7uBJAqNIgyKUvd/04y7OnwGAzktpTkA1hdPehfGQM/B8NS5qZy m6Q0XXTg6+x+qowHf+iixGonTg== X-Google-Smtp-Source: AGs4zMY+M2HFkmqYzuFsdl7SNouL/y1Jp3EiHGTYzPsWm3m6E6p8cxXys6gTZkxlVWVQs8aqtcmvUQ== X-Received: by 10.107.69.14 with SMTP id s14mr20904251ioa.113.1510781689111; Wed, 15 Nov 2017 13:34:49 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id 68sm9735197iov.2.2017.11.15.13.34.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 13:34:47 -0800 (PST) From: Sami Tolvanen To: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Yury Norov , Matthias Kaehlcke Subject: [PATCH v2 05/18] arm64: fix -m for GNU gold Date: Wed, 15 Nov 2017 13:34:15 -0800 Message-Id: <20171115213428.22559-6-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171115213428.22559-1-samitolvanen@google.com> References: <20171115213428.22559-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_133509_778244_DDC92D56 X-CRM114-Status: UNSURE ( 7.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sami Tolvanen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP GNU gold supports different emulations than bfd. Use aarch64_elf64_*_vec instead of aarch64linux. Signed-off-by: Sami Tolvanen Acked-by: Yury Norov --- arch/arm64/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index ecd5ed11c764..6059c8169513 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -70,14 +70,22 @@ KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__AARCH64EB__ AS += -EB LD += -EB +ifeq ($(ld-name),gold) +LDFLAGS += -maarch64_elf64_be_vec +else LDFLAGS += -maarch64linuxb +endif UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__AARCH64EL__ AS += -EL LD += -EL +ifeq ($(ld-name),gold) +LDFLAGS += -maarch64_elf64_le_vec +else LDFLAGS += -maarch64linux +endif UTS_MACHINE := aarch64 endif