mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 21:45:29 +00:00
Kernel/riscv64: Explicitly discard temporary local symbols
This is for some reason needed for riscv64 clang, as otherwise the kernel.map file would grow too big to fit in its section inside the kernel image. None of our other architectures have temporary locals in their kernel.map.
This commit is contained in:
committed by
Andrew Kaster
parent
da33e2a564
commit
dfce2f6341
@@ -759,7 +759,10 @@ if("${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||
target_link_options(Kernel PRIVATE LINKER:-T ${CMAKE_CURRENT_SOURCE_DIR}/Arch/aarch64/linker.ld -nostdlib LINKER:--no-pie)
|
||||
set_target_properties(Kernel PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Arch/aarch64/linker.ld)
|
||||
elseif("${SERENITY_ARCH}" STREQUAL "riscv64")
|
||||
target_link_options(Kernel PRIVATE LINKER:-T ${CMAKE_CURRENT_SOURCE_DIR}/Arch/riscv64/linker.ld -nostdlib LINKER:--no-pie)
|
||||
# The final kernel binary for some reason includes temporary local symbols on riscv64 clang, which causes kernel.map to be too big to fit in its section in the kernel.
|
||||
# Explicitly pass -X to the linker to remove them.
|
||||
target_link_options(Kernel PRIVATE LINKER:-T ${CMAKE_CURRENT_SOURCE_DIR}/Arch/riscv64/linker.ld -nostdlib LINKER:--no-pie LINKER:-X)
|
||||
|
||||
set_target_properties(Kernel PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Arch/riscv64/linker.ld)
|
||||
elseif ("${SERENITY_ARCH}" STREQUAL "x86_64")
|
||||
add_custom_command(
|
||||
|
||||
Reference in New Issue
Block a user