Re: [PATCH v3] arm64: lds: move .got section out of .text

From: Will Deacon
Date: Tue May 02 2023 - 08:14:42 EST


On Tue, 2 May 2023 07:41:05 +0000, Fangrui Song wrote:
> Currently, the .got section is placed within the output section .text.
> However, when .got is non-empty, the SHF_WRITE flag is set for .text
> when linked by lld. GNU ld recognizes .text as a special section and
> ignores the SHF_WRITE flag. By renaming .text, we can also get the
> SHF_WRITE flag.
>
> The kernel has performed R_AARCH64_RELATIVE resolving very early, and can
> then assume that .got is read-only. Let's move .got to the vmlinux_rodata
> pseudo-segment.
>
> [...]

Applied to arm64 (for-next/core), thanks!

[1/1] arm64: lds: move .got section out of .text
https://git.kernel.org/arm64/c/0fddb79bf283

Cheers,
--
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev