From f1abcd31c55f34c404066819b261e1f53408eecb Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Tue, 20 Jul 2021 00:55:16 -0700 Subject: [PATCH] Limit the lld usage to Linux, fix arm32 issue --- eng/native/configuretools.cmake | 2 +- src/coreclr/vm/arm/asmhelpers.S | 5 +---- src/coreclr/vm/arm/pinvokestubs.S | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/eng/native/configuretools.cmake b/eng/native/configuretools.cmake index f7cbc7a5048ee..4382daf7a04ae 100644 --- a/eng/native/configuretools.cmake +++ b/eng/native/configuretools.cmake @@ -65,7 +65,7 @@ endif() if (NOT CLR_CMAKE_HOST_WIN32) - if (CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT CLR_CMAKE_HOST_ARCH_S390X AND NOT CLR_CMAKE_HOST_OSX AND NOT CLR_CMAKE_HOST_FREEBSD) + if (CMAKE_C_COMPILER_ID MATCHES "Clang" AND CLR_CMAKE_HOST_LINUX AND NOT CLR_CMAKE_HOST_ARCH_S390X) add_linker_flag(-fuse-ld=lld) set(LD_LLVM 1) else() diff --git a/src/coreclr/vm/arm/asmhelpers.S b/src/coreclr/vm/arm/asmhelpers.S index decc14d01ca7f..74c849402cbec 100644 --- a/src/coreclr/vm/arm/asmhelpers.S +++ b/src/coreclr/vm/arm/asmhelpers.S @@ -986,13 +986,10 @@ g_rgWriteBarrierDescriptors: LEAF_ENTRY JIT_WriteBarrier_Callable // Branch to the write barrier - ldr r2, 2f // or R3? See targetarm.h + ldr r2, =JIT_WriteBarrier_Loc-(1f+4) // or R3? See targetarm.h 1: add r2, pc - ldr r2, [r2] ldr pc, [r2] -2: - .long JIT_WriteBarrier_Loc(GOT_PREL)-((1b+4)-2b) LEAF_END JIT_WriteBarrier_Callable #ifdef FEATURE_READYTORUN diff --git a/src/coreclr/vm/arm/pinvokestubs.S b/src/coreclr/vm/arm/pinvokestubs.S index d8551b5875c33..cd4928003b593 100644 --- a/src/coreclr/vm/arm/pinvokestubs.S +++ b/src/coreclr/vm/arm/pinvokestubs.S @@ -94,7 +94,7 @@ // r4 = pFrame // set first slot to the value of InlinedCallFrame::`vftable' (checked by runtime code) - ldr r1, =_ZTV16InlinedCallFrame+8-2f + ldr r1, =_ZTV16InlinedCallFrame+8-(2f+4) 2: add r1, pc str r1, [r4]