From 487291ec5dcf7e63b56aabf1f7f2c9369bd1ea3d Mon Sep 17 00:00:00 2001 From: l00580197 Date: Tue, 8 Aug 2023 19:41:51 +0800 Subject: [PATCH] modify read begin section type --- src/elf_link_elf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/elf_link_elf.c b/src/elf_link_elf.c index 96a3acd..c71c3df 100644 --- a/src/elf_link_elf.c +++ b/src/elf_link_elf.c @@ -353,6 +353,8 @@ static void write_interp_and_note(elf_link_t *elf_link) if (is_static_nolibc_mode(elf_link)) { begin_sec = elf_find_section_by_name(template_ef, ".note.gnu.property"); + if (begin_sec == NULL) + begin_sec = elf_find_section_by_name(template_ef, ".note.gnu.build-id"); } else { begin_sec = elf_find_section_by_name(template_ef, ".interp"); } -- Gitee