Skip to content

Commit

Permalink
rename jl_tls_offset in sysimage to avoid naming clash with `libjul…
Browse files Browse the repository at this point in the history
…ia-internal` (#49442)
  • Loading branch information
KristofferC authored Apr 24, 2023
1 parent 0a374d5 commit ad9b54f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/llvm-ptls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ bool LowerPTLS::run(bool *CFGModified)
if (imaging_mode) {
pgcstack_func_slot = create_aliased_global(T_pgcstack_getter, "jl_pgcstack_func_slot");
pgcstack_key_slot = create_aliased_global(getSizeTy(M->getContext()), "jl_pgcstack_key_slot"); // >= sizeof(jl_pgcstack_key_t)
pgcstack_offset = create_aliased_global(getSizeTy(M->getContext()), "jl_tls_offset");
pgcstack_offset = create_aliased_global(getSizeTy(M->getContext()), "jl_tls_offset_image");
}
need_init = false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/staticdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ static void jl_load_sysimg_so(void)
jl_pgcstack_getkey((jl_get_pgcstack_func**)pgcstack_func_slot, (jl_pgcstack_key_t*)pgcstack_key_slot);

size_t *tls_offset_idx;
jl_dlsym(jl_sysimg_handle, "jl_tls_offset", (void **)&tls_offset_idx, 1);
jl_dlsym(jl_sysimg_handle, "jl_tls_offset_image", (void **)&tls_offset_idx, 1);
*tls_offset_idx = (uintptr_t)(jl_tls_offset == -1 ? 0 : jl_tls_offset);

#ifdef _OS_WINDOWS_
Expand Down Expand Up @@ -3475,7 +3475,7 @@ JL_DLLEXPORT jl_value_t *jl_restore_package_image_from_file(const char *fname, j
jl_pgcstack_getkey((jl_get_pgcstack_func**)pgcstack_func_slot, (jl_pgcstack_key_t*)pgcstack_key_slot);

size_t *tls_offset_idx;
jl_dlsym(pkgimg_handle, "jl_tls_offset", (void **)&tls_offset_idx, 1);
jl_dlsym(pkgimg_handle, "jl_tls_offset_image", (void **)&tls_offset_idx, 1);
*tls_offset_idx = (uintptr_t)(jl_tls_offset == -1 ? 0 : jl_tls_offset);
}

Expand Down

0 comments on commit ad9b54f

Please sign in to comment.