From: Joshua Wise Date: Fri, 5 Sep 2008 23:59:44 +0000 (-0400) Subject: OK, I guess both of them. X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/8f946ddedda18836cfc4846e8496b30772503267?hp=-c OK, I guess both of them. --- 8f946ddedda18836cfc4846e8496b30772503267 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; }