Skip to content

Commit

Permalink
RISC-V: Define __global_pointer$ for DSO
Browse files Browse the repository at this point in the history
Fixes #1182
  • Loading branch information
rui314 committed Feb 26, 2024
1 parent 48f6a08 commit 58558e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions elf/passes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,7 @@ void add_synthetic_symbols(Context<E> &ctx) {
ctx._TLS_MODULE_BASE_ = add("_TLS_MODULE_BASE_", STT_TLS);

if constexpr (is_riscv<E>)
if (!ctx.arg.shared)
ctx.__global_pointer = add("__global_pointer$");
ctx.__global_pointer = add("__global_pointer$");

if constexpr (is_arm32<E>) {
ctx.__exidx_start = add("__exidx_start");
Expand Down

0 comments on commit 58558e3

Please sign in to comment.