Skip to content

Commit 49cfbdc

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: vdso.lds.S: merge .data section into .rodata section
The .data section doesn't need to be separate from .rodata section, they are both readonly. Signed-off-by: Jisheng Zhang <[email protected]> Tested-by: Emil Renner Berthing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent ddcc7d9 commit 49cfbdc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

arch/riscv/kernel/vdso/vdso.lds.S

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ SECTIONS
2929
.eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
3030
.eh_frame : { KEEP (*(.eh_frame)) } :text
3131

32-
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
32+
.rodata : {
33+
*(.rodata .rodata.* .gnu.linkonce.r.*)
34+
*(.got.plt) *(.got)
35+
*(.data .data.* .gnu.linkonce.d.*)
36+
*(.dynbss)
37+
*(.bss .bss.* .gnu.linkonce.b.*)
38+
}
3339

3440
/*
3541
* This linker script is used both with -r and with -shared.
@@ -44,13 +50,6 @@ SECTIONS
4450
.alternative : {
4551
*(.alternative)
4652
}
47-
48-
.data : {
49-
*(.got.plt) *(.got)
50-
*(.data .data.* .gnu.linkonce.d.*)
51-
*(.dynbss)
52-
*(.bss .bss.* .gnu.linkonce.b.*)
53-
}
5453
}
5554

5655
/*

0 commit comments

Comments
 (0)