[PATCH 1/4] riscv: lds: define RUNTIME_DISCARD_EXIT

Conor Dooley conor at kernel.org
Mon Jan 16 22:27:04 PST 2023



On 17 January 2023 00:06:06 GMT, Jisheng Zhang <jszhang at kernel.org> wrote:
>On Mon, Jan 16, 2023 at 04:43:05PM +0000, Conor Dooley wrote:
>> On Mon, Jan 16, 2023 at 11:47:57PM +0800, Jisheng Zhang wrote:
>> > riscv discards .exit.* sections at run-time but doesn't define
>> > RUNTIME_DISCARD_EXIT. However, the .exit.* sections are still allocated
>> > and kept even if the generic DISCARDS would discard the sections due
>> > to missing RUNTIME_DISCARD_EXIT, because the DISCARD sits at the end of
>> > the linker script. Add the missing RUNTIME_DISCARD_EXIT define so that
>> > it still works if we move DISCARD up or even at the beginning of the
>> > linker script.
>> > 
>> > Signed-off-by: Jisheng Zhang <jszhang at kernel.org>
>> > Suggested-by: Masahiro Yamada <masahiroy at kernel.org>
>> > ---
>> >  arch/riscv/kernel/vmlinux.lds.S | 1 +
>> >  1 file changed, 1 insertion(+)
>> > 
>> > diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
>> > index 4e6c88aa4d87..07c19f2a288c 100644
>> > --- a/arch/riscv/kernel/vmlinux.lds.S
>> > +++ b/arch/riscv/kernel/vmlinux.lds.S
>> > @@ -5,6 +5,7 @@
>> >   */
>> >  
>> >  #define RO_EXCEPTION_TABLE_ALIGN	4
>> > +#define RUNTIME_DISCARD_EXIT
>> >  
>> >  #ifdef CONFIG_XIP_KERNEL
>> >  #include "vmlinux-xip.lds.S"
>> 
>> Since the diff is identical to:
>> https://patchwork.kernel.org/project/linux-riscv/patch/20230102124936.1363533-1-conor@kernel.org/
>
>OOPS, I didn't notice you submitted the patch which did similar
>about RUNTIME_DISCARD_EXIT, then I'd like to recall patch1. I
>expected some review comments for remainning patch2\3\4, I will
>send v2 which will both address possible review comments and
>remove patch1

Nah, keep your patch in the series.
I'll mark mine as superseded in patchwork.




More information about the linux-riscv mailing list