From bd3663697327ed817b67f441f00dcba7f7698095 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 21 Nov 2024 19:18:39 +0100 Subject: [PATCH] Introduce the RBinSection.Flags from newabi --- libr/bin/dwarf.c | 4 ---- libr/bin/format/elf/elf.c | 2 -- libr/include/r_bin.h | 2 -- 3 files changed, 8 deletions(-) diff --git a/libr/bin/dwarf.c b/libr/bin/dwarf.c index e6bf0dbaf4..f1fba1f741 100644 --- a/libr/bin/dwarf.c +++ b/libr/bin/dwarf.c @@ -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; diff --git a/libr/bin/format/elf/elf.c b/libr/bin/format/elf/elf.c index 1ab382ba27..44e7dcfcb5 100644 --- a/libr/bin/format/elf/elf.c +++ b/libr/bin/format/elf/elf.c @@ -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 */ diff --git a/libr/include/r_bin.h b/libr/include/r_bin.h index a9b54bb895..d6f3e150ae 100644 --- a/libr/include/r_bin.h +++ b/libr/include/r_bin.h @@ -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;