Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openrisc: place exception table at the head of vmlinux
Since commit 0043ece ("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: 0043ece ("vmlinux.lds.h: Adjust symbol ordering in text output section") Reported-by: Guenter Roeck <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/#t Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Rong Xu <[email protected]> Signed-off-by: Stafford Horne <[email protected]>
- Loading branch information