From 871fa86f494e4f2ac179440f2c8d83fcf8bfc836 Mon Sep 17 00:00:00 2001 From: lw Date: Wed, 9 Aug 2023 21:19:07 +0800 Subject: [PATCH] fix warning in static-nolibc mode --- src/elf_check_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/elf_check_elf.c b/src/elf_check_elf.c index b70ef9d..12a06aa 100644 --- a/src/elf_check_elf.c +++ b/src/elf_check_elf.c @@ -79,7 +79,8 @@ static void check_rela_dyn(elf_link_t *elf_link, elf_file_t *out_ef) } Elf64_Sym *sym = elf_get_dynsym_by_rela(out_ef, rela); const char *sym_name = elf_get_sym_name(out_ef, sym); - if (is_dynsym_valid(sym, sym_name) == false) { + if (is_dynsym_valid(sym, sym_name) == false + && !is_static_nolibc_mode(elf_link)) { SI_LOG_EMERG("%s is UND\n", sym_name); } } -- Gitee