From d9bf693fb8b81854bb39f21b7e64496130b8e53a Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sat, 17 Aug 2024 15:09:00 +0900 Subject: [PATCH] [LoongArch] Do not emit local symbols by default --- src/cmdline.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmdline.cc b/src/cmdline.cc index af2595af17..9d29c87ae2 100644 --- a/src/cmdline.cc +++ b/src/cmdline.cc @@ -567,9 +567,9 @@ std::vector parse_nonpositional_args(Context &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) + // 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 || is_loongarch) ctx.arg.discard_locals = true; // We generally don't need to write addends to relocated places if the