diff mbox series

[3/4] vmlinux.lds.h: use correct .init.data.* section name

Message ID 20230511141211.2418-4-jszhang@kernel.org (mailing list archive)
State Superseded
Headers show
Series riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION | expand

Checks

Context Check Description
conchuod/tree_selection fail Failed to apply to next/pending-fixes or riscv/for-next

Commit Message

Jisheng Zhang May 11, 2023, 2:12 p.m. UTC
If building with -fdata-sections on riscv, LD_ORPHAN_WARN will warn
similar as below:

riscv64-linux-gnu-ld: warning: orphan section `.init.data.efi_loglevel'
from `./drivers/firmware/efi/libstub/printk.stub.o' being placed in
section `.init.data.efi_loglevel'

I believe this is caused by a a typo:
init.data.* should be .init.data.*

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guo Ren June 1, 2023, 4:58 a.m. UTC | #1
On Thu, May 11, 2023 at 10:27 PM Jisheng Zhang <jszhang@kernel.org> wrote:
>
> If building with -fdata-sections on riscv, LD_ORPHAN_WARN will warn
> similar as below:
>
> riscv64-linux-gnu-ld: warning: orphan section `.init.data.efi_loglevel'
> from `./drivers/firmware/efi/libstub/printk.stub.o' being placed in
> section `.init.data.efi_loglevel'
>
> I believe this is caused by a a typo:
> init.data.* should be .init.data.*
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Seems it's a fixup for all architectures, what's the Fix: tag?

> ---
>  include/asm-generic/vmlinux.lds.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index d1f57e4868ed..371026ca7221 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -688,7 +688,7 @@
>  /* init and exit section handling */
>  #define INIT_DATA                                                      \
>         KEEP(*(SORT(___kentry+*)))                                      \
> -       *(.init.data init.data.*)                                       \
> +       *(.init.data .init.data.*)                                      \
>         MEM_DISCARD(init.data*)                                         \
>         KERNEL_CTORS()                                                  \
>         MCOUNT_REC()                                                    \
> --
> 2.40.1
>
diff mbox series

Patch

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index d1f57e4868ed..371026ca7221 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -688,7 +688,7 @@ 
 /* init and exit section handling */
 #define INIT_DATA							\
 	KEEP(*(SORT(___kentry+*)))					\
-	*(.init.data init.data.*)					\
+	*(.init.data .init.data.*)					\
 	MEM_DISCARD(init.data*)						\
 	KERNEL_CTORS()							\
 	MCOUNT_REC()							\