Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <jan.vorlicek@volny.cz>2021-07-28 23:51:25 +0300
committerGitHub <noreply@github.com>2021-07-28 23:51:25 +0300
commit39803d4d3cbf818641437afb7402da15fa076bec (patch)
treeebe9aa0f5247561188afe3196c6eeb52c057524b /eng/native/functions.cmake
parentbeaea95307ab7b4702054aeadc0ec4cb268103ee (diff)
Fix redhat arm64 (#52244)
* Fix RHEL 8 ARM64 Clang on ARM64 places the .rodata section into the same segment as .text. On RHEL 8 ARM64, the kernel is configured for 64kB memory pages. When we flip the page protection of the page containing the GS cookie to RW and back to RO, we assume that the cookie lives in a non-executable memory. This assumption is broken on RHEL 8 and we end up setting protection of a part of the coreclr code to read only instead of back to RX. This change switches the linker we use to lld from the previously used gnu linker. That linker places .rodata into a different segment than .text by default. Moreover, I was planning to move to using lld anyways to use all build tools from LLVM. * Fix ARM build to use PC relative addresses only The lld linker has revealed that we were using absolute addresses in some asm helpers and so load time relocation was necessary. This change fixes it by replacing all of those by PC relative ones. * Update docker images used for building runtime Use new images that have lld linker * Disable lld linker for s390x
Diffstat (limited to 'eng/native/functions.cmake')
-rw-r--r--eng/native/functions.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
index 1ca230c3e53..0d03cc3d2d4 100644
--- a/eng/native/functions.cmake
+++ b/eng/native/functions.cmake
@@ -157,7 +157,7 @@ function(preprocess_files PreprocessedFilesList)
endfunction()
function(set_exports_linker_option exports_filename)
- if(LD_GNU OR LD_SOLARIS)
+ if(LD_GNU OR LD_SOLARIS OR LD_LLVM)
# Add linker exports file option
if(LD_SOLARIS)
set(EXPORTS_LINKER_OPTION -Wl,-M,${exports_filename} PARENT_SCOPE)