rizin/librz/bin
NOT XVilka 7e42c9a4d7
bin/elf: do not disassemble allocated string tables (.dynstr) as code (#6436)
The ELF section classifier in sections_obj() only marked a section as
data when its name contained "data". As a result .dynstr (type
SHT_STRTAB, SHF_ALLOC) was flagged neither as data nor as containing
strings, so is_data_section() rejected it. Two problems followed:

  - the string search (iz, and the default AUTO scan used by -A) skipped
    .dynstr, so its strings were never listed (only izz, which scans the
    whole file regardless of section flags, showed them);
  - because no RZ_META_TYPE_STRING metadata was applied over the region,
    the disassembler rendered the NUL-terminated symbol names as code,
    e.g. on MIPS "_GLOBAL_OFFSET_TABLE_" decoded to bgtzl/ldr/jalx/...

Mark a section as containing strings when it is mapped into memory
(SHF_ALLOC) and is either a string table (SHT_STRTAB) or carries the
explicit SHF_STRINGS flag. The SHF_ALLOC restriction keeps the loaded
string tables (.dynstr) while leaving the non-allocated .strtab and
.shstrtab to izz, matching the "iz lists the loaded image" semantics.

This is architecture independent; MIPS was simply where the bad
disassembly was first noticed.

Closes #5182

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-05-31 04:01:21 +08:00
..
d Rewrite the pf parser and rework the grammar (#6410) 2026-05-29 03:58:58 +08:00
dwarf bin/dwarf: force big-endian read on TMS320 COFF DWARF sections 2026-05-28 17:44:54 +08:00
format Rewrite the pf parser and rework the grammar (#6410) 2026-05-29 03:58:58 +08:00
i Fix SPARC/MC680x0 Mach-O fat binary issues (#5338) 2025-09-09 11:51:17 +08:00
p bin/elf: do not disassemble allocated string tables (.dynstr) as code (#6436) 2026-05-31 04:01:21 +08:00
pdb Fix RZ_IPI usage on public headers & fix memory leak in the ROP code. (#6171) 2026-04-08 13:37:17 +08:00
bfile.c librz/bin: refactor feature detection on RzBin (#6188) 2026-04-10 02:25:35 +08:00
bfile_string.c util: extend string search with user-defined printable characters (#6161) 2026-05-01 22:47:14 +08:00
bin.c util: extend string search with user-defined printable characters (#6161) 2026-05-01 22:47:14 +08:00
bin_demangle.c librz/arch: add xcore support (#5617) 2025-12-14 02:38:45 +08:00
bin_language.c Refactor sections in RzBinPlugin from list to pvector (#4089) 2024-01-11 12:19:22 +08:00
bin_ldr.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
bobj.c Fix multiple memory leaks (#5636) 2025-12-18 14:23:48 +00:00
bobj_process.c librz/bin: refactor feature detection on RzBin (#6188) 2026-04-10 02:25:35 +08:00
bobj_process_class.c Add HtSP, HtSS, HtSU, SetS (#4415) 2024-04-16 20:27:48 +08:00
bobj_process_entry.c Refactor the <entries> in RzBinPlugin from list to pvector (#4118) 2024-02-25 19:42:25 +08:00
bobj_process_field.c Refactor <fields> from RzList to RzPVector in RzBinPlugin (#3962) 2023-11-08 19:32:34 +08:00
bobj_process_file.c Change output of iH to support structured data. (#5263) 2025-08-23 22:23:14 +08:00
bobj_process_import.c Refactor imports-related stuff from RzList to RzPVector (#3781) 2023-08-24 16:14:32 +08:00
bobj_process_map.c Refactor the maps in RzBinPlugin from list to pvector (#4081) 2024-01-07 12:42:54 +08:00
bobj_process_reloc.c Refactor relocs-related stuff from RzList to RzPVector (#3852) 2023-09-14 10:46:38 +08:00
bobj_process_section.c Add HtSP, HtSS, HtSU, SetS (#4415) 2024-04-16 20:27:48 +08:00
bobj_process_string.c librz/bin: define string search parameters in plugins (#5406) 2025-10-08 10:02:32 +08:00
bobj_process_symbol.c Added class methods identification and inheritance in swift using rz-libswift demangler (#5296) 2025-08-22 13:47:06 +08:00
dbginfo.c Several rz_vector improvements. (#6250) 2026-04-22 08:20:03 +00:00
filter.c Replace strdup with rz_str_dup (#4634) 2024-09-15 19:12:07 +08:00
golang.c Refactor sections in RzBinPlugin from list to pvector (#4089) 2024-01-11 12:19:22 +08:00
meson.build librz/arch: add LuaJIT 2.1 bytecode support (#5961) 2026-05-12 23:37:10 +08:00
README.md librz: add some initial documentation (#3782) 2023-10-13 13:46:19 +08:00
relocs_patch.c Replace strdup with rz_str_dup (#4634) 2024-09-15 19:12:07 +08:00