mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-10 16:23:08 +00:00
* Fix asserts in `iij` for ld-uclibc with a null import ##bin * Add test for `iij` on ld-uclibc
This commit is contained in:
parent
388df51df2
commit
af51074455
@ -1849,13 +1849,16 @@ static int bin_imports(RCore *r, int mode, int va, const char *name) {
|
||||
str = r_str_replace (str, "\"", "\\\"", 1);
|
||||
|
||||
pj_ki (pj, "ordinal", import->ordinal);
|
||||
pj_ks (pj, "bind", import->bind);
|
||||
pj_ks (pj, "type", import->type);
|
||||
if (import->bind) {
|
||||
pj_ks (pj, "bind", import->bind);
|
||||
}
|
||||
if (import->type) {
|
||||
pj_ks (pj, "type", import->type);
|
||||
}
|
||||
if (import->classname && import->classname[0]) {
|
||||
pj_ks (pj, "classname", import->classname);
|
||||
pj_ks (pj, "descriptor", import->descriptor);
|
||||
}
|
||||
|
||||
pj_ks (pj, "name", str);
|
||||
if (libname) {
|
||||
pj_ks (pj, "libname", libname);
|
||||
|
@ -13,3 +13,19 @@ EXPECT=<<EOF
|
||||
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=ELF: ld-uclibc
|
||||
FILE=../bins/elf/ld-uClibc-0.9.33.2.so
|
||||
CMDS=<<EOF
|
||||
ii
|
||||
iij
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
[Imports]
|
||||
nth vaddr bind type lib name
|
||||
---------------------------------
|
||||
0 0x00000000 NONE NONE
|
||||
|
||||
[{"ordinal":0,"name":"","plt":0}]
|
||||
EOF
|
||||
RUN
|
||||
|
Loading…
x
Reference in New Issue
Block a user