mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 08:47:35 +00:00
DynamicLoader+Userland: Enable RELRO for shared libraries as well :^)
To support this, I had to reorganize the "load_elf" function into two passes. First we map all the dynamic objects, to get their symbols into the global lookup table. Then we link all the dynamic objects. So many read-only GOT's! :^)
This commit is contained in:
parent
fa4c249425
commit
713b3b36be
2 changed files with 31 additions and 23 deletions
|
@ -146,7 +146,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")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,--hash-style=gnu,-z,relro,-z,now")
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,--hash-style=gnu,-z,relro,-z,now")
|
||||
|
||||
# We disable it completely because it makes cmake very spammy.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue