Skip to content

Commit 88d861d

Browse files
authored
librz/bin: fix missing strings in izx output (#5950)
1 parent 71640c8 commit 88d861d

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

librz/core/cbin.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,7 +3055,7 @@ RZ_API bool rz_core_bin_xrefs_strings_print(RZ_NONNULL RzCore *core, RZ_NONNULL
30553055
return false;
30563056
}
30573057

3058-
RzPVector *xrefs_strings = rz_pvector_new((RzPVectorFree)rz_bin_string_free);
3058+
RzPVector *xrefs_strings = rz_pvector_new(NULL);
30593059

30603060
if (!xrefs_strings) {
30613061
rz_pvector_free(whole_strings);
@@ -3073,7 +3073,6 @@ RZ_API bool rz_core_bin_xrefs_strings_print(RZ_NONNULL RzCore *core, RZ_NONNULL
30733073
case RZ_ANALYSIS_XREF_TYPE_CODE:
30743074
case RZ_ANALYSIS_XREF_TYPE_DATA:
30753075
if (!rz_pvector_contains(xrefs_strings, string)) {
3076-
rz_pvector_remove_data(whole_strings, string);
30773076
rz_pvector_push_front(xrefs_strings, string);
30783077
}
30793078
default:

test/db/cmd/cmd_i

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4454,11 +4454,45 @@ EOF
44544454
RUN
44554455

44564456
NAME=izx
4457-
FILE=bins/arm/elf/hello_world
4457+
FILE=bins/arm/elf/ld-uClibc-0.9.28.so_rel_0_3
44584458
CMDS=aaa;izxq
44594459
EXPECT=<<EOF
4460-
0x574 13 12 Hello world!
4461-
0x494 10 10 \bH\tKxD\tJ{D
4460+
0x51c0 16 15 LD_AOUT_PRELOAD
4461+
0x519c 33 32 %s: aborted attempt to load %s!\n
4462+
0x5190 9 8 libc.so.
4463+
0x5164 31 30 %s: can't resolve symbol '%s'\n
4464+
0x515c 7 6 malloc
4465+
0x5154 7 6 atexit
4466+
0x5148 10 9 __environ
4467+
0x5138 16 15 \t%s => %s (%x)\n
4468+
0x5118 29 28 %s: can't load library '%s'\n
4469+
0x5104 18 17 \t%s => not found\n
4470+
0x50ec 24 23 LD_TRACE_LOADED_OBJECTS
4471+
0x50dc 16 15 LD_LIBRARY_PATH
4472+
0x50d0 11 10 LD_PRELOAD
4473+
0x50c4 12 11 LD_BIND_NOW
4474+
0x5098 43 42 Standalone execution is not supported yet\n
4475+
0x507c 28 27 can't handle reloc type %x\n
4476+
0x506c 14 13 symbol '%s':
4477+
0x5064 6 5 \n%s:
4478+
0x4fcc 150 149 /home/liujiale/project/816_telnet/MTK7620A_DLINK_TELNET/source/romfs/lib:/home/liujiale/project/816_telnet/MTK7620A_DLINK_TELNET/source/romfs/usr/lib
4479+
0x4fb4 16 15 Out of memory!\n
4480+
0x4f60 82 81 Can't modify %s's text section. Use GCC option -fPIC for shared objects, please.\n
4481+
0x4f38 39 38 %s: '%s' is missing a dynamic section\n
4482+
0x4f24 18 17 %s: can't map %s\n
4483+
0x4ef8 44 43 %s: '%s' has more than one dynamic section\n
4484+
0x4ecc 44 43 %s: '%s' is not an ELF executable for MIPS\n
4485+
0x4eac 29 28 %s: '%s' is not an ELF file\n
4486+
0x4e98 20 19 %s: can't map '%s'\n
4487+
0x4e74 34 33 %s: mmap of a spare page failed!\n
4488+
0x4e58 27 26 %s: cache '%s' is corrupt\n
4489+
0x4e50 6 5 1.7.0
4490+
0x4e48 7 6 ld.so-
4491+
0x4e2c 26 25 %s: can't map cache '%s'\n
4492+
0x4dd4 85 84 /home/liujiale/project/816_telnet/MTK7620A_DLINK_TELNET/source/romfs/etc/ld.so.cache
4493+
0x4d94 63 62 %s: cannot apply additional memory protection after relocation
4494+
0x4d80 10 9 overflow\n
4495+
0x4d70 15 14 ld-uClibc.so.0
44624496
EOF
44634497
RUN
44644498

0 commit comments

Comments
 (0)