* format/elf: extract function to avoid duplicated code * format/elf: use ut64 to avoid errors in ELF32 Otherwise, while analyzing ELF32, -1 will be interpreted as the unsigned value 0xffffffff, which is very different from -1 (0xffffffffffffffff). * format/elf: fix symbols with shndx == SHT_NULL Symbols with shndx == SHT_NULL should not be listed as symbols but they should be available when other ELF structures (imports, relocs, etc.) reference them. This patch adds those symbols in the symbols_by_ord table but not to the list of available symbols. Imports/relocs/etc. work by indexing symbols by symbol index, so they are going to use the symbols_by_ord table and make everything work. Moreover, it refactors a bit the relocs function to avoid duplicated code. * bin: setimportd/setsymbold should clone the import/symbol * bin/bin.c: free fields only when sym is not NULL * format/elf: do not filter out symbols with size == 0 and consider sht_null symbols in shdr too. * bin/bin.c: create R_STR_DUP macro and use it in _clone functions * format/elf: when parsing symbols from phdr, stop at first UNK type/bind * create some R_BIN defines to handle strings related to TYPE and BIND in RBinSymbols * format/elf: add a doc |
||
|---|---|---|
| .. | ||
| class.c | ||
| class.h | ||
| code.c | ||
| code.h | ||
| deps.mk | ||
| dsojson.c | ||
| dsojson.h | ||
| main.c | ||
| Makefile | ||
| ops.c | ||