Skip to content

Commit 4274929

Browse files
jgoulywilldeacon
authored andcommitted
arm64: vdso*: place got/plt sections in .rodata
The vDSO will not contain absolute relocations, so place these sections in .rodata. Signed-off-by: Joey Gouly <[email protected]> Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/ Cc: Will Deacon <[email protected]> Cc: Vincenzo Frascino <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 5c4fb60 commit 4274929

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

arch/arm64/kernel/vdso/vdso.lds.S

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,15 @@ SECTIONS
5252

5353
.rela.dyn : ALIGN(8) { *(.rela .rela*) }
5454

55-
.plt : {
55+
.rodata : {
56+
*(.rodata*)
57+
*(.got)
58+
*(.got.plt)
5659
*(.plt)
5760
*(.plt.*)
5861
*(.iplt)
5962
*(.igot .igot.plt)
60-
}
61-
62-
.got : { *(.got) }
63-
.got.plt : { *(.got.plt) }
64-
65-
.rodata : { *(.rodata*) } :text
63+
} :text
6664

6765
_end = .;
6866
PROVIDE(end = .);

arch/arm64/kernel/vdso32/vdso.lds.S

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ SECTIONS
3636

3737
.dynamic : { *(.dynamic) } :text :dynamic
3838

39-
.rodata : { *(.rodata*) } :text
39+
.rodata : {
40+
*(.rodata*)
41+
*(.got)
42+
*(.got.plt)
43+
*(.plt)
44+
*(.rel.iplt)
45+
*(.iplt)
46+
*(.igot.plt)
47+
} :text
4048

4149
.text : {
4250
*(.text*)
@@ -46,18 +54,7 @@ SECTIONS
4654
*(.v4_bx)
4755
} :text =0xe7f001f2
4856

49-
.rel.dyn : { *(.rel.text) }
50-
51-
.got : { *(.got) }
52-
.rel.got : { *(.rel.got) }
53-
.got.plt : { *(.got.plt) }
54-
.rel.plt : { *(.rel.plt) }
55-
.plt : {
56-
*(.plt)
57-
*(.rel.iplt)
58-
*(.iplt)
59-
*(.igot.plt)
60-
}
57+
.rel.dyn : { *(.rel*) }
6158

6259
ELF_DETAILS
6360
.ARM.exidx : { *(.ARM.exidx*) }

0 commit comments

Comments
 (0)