diff options
Diffstat (limited to 'src/format')
-rw-r--r-- | src/format/elf/elf.c | 6 | ||||
-rw-r--r-- | src/format/symbol.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/format/elf/elf.c b/src/format/elf/elf.c index ea520b9..3dc5d64 100644 --- a/src/format/elf/elf.c +++ b/src/format/elf/elf.c @@ -432,6 +432,12 @@ static void g_elf_format_refine_portions(const GElfFormat *format, GBinPortion * sh_flags = ELF_SHDR(format, section, sh_flags); + printf("[section % 2hu] 0x%08x -> %x -> %d\n", i, sh_flags, + sh_flags & SHF_ALLOC, (sh_flags & SHF_ALLOC) == 0); + + if ((sh_flags & SHF_ALLOC) == 0) + continue; + if (sh_flags & SHF_EXECINSTR) background = BPC_CODE; else if (sh_flags & SHF_WRITE) background = BPC_DATA; else background = BPC_DATA_RO; diff --git a/src/format/symbol.h b/src/format/symbol.h index 1368691..6f38020 100644 --- a/src/format/symbol.h +++ b/src/format/symbol.h @@ -51,6 +51,10 @@ typedef enum _SymbolType } SymbolType; +#define HAS_DATA_INSTR(type) (type == STP_DATA || type == STP_RO_STRING) + + + #define G_TYPE_BIN_SYMBOL g_binary_symbol_get_type() #define G_BIN_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_binary_symbol_get_type(), GBinSymbol)) #define G_IS_BIN_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_binary_symbol_get_type())) |