Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Jun 24, 2024
1 parent c419dcd commit f60fada
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions elf/arch-riscv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
break;
case R_RISCV_64:
if constexpr (!E::is_64)
Fatal(ctx) << *this << ": R_RISCV_64 cannot be used on RV32";
Error(ctx) << *this << ": R_RISCV_64 cannot be used on RV32";
scan_dyn_absrel(ctx, sym, rel);
break;
case R_RISCV_CALL:
Expand Down Expand Up @@ -854,7 +854,7 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
break;
case R_RISCV_GPREL_HI20:
if (ctx.arg.shared)
Fatal(ctx) << *this << ": R_RISCV_GPREL_HI20 may not be used with -shared";
Error(ctx) << *this << ": R_RISCV_GPREL_HI20 may not be used with -shared";
break;
case R_RISCV_BRANCH:
case R_RISCV_JAL:
Expand Down
2 changes: 1 addition & 1 deletion elf/lto-unix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ static void load_lto_plugin(Context<E> &ctx) {
phase = 1;
gctx<E> = &ctx;

void *handle = dlopen(ctx.arg.plugin.c_str(), RTLD_NOW | RTLD_GLOBAL);
void *handle = dlopen(ctx.arg.plugin.c_str(), RTLD_NOW | RTLD_LOCAL);
if (!handle)
Fatal(ctx) << "could not open plugin file: " << dlerror();

Expand Down

0 comments on commit f60fada

Please sign in to comment.