From: Robert Pengelly Date: Thu, 6 Nov 2025 07:20:22 +0000 (+0000) Subject: Fixed ELF sh_flags X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=fde0a36a6ff57f7db38c8b4156c1c8228791efaf;p=slink.git Fixed ELF sh_flags --- diff --git a/elf.c b/elf.c index 7accc07..121c552 100644 --- a/elf.c +++ b/elf.c @@ -1294,11 +1294,11 @@ static uint32_t translate_section_flags_to_sh_flags (uint32_t flags) { sh_flags |= SHF_WRITE; } - if (flags & SECTION_FLAG_CODE) { + if (flags & SECTION_FLAG_ALLOC) { sh_flags |= SHF_ALLOC; } - if (!(flags & SECTION_FLAG_NOREAD)) { + if (flags & SECTION_FLAG_CODE) { sh_flags |= SHF_EXEC_INSTR; }