arm64: vdso: remove two .altinstructions related symbols
PATCH 1/1 arm64: vdso: remove two .altinstructions related symbols
The two symbols __alt_instructions and __alt_instructions_end are not used, remove them.
--- arch/arm64/kernel/vdso/vdso.lds.S | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/kernel/vdso/vdso.lds.S +0 -2
@@ -50,9 +50,7 @@ SECTIONS . = ALIGN(4); .altinstructions : { - __alt_instructions = .; *(.altinstructions) - __alt_instructions_end = .; } .dynamic : { *(.dynamic) } :text :dynamic
Signature · 1 line
2.40.1
Will Deacon
maintainerQuoted 13 lines · Jisheng Zhang
The two symbols
__alt_instructionsand__alt_instructions_endare not used, remove them.Signed-off-by Jisheng Zhang <[email protected]>--- arch/arm64/kernel/vdso/vdso.lds.S | 2 -- 1 file changed, 2 deletions(-)arch/arm64/kernel/vdso/vdso.lds.S +0
-0
arch/arm64/kernel/vdso/vdso.lds.S SECTIONS · line 54
Quoted 7 lines
arch/arm64/kernel/vdso/vdso.lds.S +0
-2@@ -50,9 +50,7 @@ SECTIONS . = ALIGN(4); .altinstructions : { - __alt_instructions = .; *(.altinstructions) - __alt_instructions_end = .; }
If we don't need the symbols, then why do we need this section at all?
Will
Hi,
Quoted 15 lines · Will Deacon
Quoted 14 lines · Jisheng Zhang
The two symbols
__alt_instructionsand__alt_instructions_endare not used, remove them.Signed-off-by Jisheng Zhang <[email protected]>--- arch/arm64/kernel/vdso/vdso.lds.S | 2 -- 1 file changed, 2 deletions(-)arch/arm64/kernel/vdso/vdso.lds.S +0
-0@@ -50,9 +50,7 @@ SECTIONS
Quoted 8 lines
arch/arm64/kernel/vdso/vdso.lds.S SECTIONS · line 54
Quoted 6 lines
arch/arm64/kernel/vdso/vdso.lds.S +0
-2. = ALIGN(4); .altinstructions : { - __alt_instructions = .; *(.altinstructions) - __alt_instructions_end = .; }If we don't need the symbols, then why do we need this section at all?
Looks like it was a copy/paste from my commit 4e3bca8f7cdd ("arm64: alternative: patch alternatives in the vDSO"). The VDSO patching code searches for a section named '.altinstructions' by
reading the VDSO as an ELF file, and doesn't use the __alt_instructions / __alt_instructions_end symbols. The kernel patching code uses the__alt_instructions symbol (from the vmlinux.ld.S linker script).
So it's safe to remove these, but the section itself needs to stay.
Thanks,
Joey
Quoted 4 lines · Jisheng Zhang
The two symbols
__alt_instructionsand__alt_instructions_endare not used, remove them.
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64: vdso: remove two .altinstructions related symbols
https://git.kernel.org/arm64/c/a96a7a7ddf95
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev