Skip to content

Commit

Permalink
[LoongArch] Do not emit local symbols by default
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Aug 17, 2024
1 parent cf38f81 commit d9bf693
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmdline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ std::vector<std::string> parse_nonpositional_args(Context<E> &ctx) {
}
};

// RISC-V object files contains lots of local symbols, so by default
// we discard them. This is compatible with GNU ld.
if constexpr (is_riscv<E>)
// RISC-V and LoongArch object files contains lots of local symbols,
// so by default we discard them. This is compatible with GNU ld.
if constexpr (is_riscv<E> || is_loongarch<E>)
ctx.arg.discard_locals = true;

// We generally don't need to write addends to relocated places if the
Expand Down

0 comments on commit d9bf693

Please sign in to comment.