From 8fe3802486ec61163e8fccfc737a6808d90c392b Mon Sep 17 00:00:00 2001 From: park671 Date: Wed, 6 Nov 2024 10:54:55 +0800 Subject: [PATCH] bugfix: fix elf executable relocate flag --- generator/assembler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/assembler.cpp b/generator/assembler.cpp index 5b6c41b..5abc291 100644 --- a/generator/assembler.cpp +++ b/generator/assembler.cpp @@ -67,7 +67,7 @@ void generateTargetFile( Elf64_Shdr *shstrtabSectionHeader = createSectionHeader(SHSTRTAB_SECTION_IDX, SHT_STRTAB, - SHF_STRINGS, + SHF_STRINGS | SHF_ALLOC, currentOffset, currentOffset, 52, @@ -80,7 +80,7 @@ void generateTargetFile( int sectionHeaderOffset = programHeaderOffset + (sizeof(Elf64_Phdr) * programHeaderCount); - Elf64_Ehdr *elfHeader = createElfHeader(ET_EXEC, + Elf64_Ehdr *elfHeader = createElfHeader(ET_DYN, EM_AARCH64, programEntry, programHeaderOffset,