Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 557cddc

Browse files
committed
Fix missing CHAIN_SUCCESS_COUNTER symbol in libcoreclr.so
Certain versions of the clang toolchain build libcoreclr.so with this symbol undefined. This symbol is just an alias of g_dispatch_cache_chain_success_counter and the issue was probably caused by the fact that we pass the CHAIN_SUCCESS_COUNTER as a parameter to macro and that macro then appends the @GOTPCREL to the symbol. It seems that in the problematic case, the assembler appends the @GOTPCREL to the CHAIN_SUCCESS_COUNTER instead of the original g_dispatch_cache_chain_success_counter symbol. Changing the CHAIN_SUCCESS_COUNTER = g_dispatch_cache_chain_success_counter to #define CHAIN_SUCCESS_COUNTER g_dispatch_cache_chain_success_counter fixes the issue. [tfs-changeset: 1411600]
1 parent 2646f6c commit 557cddc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vm/amd64/virtualcallstubamd64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// entry is promoted to the front of the chain. This is declared as extern because
1111
// the default value (CALL_STUB_CACHE_INITIAL_SUCCESS_COUNT) is defined in the header.
1212
// extern size_t g_dispatch_cache_chain_success_counter;
13-
CHAIN_SUCCESS_COUNTER = g_dispatch_cache_chain_success_counter
13+
#define CHAIN_SUCCESS_COUNTER g_dispatch_cache_chain_success_counter
1414

1515
// The reason for not using .equ or '=' here is that otherwise the assembler compiles e.g.
1616
// mov rax, BACKPATCH_FLAG as mov rax, [BACKPATCH_FLAG]

0 commit comments

Comments
 (0)