#include <string.h>
#include <stdio.h>
-#include "elf.h"
+#include "../include/elf.h"
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
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;
}