Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7755824ybi; Thu, 6 Jun 2019 00:42:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzj5eiHzYdrzNzhPy3Ap3lcSoQf8ZMbhhrqBCZYrJFJ3Gr0LSzn5Y0wXuwIUeDdT5aOPUb3 X-Received: by 2002:a17:902:9885:: with SMTP id s5mr48947275plp.102.1559806937618; Thu, 06 Jun 2019 00:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559806937; cv=none; d=google.com; s=arc-20160816; b=ma5ub0EfkCTlbk60v68ogKYwNsb28rX0JIFAx53EEqRsl2TQGSToPOnK9hQINlDjs0 ZibnNIMoVbUBXks6/6b4WiAEVySOxcacHw6xKJ6HZWVuoovy6VpK0VbR8s9uMK2lRXTy hhSC66E9rVsGgELV21kc4sWFEgL36SLJvIW4VZqMEV5bf/FmgNtIwb0HwGZ2mRW3t9gW lq90/lqKtGEoXfjb7unAyNF/QXG4xpcOk05KMvCsiPRc6/In5FyxaeF0HssxTwAEBXv+ COlPd83OluDZBmM34SR3wwmTXqHSP8k/EajSzv7h+qjC51cjpO0BdFJSFlyC1SrQD+iN lbJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :organization:message-id:date:subject:cc:to:from; bh=ahoaRs1AEhvKTwurCTJ8aFRnaBzVeHAeAzgNVuNSk4Q=; b=XBUdsWBxEKadNuuUc1rTawxEi7tLgAFIXFdcU9WhucLmoi3epQt29WDdayABqzeVGj kCr2XFY33A/OyBkGsPF8Vdj3ZHF45PEG/0x6jIlLuYbPnaakxrM71k/B873DnEfGPwGt /LdHJ2wA5m4LnX9vBWhaz+QfrOxAln83RglTRAqsqrbb/XAqRsn+xb5/zbjxZqkhInFj 5OTf0LzFa9F84wvt+e20QNay+jGgfqIPoa4LDz1aPI0c0Fn+JkxjiZzbJVO3EedktFxG ed28kuhtQufygPdrosFkUNWsgzQ0FxHUq8aJqm3fBd76R5WwOwtyMsXziF9lIXhgdarY 5rVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j62si1236960pje.52.2019.06.06.00.42.00; Thu, 06 Jun 2019 00:42:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726822AbfFFHit (ORCPT + 99 others); Thu, 6 Jun 2019 03:38:49 -0400 Received: from mx1.emlix.com ([188.40.240.192]:35430 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbfFFHis (ORCPT ); Thu, 6 Jun 2019 03:38:48 -0400 Received: from mailer.emlix.com (unknown [81.20.119.6]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 30E24602BA; Thu, 6 Jun 2019 09:38:45 +0200 (CEST) From: Rolf Eike Beer To: Greg KH Cc: Nick Desaulniers , Ard Biesheuvel , Linus Torvalds , Matt Fleming , Peter Zijlstra , Thomas Gleixner , linux-efi@vger.kernel.org, Linux Kernel Developers List , stable@vger.kernel.org Subject: Re: Building arm64 EFI stub with -fpie breaks build of 4.9.x (undefined reference to `__efistub__GLOBAL_OFFSET_TABLE_') Date: Thu, 06 Jun 2019 09:38:41 +0200 Message-ID: <8696846.WsthzzWoxp@devpool35> Organization: emlix GmbH In-Reply-To: <20190605162626.GA31164@kroah.com> References: <779905244.a0lJJiZRjM@devpool35> <20190605162626.GA31164@kroah.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6100540.dV2z5JSdMG"; micalg="pgp-sha256"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart6100540.dV2z5JSdMG Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Greg KH wrote: > On Wed, Jun 05, 2019 at 05:19:40PM +0200, Rolf Eike Beer wrote: > > I decided to dig out a toy project which uses a DragonBoard 410c. This = has > > been "running" with kernel 4.9, which I would keep this way for unrelat= ed > > reasons. The vanilla 4.9 kernel wasn't bootable back then, but it was > > buildable, which was good enough. > >=20 > > Upgrading the kernel to 4.9.180 caused the boot to suddenly fail: > >=20 > > aarch64-unknown-linux-gnueabi-ld: > > ./drivers/firmware/efi/libstub/lib.a(arm64- stub.stub.o): in function > > `handle_kernel_image': > > /tmp/e2/build/linux-4.9.139/drivers/firmware/efi/libstub/arm64-stub.c:6= 3: > > undefined reference to `__efistub__GLOBAL_OFFSET_TABLE_' > > aarch64-unknown-linux-gnueabi-ld: > > ./drivers/firmware/efi/libstub/lib.a(arm64- stub.stub.o): relocation > > R_AARCH64_ADR_PREL_PG_HI21 against symbol > > `__efistub__GLOBAL_OFFSET_TABLE_' which may bind externally can not be > > used when making a shared object; recompile with -fPIC > > /tmp/e2/build/linux-4.9.139/drivers/firmware/efi/libstub/arm64-stub.c:6= 3: > > (.init.text+0xc): dangerous relocation: unsupported relocation > > /tmp/e2/build/linux-4.9.139/Makefile:1001: recipe for target 'vmlinux' > > failed -make[1]: *** [vmlinux] Error 1 > >=20 > > This is caused by commit 27b5ebf61818749b3568354c64a8ec2d9cd5ecca from > > linux-4.9.y (which is 91ee5b21ee026c49e4e7483de69b55b8b47042be), revert= ing > > this commit fixes the build. > >=20 > > This happens with vanilla binutils 2.32 and gcc 8.3.0 as well as 9.1.0. > > See > > the attached .config for reference. > >=20 > > If you have questions or patches just ping me. >=20 > Does Linus's latest tree also fail for you (or 5.1)? 5.1.7 with the same config as before and "make olddefconfig" builds for me. Eike =2D-=20 Rolf Eike Beer, emlix GmbH, http://www.emlix.com =46on +49 551 30664-0, Fax +49 551 30664-11 Gothaer Platz 3, 37083 G=C3=B6ttingen, Germany Sitz der Gesellschaft: G=C3=B6ttingen, Amtsgericht G=C3=B6ttingen HR B 3160 Gesch=C3=A4ftsf=C3=BChrung: Heike Jordan, Dr. Uwe Kracke =E2=80=93 Ust-IdNr= =2E: DE 205 198 055 emlix - smart embedded open source --nextPart6100540.dV2z5JSdMG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iLMEAAEIAB0WIQQ/Uctzh31xzAxFCLur5FH7Xu2t/AUCXPjDAQAKCRCr5FH7Xu2t /Pl6BACfD5jQd+TumD4sWaBGoQsHiYGBBixaf/rbCWtituWSjO/lhxnHM7JNGGhU nwqqGrCEw9HpBR5bUXCTpgfF7C11ZD8nXYlDTwBIBWH7HKYFBaGrub8PXCyiZH9v cyC8ctpHj9k/PeZ+tLq+Aie9x4uIlKJVgfTHwAygDH4CD5j5mg== =WMEf -----END PGP SIGNATURE----- --nextPart6100540.dV2z5JSdMG--