riscv: vdso.lds.S: merge .data section into .rodata section
authorJisheng Zhang <jszhang@kernel.org>
Tue, 12 Sep 2023 07:20:14 +0000 (15:20 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sun, 5 Nov 2023 22:15:13 +0000 (14:15 -0800)
The .data section doesn't need to be separate from .rodata section,
they are both readonly.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Tested-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Link: https://lore.kernel.org/r/20230912072015.2424-3-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/vdso/vdso.lds.S

index d43fd7c7dd1173c7b655a6d119faeaa842d63723..671aa21769bcfbecb0148fb2d5a21e7b356a73bf 100644 (file)
@@ -29,7 +29,13 @@ SECTIONS
        .eh_frame_hdr   : { *(.eh_frame_hdr) }          :text   :eh_frame_hdr
        .eh_frame       : { KEEP (*(.eh_frame)) }       :text
 
-       .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+       .rodata         : {
+               *(.rodata .rodata.* .gnu.linkonce.r.*)
+               *(.got.plt) *(.got)
+               *(.data .data.* .gnu.linkonce.d.*)
+               *(.dynbss)
+               *(.bss .bss.* .gnu.linkonce.b.*)
+       }
 
        /*
         * This linker script is used both with -r and with -shared.
@@ -44,13 +50,6 @@ SECTIONS
        .alternative : {
                *(.alternative)
        }
-
-       .data           : {
-               *(.got.plt) *(.got)
-               *(.data .data.* .gnu.linkonce.d.*)
-               *(.dynbss)
-               *(.bss .bss.* .gnu.linkonce.b.*)
-       }
 }
 
 /*