mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Userland: Set linker max page size to 4096
Neither the kernel nor LibELF support loading libraries with larger PT_LOAD alignment. The default on x86 is 4096 while it's 2MiB on x86_64. This changes the alignment to 4096 on all platforms.
This commit is contained in:
parent
e979a88af4
commit
e35b060501
Notes:
sideshowbarker
2024-07-18 11:22:43 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/e35b0605013 Pull-request: https://github.com/SerenityOS/serenity/pull/8301
2 changed files with 2 additions and 2 deletions
|
@ -182,7 +182,7 @@ endforeach()
|
|||
set(CMAKE_INSTALL_NAME_TOOL "")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack")
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack")
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,max-page-size=0x1000")
|
||||
|
||||
# We disable it completely because it makes cmake very spammy.
|
||||
# This will need to be revisited when the Loader supports RPATH/RUN_PATH.
|
||||
|
|
|
@ -356,7 +356,7 @@ if (NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS)
|
|||
endif()
|
||||
|
||||
if ("${SERENITY_ARCH}" STREQUAL "x86_64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large -fno-pic -mno-red-zone -z max-page-size=0x1000")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large -fno-pic -mno-red-zone")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue