Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9FCEC433EF for ; Sun, 10 Jul 2022 07:10:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 66FAE8435C; Sun, 10 Jul 2022 09:10:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fRkyYXZ/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 706EB842FA; Sun, 10 Jul 2022 09:09:59 +0200 (CEST) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C2F0284335 for ; Sun, 10 Jul 2022 09:09:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.bossman075@gmail.com Received: by mail-qt1-x834.google.com with SMTP id y3so3675483qtv.5 for ; Sun, 10 Jul 2022 00:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4d2I9pAjjg3htL3KzNtZ3iZ0KLNsr1egnIIF6XRNrLQ=; b=fRkyYXZ/NwjE0VHlqaIH+TIgdzTjxP6X3i2zX5h4AH8BV/j05MDgI1pWCn8cYrvUml gkcoJTblDn4eBamJhSrV9yjLJZC7lQi8CqZNAq/UsJ+gMz/gUZNhtGHjnUz/8ZIU/8Gn d7NUDECdmY8SK1u14sZXGTvHxvQX6RyY2E0l16JKryDbo568zQLpYDPdRH+QRXj+5BjY 5iUjy/ocVSyOUut5PaFchtkVS0f30yaam6xudJ3+OoYN4Tt77eNbZNwVADU7Uf8q4Ove oPs/LmJdSzurgVUqNU+5B7zwj9p0sfFhPuvqzIyeWEK4v9BDkA8RcWfVb9dBBz7HhroG 89sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4d2I9pAjjg3htL3KzNtZ3iZ0KLNsr1egnIIF6XRNrLQ=; b=ynfi2l3zKGElxIu19iB8fJebJo7JUivycCxjTAQiFzdxKbhmOD4Ai4g8Db9tlQ09wd Gtp/T+XRQ6E8U6ECdfHbmLnKAs6PnhC5xlLDayzCP25zL0YSIzKaeOEeXOII47dkqZop rAYqnS4rwuVX2/BGqj9L6exAvqWm4RXOdcVFYiDOEKGOBE4/04EhojVeKJX9llT8aCGi rEQwSiVTl5G6hH+FmzeTnGppSDlvnMVj1PjY1svRx2jWyRtvGEVSt3gIpmi2nhJ1+XYX bEO/MtP8igEV1EJy4MPM1XfjmhqIap46y4GIbDyxb/AejBSXYylKi6/O2abC6V0QjOTM TeOA== X-Gm-Message-State: AJIora+AvZe8n4zFY3s0a+9rXwm8MoiabDJbS4echdlJSZilKlhg73/n RI5sgXBhon9a5xVbkQFhjLXndpfGh5kj1A== X-Google-Smtp-Source: AGRyM1sVnMsfgnQEei79eAoJHaAiVFoNOIeP7fDxtRA2bXK3UQYr3gP/ZAkgzX5Rp9F5Qp39hrgLOA== X-Received: by 2002:a0c:df11:0:b0:472:fff9:d9a8 with SMTP id g17-20020a0cdf11000000b00472fff9d9a8mr9006669qvl.61.1657436994915; Sun, 10 Jul 2022 00:09:54 -0700 (PDT) Received: from jesse-desktop.jtp-bos.lab (146-115-144-188.s4282.c3-0.nwt-cbr1.sbo-nwt.ma.cable.rcncustomer.com. [146.115.144.188]) by smtp.gmail.com with ESMTPSA id a10-20020ac844aa000000b003154e7466casm2881326qto.51.2022.07.10.00.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jul 2022 00:09:54 -0700 (PDT) From: Jesse Taube X-Google-Original-From: Jesse Taube To: u-boot@lists.denx.de Cc: trini@konsulko.com, sbabic@denx.de, festevam@gmail.com, festevam@denx.de, giulio.benetti@benettiengineering.com, sjg@chromium.org, andre.przywara@arm.com, Mr.Bossman075@gmail.com Subject: [PATCH v1] arm: relocate: Replace ADR instruction with non-pseudo-instruction Date: Sun, 10 Jul 2022 03:09:53 -0400 Message-Id: <20220710070953.933688-1-Mr.Bossman075@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean In Binutils 2.37 the ADR instruction has changed use alternate instructions. The change causes armv7-m to not boot. Signed-off-by: Jesse Taube --- arch/arm/lib/relocate.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S index 14b7f61c1a..22c419534f 100644 --- a/arch/arm/lib/relocate.S +++ b/arch/arm/lib/relocate.S @@ -78,7 +78,13 @@ ENDPROC(relocate_vectors) */ ENTRY(relocate_code) - adr r3, relocate_code +/* + * Binutils doesn't comply with the arm docs for adr in thumb2 + * from commit d3e52e120b68bf19552743fbc078e0a759f48cb7 onward + * to remove ambiguity explicitly define the pseudo-instruction + */ + mov r3, pc + subs r3, #4 ldr r1, _image_copy_start_ofs add r1, r3 /* r1 <- Run &__image_copy_start */ subs r4, r0, r1 /* r4 <- Run to copy offset */ -- 2.36.1