Introduce the RBinSection.Flags from newabi

This commit is contained in:
pancake 2024-11-21 19:18:39 +01:00
parent 8319bf1fc4
commit bd36636973
3 changed files with 0 additions and 8 deletions

View File

@ -403,12 +403,10 @@ static RBinSection *getsection(RBin *bin, int sn) {
RBinSection *ls = lastSection[sn];
const char *lsn = ls->name;
if (strstr (lsn , name_str)) {
#if R2_USE_NEW_ABI
if (r_str_startswith (lsn, ".debug_") && R_BIN_ELF_SCN_IS_COMPRESSED (ls->flags)) {
R_LOG_WARN ("Compressed dwarf sections not yet supported");
return NULL;
}
#endif
if (strstr (lsn, "zdebug")) {
R_LOG_WARN ("Compressed dwarf sections not yet supported");
return NULL;
@ -418,12 +416,10 @@ static RBinSection *getsection(RBin *bin, int sn) {
}
r_list_foreach (o->sections, iter, section) {
if (strstr (section->name, name_str)) {
#if R2_USE_NEW_ABI
if (r_str_startswith (section->name, ".debug_") && R_BIN_ELF_SCN_IS_COMPRESSED (section->flags)) {
R_LOG_WARN ("Compressed dwarf sections not yet supported");
return NULL;
}
#endif
if (strstr (section->name, "zdebug")) {
R_LOG_WARN ("Compressed dwarf sections not yet supported");
return NULL;

View File

@ -3747,9 +3747,7 @@ static void _store_bin_sections(ELFOBJ *eo, const RVector *elf_bin_sections) {
ptr->type = elf_section_type_tostring (section->type);
ptr->add = !eo->phdr; // Load sections if there is no PHDR
ptr->perm = elf_flags_to_section_perms (section->flags);
#if R2_USE_NEW_ABI
ptr->flags = section->flags;
#endif
#if 0
TODO: ptr->flags = elf_flags_tostring (section->flags);
#define SHF_WRITE (1 << 0) /* Writable */

View File

@ -303,9 +303,7 @@ typedef struct r_bin_section_t {
ut64 vaddr;
ut64 paddr;
ut32 perm;
#if R2_USE_NEW_ABI
ut32 flags;
#endif
const char *type;
const char *arch;
char *format;