Skip to content

Commit 6114139

Browse files
chleroympe
authored andcommitted
powerpc/vdso: Don't discard rela sections
After building the VDSO, there is a verification that it contains no dynamic relocation, see commit aff6927 ("vdso: Improve cmd_vdso_check to check all dynamic relocations"). This verification uses readelf -r and doesn't work if rela sections are discarded. Fixes: 8ad57ad ("powerpc/build: vdso linker warning for orphan sections") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/45c3e6fc76cad05ad2cac0f5b5dfb4fae86dc9d6.1724153239.git.christophe.leroy@csgroup.eu
1 parent d92b5cc commit 6114139

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ SECTIONS
7474
.got : { *(.got) } :text
7575
.plt : { *(.plt) }
7676

77+
.rela.dyn : { *(.rela .rela*) }
78+
7779
_end = .;
7880
__end = .;
7981
PROVIDE(end = .);
@@ -87,7 +89,7 @@ SECTIONS
8789
*(.branch_lt)
8890
*(.data .data.* .gnu.linkonce.d.* .sdata*)
8991
*(.bss .sbss .dynbss .dynsbss)
90-
*(.got1 .glink .iplt .rela*)
92+
*(.got1 .glink .iplt)
9193
}
9294
}
9395

arch/powerpc/kernel/vdso/vdso64.lds.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ SECTIONS
6969
.eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
7070
.eh_frame : { KEEP (*(.eh_frame)) } :text
7171
.gcc_except_table : { *(.gcc_except_table) }
72-
.rela.dyn ALIGN(8) : { *(.rela.dyn) }
72+
.rela.dyn ALIGN(8) : { *(.rela .rela*) }
7373

7474
.got ALIGN(8) : { *(.got .toc) }
7575

@@ -86,7 +86,7 @@ SECTIONS
8686
*(.data .data.* .gnu.linkonce.d.* .sdata*)
8787
*(.bss .sbss .dynbss .dynsbss)
8888
*(.opd)
89-
*(.glink .iplt .plt .rela*)
89+
*(.glink .iplt .plt)
9090
}
9191
}
9292

0 commit comments

Comments
 (0)