From 8f946ddedda18836cfc4846e8496b30772503267 Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Fri, 5 Sep 2008 19:59:44 -0400 Subject: [PATCH] OK, I guess both of them. --- elfload/Makefile | 2 +- elfload/loader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elfload/Makefile b/elfload/Makefile index b6bb390..be876f8 100644 --- a/elfload/Makefile +++ b/elfload/Makefile @@ -1,4 +1,4 @@ -loader: +loader: loader.c gcc loader.c -o loader clean: diff --git a/elfload/loader.c b/elfload/loader.c index 80f0990..a231c85 100644 --- a/elfload/loader.c +++ b/elfload/loader.c @@ -73,7 +73,7 @@ int load_elf (char * buf) { char * section_name = string_table + elf_sec_hdrs[i].sh_name; - if (elf_sec_hdrs[i].sh_type != SHT_PROGBITS) { + if ((elf_sec_hdrs[i].sh_type != SHT_PROGBITS) || !(elf_sec_hdrs[i].sh_flags & SHF_ALLOC)) { printf("Skipping %s...\n", section_name); continue; } -- 2.43.0