diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-12-02 15:28:22 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2024-12-10 12:04:19 +0000 |
commit | a412f04070e52e6d6b5f6f964b9d9644de16bb81 (patch) | |
tree | d591fac6259b0a747a941377a77c60da99c1c014 /scripts | |
parent | fac04efc5c793dccbd07e2d59af9f90b7fc0dca4 (diff) | |
download | lwn-a412f04070e52e6d6b5f6f964b9d9644de16bb81.tar.gz lwn-a412f04070e52e6d6b5f6f964b9d9644de16bb81.zip |
openrisc: place exception table at the head of vmlinux
Since commit 0043ecea2399 ("vmlinux.lds.h: Adjust symbol ordering in
text output section"), the exception table in arch/openrisc/kernel/head.S
is no longer positioned at the very beginning of the kernel image, which
causes a boot failure.
Currently, the exception table resides in the regular .text section.
Previously, it was placed at the head by relying on the linker receiving
arch/openrisc/kernel/head.o as the first object. However, this behavior
has changed because sections like .text.{asan,unknown,unlikely,hot} now
precede the regular .text section.
The .head.text section is intended for entry points requiring special
placement. However, in OpenRISC, this section has been misused: instead
of the entry points, it contains boot code meant to be discarded after
booting. This feature is typically handled by the .init.text section.
This commit addresses the issue by replacing the current __HEAD marker
with __INIT and re-annotating the entry points with __HEAD. Additionally,
it adds __REF to entry.S to suppress the following modpost warning:
WARNING: modpost: vmlinux: section mismatch in reference: _tng_kernel_start+0x70 (section: .text) -> _start (section: .init.text)
Fixes: 0043ecea2399 ("vmlinux.lds.h: Adjust symbol ordering in text output section")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/5e032233-5b65-4ad5-ac50-d2eb6c00171c@roeck-us.net/#t
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Rong Xu <xur@google.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/head-object-list.txt | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/scripts/head-object-list.txt b/scripts/head-object-list.txt index f12b4a7b8406..7274dfc65af6 100644 --- a/scripts/head-object-list.txt +++ b/scripts/head-object-list.txt @@ -24,7 +24,6 @@ arch/m68k/kernel/head.o arch/m68k/kernel/sun3-head.o arch/microblaze/kernel/head.o arch/nios2/kernel/head.o -arch/openrisc/kernel/head.o arch/parisc/kernel/head.o arch/powerpc/kernel/head_44x.o arch/powerpc/kernel/head_64.o |