[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQgKN2YuHpZ9Ts1oNgY4pMCrqmwZzjQaaUUAOdT8A0dbw@mail.gmail.com>
Date: Wed, 13 Nov 2024 20:12:33 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>, Klara Modin <klarasmodin@...il.com>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
Rong Xu <xur@...gle.com>
Subject: Re: [PATCH v2] MIPS: move _stext definition to vmlinux.lds.S
Hi Thomas,
This patch is necessary to avoid regression in my kbuild tree.
Your Ack is appreciated.
On Wed, Nov 13, 2024 at 3:40 PM Rong Xu <xur@...gle.com> wrote:
>
> The _stext symbol is intended to reference the start of the text section.
> However, it currently relies on a fragile link order because the existing
> EXPORT(_stext) resides within the .text section, which is not guaranteed
> to be placed first.
>
> Move the _stext definition to the linker script to enforce an explicit
> ordering.
>
> Signed-off-by: Rong Xu <xur@...gle.com>
> Reported-by: Klara Modin <klarasmodin@...il.com>
> Tested-by: Klara Modin <klarasmodin@...il.com>
> ---
> V2 Changelog:
> Incorporated Masahiro Yamada's suggestions:
> 1. Refined the commit message
> 2. Removed unnecessary comments
> 3. Use a standardized way for _stext definition
> ---
> arch/mips/kernel/head.S | 2 --
> arch/mips/kernel/vmlinux.lds.S | 1 +
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
> index b825ed4476c7..e90695b2b60e 100644
> --- a/arch/mips/kernel/head.S
> +++ b/arch/mips/kernel/head.S
> @@ -67,8 +67,6 @@
> .fill 0x400
> #endif
>
> -EXPORT(_stext)
> -
> #ifdef CONFIG_BOOT_RAW
> /*
> * Give us a fighting chance of running if execution beings at the
> diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
> index 9ff55cb80a64..d575f945d422 100644
> --- a/arch/mips/kernel/vmlinux.lds.S
> +++ b/arch/mips/kernel/vmlinux.lds.S
> @@ -60,6 +60,7 @@ SECTIONS
> . = LINKER_LOAD_ADDRESS;
> /* read-only */
> _text = .; /* Text and read-only data */
> + _stext = .;
> .text : {
> TEXT_TEXT
> SCHED_TEXT
>
> base-commit: 06513ddaf77b8f49ef8540c92d92c9ef0ad49426
> --
> 2.47.0.338.g60cca15819-goog
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists