From mboxrd@z Thu Jan 1 00:00:00 1970 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 CBA70C433EF for ; Sat, 2 Apr 2022 22:05:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3E54083988; Sun, 3 Apr 2022 00:05:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="OdU/qrUd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B20ED83988; Sun, 3 Apr 2022 00:05:21 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 26F1F8395F for ; Sun, 3 Apr 2022 00:05:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CF5E2B80AC2; Sat, 2 Apr 2022 22:05:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74C1EC340F2; Sat, 2 Apr 2022 22:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648937117; bh=YNp/QP1ZZoAIYcIJgxBwZpeIr6+wlYksfT5m6PLoGG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OdU/qrUdxtsRKMgisPY1xHYJwyNJbuHgmNYjawCySM/18yZGOnxASWCuFKbXljrM/ ULu5WWcs/ibLtTPp/XfuN7GM5mARV316I/cvKwNypBiysfrYmzkECms3ANoFgj0Omj 38WhIUvV+wZznT02xailP5MO34OdnrG3lk2rX5Nq8KdwZ35k7pZvSMXAkDH6sPeYaP R8OJMHZZ60sp9TVi2N6JiC0YnwqieFgCnztKraCUS/di7AUD2+6lETUB9nMw7TQ0qc 5BHRBao2cSYGEbH/EnBdNIPa0dYkukYBQoAhha4SOal2GKX3SmFwyftsSYZ6z8CVE+ GVfp8qEMeK1SA== Received: by pali.im (Postfix) id EDFC4FE8; Sun, 3 Apr 2022 00:05:14 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Priyanka Jain , Wolfgang Denk Cc: u-boot@lists.denx.de Subject: [PATCH 1/3] powerpc: mpc85xx: Drop _start symbol Date: Sun, 3 Apr 2022 00:05:08 +0200 Message-Id: <20220402220510.17879-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220402220510.17879-1-pali@kernel.org> References: <20220402220510.17879-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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.5 at phobos.denx.de X-Virus-Status: Clean _start symbol contains only 32-bit data number 0x27051956 despite it is marked as text section. This magic number is IH_MAGIC which is used for marking uboot image header. mpc85xx start.S code does not define valid uboot image header, so IH_MAGIC number in _start symbol is useless there. Moreover this _start symbol is not used at all. Entry point is at symbol _start_e500. So because this _start symbol is not used for anything, completely remove it with IH_MAGIC number. After _start symbol was _start_cont symbol, so replace all relative address calculations by _start_cont. Signed-off-by: Pali Rohár --- arch/powerpc/cpu/mpc85xx/start.S | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index 656cc6ec8024..71b04b9f7286 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -46,7 +46,6 @@ GOT_ENTRY(_FIXUP_TABLE_) #ifndef MINIMAL_SPL - GOT_ENTRY(_start) GOT_ENTRY(_start_of_vectors) GOT_ENTRY(_end_of_vectors) GOT_ENTRY(transfer_to_handler) @@ -1128,16 +1127,12 @@ switch_as: /*--------------------------------------------------------------*/ lis r3,CONFIG_SYS_MONITOR_BASE@h ori r3,r3,CONFIG_SYS_MONITOR_BASE@l - addi r3,r3,_start_cont - _start + addi r3,r3,_start_cont - _start_cont mtlr r3 blr #endif .text - .globl _start -_start: - .long 0x27051956 /* U-BOOT Magic Number */ - .globl _start_cont _start_cont: /* Setup the stack in initial RAM,could be L2-as-SRAM or L1 dcache*/ @@ -1604,7 +1599,7 @@ relocate_code: * initialization, now running from RAM. */ - addi r0,r10,in_ram - _start + addi r0,r10,in_ram - _start_cont /* * As IVPR is going to point RAM address, -- 2.20.1