More simplifications in the i subcommands output ##bin

This commit is contained in:
pancake 2024-11-22 19:45:04 +01:00 committed by GitHub
parent 7493b41171
commit f69820c46e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
44 changed files with 55 additions and 302 deletions

View File

@ -1848,7 +1848,6 @@ static bool bin_relocs(RCore *r, PJ *pj, int mode, int va) {
R_RETURN_VAL_IF_FAIL (table, false);
Sdb *db = NULL;
char *sdb_module = NULL;
int i = 0;
R_TIME_PROFILE_BEGIN;
@ -2042,7 +2041,6 @@ static bool bin_relocs(RCore *r, PJ *pj, int mode, int va) {
bin_reloc_type_name (reloc), reloc->ntype, res);
free (res);
}
i++;
}
if (IS_MODE_JSON (mode)) {
pj_end (pj);
@ -2054,9 +2052,10 @@ static bool bin_relocs(RCore *r, PJ *pj, int mode, int va) {
}
if (show_table) {
char *s = r_table_tostring (table);
r_cons_printf ("\n%s\n", s);
free (s);
r_cons_printf ("\n%i relocations\n", i);
if (s) {
r_cons_print (s);
free (s);
}
}
}
@ -2260,7 +2259,7 @@ static bool bin_imports(RCore *r, PJ *pj, int mode, int va, const char *name) {
}
if (show_table) {
char *s = r_table_tostring (table);
r_cons_printf ("%s\n", s);
r_cons_print (s);
free (s);
}
}
@ -2360,17 +2359,15 @@ static void snInit(RCore *r, SymName *sn, RBinSymbol *sym, const char *lang, boo
}
static void snFini(SymName *sn) {
if (sn) {
R_FREE (sn->name);
R_FREE (sn->libname);
R_FREE (sn->nameflag);
R_FREE (sn->demname);
R_FREE (sn->demflag);
R_FREE (sn->classname);
R_FREE (sn->classflag);
R_FREE (sn->methname);
R_FREE (sn->methflag);
}
R_FREE (sn->name);
R_FREE (sn->libname);
R_FREE (sn->nameflag);
R_FREE (sn->demname);
R_FREE (sn->demflag);
R_FREE (sn->classname);
R_FREE (sn->classflag);
R_FREE (sn->methname);
R_FREE (sn->methflag);
}
static bool its_an_export(RBinSymbol *s) {
@ -2718,7 +2715,7 @@ next:
}
}
char *s = r_table_tostring (table);
r_cons_printf ("%s", s);
r_cons_print (s);
free (s);
}
@ -2773,15 +2770,14 @@ static char *filter_hash_string(const char *chksum) {
if (!chksum) {
return NULL;
}
char *aux, *ret = NULL;
char *ret = NULL;
bool isFirst = true;
RList *hashlist = r_str_split_duplist (chksum, ",", true);
RListIter *iter;
char *hashname;
r_list_foreach (hashlist, iter, hashname) {
if (r_hash_name_to_bits (hashname)) {
aux = r_str_newf (isFirst? "%s" : ", %s", hashname);
char *aux = r_str_newf (isFirst? "%s" : ", %s", hashname);
ret = r_str_append (ret, aux);
free (aux);
if (isFirst) {
@ -2854,9 +2850,6 @@ static bool io_create_mem_map(RIO *io, RBinSection *sec, ut64 at, ut64 gap) {
return true;
}
static void add_section(RCore *core, RBinSection *sec, ut64 addr, int fd) {
if (!r_io_desc_get (core->io, fd) || UT64_ADD_OVFCHK (sec->size, sec->paddr) ||
UT64_ADD_OVFCHK (sec->size, addr) || !sec->vsize) {
@ -2951,7 +2944,7 @@ static bool bin_map_sections_to_segments(RBin *bin, PJ *pj, int mode) {
if (IS_MODE_NORMAL (mode)) {
r_cons_printf ("Section to Segment mapping:\n");
char *s = r_table_tostring (table);
r_cons_printf ("%s\n", s);
r_cons_print (s);
free (s);
}
r_list_free (segments);
@ -3031,7 +3024,7 @@ static bool bin_sections(RCore *r, PJ *pj, int mode, ut64 laddr, int va, ut64 at
}
if (show_table) {
char *s = r_table_tostring (table);
r_cons_printf ("\n%s\n", s);
r_cons_print (s);
free (s);
}
r_table_free (table);
@ -3322,8 +3315,6 @@ static bool bin_sections(RCore *r, PJ *pj, int mode, ut64 laddr, int va, ut64 at
io_section_info = NULL;
if (IS_MODE_JSON (mode) && !printHere) {
pj_end (pj);
} else if (IS_MODE_NORMAL (mode) && at == UT64_MAX && !printHere) {
// r_cons_printf ("\n%i sections\n", i);
}
// run the formats now
r_list_foreach (sections, iter, section) {
@ -3345,7 +3336,7 @@ out:
}
if (show_table) {
char *s = r_table_tostring (table);
r_cons_printf ("\n%s\n", s);
r_cons_print (s);
free (s);
}
}
@ -3360,7 +3351,6 @@ static bool bin_fields(RCore *r, PJ *pj, int mode, int va) {
const int pref = r_config_get_b (r->config, "asm.demangle")? 'd': 0;
RListIter *iter;
RBinField *field;
int i = 0;
RBin *bin = r->bin;
RBinObject *o = r_bin_cur_object (bin);
if (!o) {
@ -3448,14 +3438,11 @@ static bool bin_fields(RCore *r, PJ *pj, int mode, int va) {
r_cons_printf ("0x%08"PFMT64x" 0x%08"PFMT64x" %s\n",
field->vaddr, v, r_bin_name_tostring2 (field->name, pref));
}
i++;
}
if (IS_MODE_JSON (mode)) {
pj_end (pj);
} else if (IS_MODE_RAD (mode)) {
r_cons_println ("fs-");
} else if (IS_MODE_NORMAL (mode)) {
r_cons_printf ("\n%i fields\n", i);
}
return true;
@ -4192,7 +4179,6 @@ static bool bin_size(RCore *r, PJ *pj, int mode) {
static bool bin_libs(RCore *r, PJ *pj, int mode) {
RListIter *iter;
char* lib;
int i = 0;
RList *libs = r_bin_get_libs (r->bin);
if (IS_MODE_JSON (mode)) {
@ -4214,13 +4200,9 @@ static bool bin_libs(RCore *r, PJ *pj, int mode) {
// simple and normal print mode
r_cons_println (lib);
}
i++;
}
if (IS_MODE_JSON (mode)) {
pj_end (pj);
} else if (IS_MODE_NORMAL (mode)) {
const char *libstr = (i > 1)? "libraries": "library";
r_cons_printf ("\n%i %s\n", i, libstr);
}
return true;
}

View File

@ -71,7 +71,6 @@ nth vaddr bind type lib name
16 0x00020060 GLOBAL NOTYPE _end
17 0x00000710 GLOBAL FUNC free
18 0x00000720 GLOBAL FUNC __cxa_atexit
nth paddr vaddr bind type size lib name demangled
------------------------------------------------------------------------
6 0x0000aa20 0x0000aa20 GLOBAL FUNC 1176 Java_o__003dc_e

View File

@ -827,23 +827,17 @@ iSj.
EOF
EXPECT=<<EOF
Current section
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000188 0x24 0x08048188 0x24 -r-- NOTE .note.gnu.build-id
Current section
nth paddr size vaddr vsize perm type name
-------------------------------------------
{"name":".plt","size":240,"vsize":240,"type":"PROGBITS","perm":"-r-x","paddr":1888,"vaddr":134514528}
Current section
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000188 0x24 0x00000188 0x24 -r-- NOTE .note.gnu.build-id
{"name":".plt","size":240,"vsize":240,"type":"PROGBITS","perm":"-r-x","paddr":1888,"vaddr":1888}
EOF
RUN

View File

@ -97,7 +97,7 @@ EXPECT=<<EOF
hello
0
0
314
313
311
world
EOF

View File

@ -2,7 +2,6 @@ NAME=iS query
FILE=bins/elf/analysis/main
CMDS=iS,size/sort,vaddr/cols/name
EXPECT=<<EOF
vaddr name
---------------
0x00000000
@ -41,7 +40,6 @@ vaddr name
0x006006f8 .dynamic
0x00000000 .strtab
0x00000000 .symtab
EOF
RUN
@ -88,15 +86,12 @@ iorw true
block 0x100
nth vaddr bind type lib name
----------------------------
fs imports
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------
fs symbols
nth paddr size vaddr vsize perm type name
-------------------------------------------
fs sections
EOF
RUN
@ -111,7 +106,6 @@ EOF
EXPECT=<<EOF
nth vaddr bind type lib name
----------------------------
fs imports
EOF
RUN
@ -166,10 +160,8 @@ EXPECT=<<EOF
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------
fs symbols
nth paddr size vaddr vsize perm type name
-------------------------------------------
fs sections
EOF
RUN
@ -1232,7 +1224,6 @@ nth vaddr bind type lib name
1 0x080482d0 GLOBAL FUNC puts
2 0x080482e0 WEAK NOTYPE __gmon_start__
3 0x080482f0 GLOBAL FUNC __libc_start_main
EOF
RUN
@ -2389,7 +2380,6 @@ NAME=iS (file x86)
FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
@ -2422,7 +2412,6 @@ nth paddr size vaddr vsize perm type name
27 0x000006c5 0x106 0x00000000 0x106 ---- STRTAB .shstrtab
28 0x00000c7c 0x450 0x00000000 0x450 ---- SYMTAB .symtab
29 0x000010cc 0x257 0x00000000 0x257 ---- STRTAB .strtab
EOF
RUN
@ -2430,7 +2419,6 @@ NAME=iSS (file x86)
FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=iSS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x00000034 0x100 0x08048034 0x100 -r-x MAP PHDR
@ -2442,7 +2430,6 @@ nth paddr size vaddr vsize perm type name
6 0x000004c0 0x2c 0x080484c0 0x2c -r-- MAP GNU_EH_FRAME
7 0x00000000 0x0 0x00000000 0x0 -rw- MAP GNU_STACK
8 0x00000000 0x34 0x08048000 0x34 -rw- MAP ehdr
EOF
RUN
@ -2561,8 +2548,6 @@ FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=il
EXPECT=<<EOF
libc.so.6
1 library
EOF
RUN
@ -2578,16 +2563,12 @@ NAME=ir (file x86)
FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x08049690 0x00000690 SET_32 6 __gmon_start__
0x080496a0 0x000006a0 SET_32 7 puts
0x080496a4 0x000006a4 SET_32 7 __gmon_start__
0x080496a8 0x000006a8 SET_32 7 __libc_start_main
4 relocations
EOF
RUN
@ -2771,8 +2752,6 @@ EXPECT=<<EOF
0x0000003a 0x0000003a 0x00000040 ShentSize
0x0000003c 0x0000003c 0x0000001e ShNum
0x0000003e 0x0000003e 0x0000001b ShrStrndx
14 fields
EOF
RUN
@ -2785,7 +2764,6 @@ nth vaddr bind type lib name
1 0x004003e0 GLOBAL FUNC puts
2 0x004003f0 GLOBAL FUNC __libc_start_main
3 0x00400400 WEAK NOTYPE __gmon_start__
EOF
RUN
@ -2829,7 +2807,6 @@ NAME=iS (file x86_64)
FILE=bins/elf/analysis/hello-linux-x86_64
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
@ -2862,7 +2839,6 @@ nth paddr size vaddr vsize perm type name
27 0x00000921 0x108 0x00000000 0x108 ---- STRTAB .shstrtab
28 0x000011b0 0x648 0x00000000 0x648 ---- SYMTAB .symtab
29 0x000017f8 0x23e 0x00000000 0x23e ---- STRTAB .strtab
EOF
RUN
@ -2870,7 +2846,6 @@ NAME=iSS (file x86_64)
FILE=bins/elf/analysis/hello-linux-x86_64
CMDS=iSS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x00000040 0x1c0 0x00400040 0x1c0 -r-x MAP PHDR
@ -2882,7 +2857,6 @@ nth paddr size vaddr vsize perm type name
6 0x000005d0 0x34 0x004005d0 0x34 -r-- MAP GNU_EH_FRAME
7 0x00000000 0x0 0x00000000 0x0 -rw- MAP GNU_STACK
8 0x00000000 0x40 0x00400000 0x40 -rw- MAP ehdr
EOF
RUN
@ -2891,8 +2865,6 @@ FILE=bins/elf/analysis/hello-linux-x86_64
CMDS=il
EXPECT=<<EOF
libc.so.6
1 library
EOF
RUN
@ -2900,16 +2872,12 @@ NAME=ir (file x86_64)
FILE=bins/elf/analysis/hello-linux-x86_64
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x006008c8 0x000008c8 SET_64 6 __gmon_start__
0x006008e8 0x000008e8 SET_64 7 puts
0x006008f0 0x000008f0 SET_64 7 __libc_start_main
0x006008f8 0x000008f8 SET_64 7 __gmon_start__
4 relocations
EOF
RUN
@ -2917,7 +2885,6 @@ NAME=ir (file x86_64, ifunc)
FILE=bins/elf/ifunc_rel64
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x006b17d0 0x000b17d0 SET_64 37 ifunc_416530 0x00416530 (ifunc)
@ -2930,9 +2897,6 @@ vaddr paddr type ntype name
0x006b1808 0x000b1808 SET_64 37 ifunc_414300 0x00414300 (ifunc)
0x006b1810 0x000b1810 SET_64 37 ifunc_479800 0x00479800 (ifunc)
0x006b1818 0x000b1818 SET_64 37 ifunc_4140b0 0x004140b0 (ifunc)
10 relocations
EOF
RUN
@ -3123,7 +3087,6 @@ NAME=iS entropy and iSS entropy
FILE=bins/elf/crackme0x05
CMDS=iS entropy; iSS entropy
EXPECT=<<EOF
nth paddr size vaddr vsize perm entropy type name
------------------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
@ -3155,8 +3118,6 @@ nth paddr size vaddr vsize perm entropy type name
26 0x000011dd 0xdb 0x00000000 0xdb ---- 4.21638420 STRTAB .shstrtab
27 0x00001740 0x460 0x00000000 0x460 ---- 3.06854806 SYMTAB .symtab
28 0x00001ba0 0x248 0x00000000 0x248 ---- 4.85613827 STRTAB .strtab
nth paddr size vaddr vsize perm entropy type name
-----------------------------------------------------------------
0 0x00000034 0x120 0x08048034 0x120 -r-x 2.77947373 MAP PHDR
@ -3169,7 +3130,6 @@ nth paddr size vaddr vsize perm entropy type name
7 0x00000f0c 0xf4 0x08049f0c 0xf4 -r-- 2.71815661 MAP GNU_RELRO
8 0x00000000 0x0 0x00000000 0x0 ---- MAP NONE
9 0x00000000 0x34 0x08048000 0x34 -rw- 2.79887339 MAP ehdr
EOF
RUN
@ -3196,7 +3156,6 @@ nth paddr vaddr bind type size lib name
6 ---------- ---------- WEAK NOTYPE 16 imp._Jv_RegisterClasses
7 ---------- ---------- WEAK NOTYPE 16 imp._ITM_registerTMCloneTable
relocs
vaddr paddr type ntype name
---------------------------------------
0x00001eec 0x00000eec SET_32 8
@ -3210,9 +3169,6 @@ vaddr paddr type ntype name
0x0000200c 0x0000100c SET_32 7 puts
0x00002010 0x00001010 SET_32 7 __libc_start_main
0x00002018 0x00001018 SET_32 8
11 relocations
flags
0x00000000 1936 segment.LOAD0
0x00000000 0 segment.GNU_STACK
@ -3481,7 +3437,6 @@ nth vaddr bind type lib name
-------------------------------------
1 ---------- GLOBAL FUNC __libc_start_main
2 ---------- WEAK NOTYPE __gmon_start__
EOF
RUN
@ -3540,7 +3495,6 @@ NAME=iS=
FILE=bins/mach0/fatmach0-3true
CMDS=iS=
EXPECT=<<EOF
0* 0x100000ef8 ######------------------------ 0x100000f3f r-x 71 0.__TEXT.__text
1 0x100000f40 ------#----------------------- 0x100000f46 r-x 6 1.__TEXT.__symbol_stub1
2 0x100000f46 ------###--------------------- 0x100000f60 r-x 26 2.__TEXT.__stub_helper
@ -3551,7 +3505,6 @@ EXPECT=<<EOF
7 0x100001020 ------------------------####-- 0x100001048 rw- 40 7.__DATA.__program_vars
8 0x100001048 ----------------------------## 0x100001068 rw- 32 8.__DATA.__data
=> 0x100000ef8 ------------------------------ 0x100000ef7
EOF
RUN
@ -3766,7 +3719,6 @@ CMDS=<<EOF
iS sha1,crc32
EOF
EXPECT=<<EOF
nth paddr size vaddr vsize perm sha1, crc32 type name
-----------------------------------------------------------------------------------------------------------------------
0 0x00003830 0x3c10 0x100003830 0x3c10 -r-x 597dd9392a6e194e98d21b2ca4ddebb298f09575 f0140c0d REGULAR 0.__TEXT.__text
@ -3780,7 +3732,6 @@ nth paddr size vaddr vsize perm sha1, crc32
8 0x0000c000 0x20 0x10000c000 0x20 -rw- de8a847bff8c343d69b853a215e6ee775ef2ef96 190a55ad REGULAR 8.__DATA.__data
9 0x00000000 0x0 0x10000c020 0xb0 -rw- ZEROFILL 9.__DATA.__common
10 0x00000000 0x0 0x10000c0d0 0x150 -rw- ZEROFILL 10.__DATA.__bss
EOF
RUN
@ -3791,13 +3742,11 @@ CMDS=<<EOF
iSS sha1,crc32
EOF
EXPECT=<<EOF
nth paddr size vaddr vsize perm sha1, crc32 type name
-----------------------------------------------------------------------------------------------------------
0 0x00018000 0x8000 0x100000000 0x8000 -r-x 62f28c2d31aeeafc99420eebdaaf9976175c4553 b46855f0 MAP __TEXT
1 0x00020000 0x4000 0x100008000 0x4000 -rw- 62f2f64918ef72b1bf82ae39e986d9ddf5e42181 979dd9de MAP __DATA_CONST
2 0x00024000 0x4000 0x10000c000 0x4000 -rw- 869518459b4db2174417ed9a87668b47acf04bf7 d0361e49 MAP __DATA
3 0x00028000 0x8000 0x100010000 0x8000 -r-- MAP __LINKEDIT
EOF
RUN

View File

@ -16,8 +16,6 @@ EXPECT=<<EOF
0x0000002e 0x0000002e 0x00000028 ShentSize
0x00000030 0x00000030 0x0000001e ShNum
0x00000032 0x00000032 0x0000001b ShrStrndx
14 fields
EOF
RUN

View File

@ -140,6 +140,5 @@ nth vaddr bind type lib name
4 ---------- WEAK NOTYPE __gmon_start__
5 ---------- WEAK NOTYPE _ITM_registerTMCloneTable
6 ---------- WEAK FUNC __cxa_finalize
EOF
RUN

View File

@ -6,7 +6,6 @@ iS
iS~$!!
EOF
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
@ -40,7 +39,6 @@ nth paddr size vaddr vsize perm type name
28 0x00000b3c 0xfe 0x00000000 0xfe ---- STRTAB .shstrtab
29 0x00001400 0x6a8 0x00000000 0x6a8 ---- SYMTAB .symtab
30 0x00001aa8 0x269 0x00000000 0x269 ---- STRTAB .strtab
--
30 0x00001aa8 0x269 0x00000000 0x269 ---- STRTAB .strtab
29 0x00001400 0x6a8 0x00000000 0x6a8 ---- SYMTAB .symtab

View File

@ -196,11 +196,9 @@ byname
0x225c0
0x26ba0
Current section
nth paddr size vaddr vsize perm type name
------------------------------------------------------------
0 0x000125c0 0x45e0 0x000225c0 0x45e0 -r-- PROGBITS .rodata
EOF
RUN

View File

@ -75,7 +75,6 @@ e scr.utf8=false
!!rabin2 -SS gzip://bins/elf/core65k.gz
EOF
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-----------------------------------------------------------
0 0x00001040 0x1000 0x00000000 0x1000 -r-- MAP LOAD0
@ -131149,7 +131148,6 @@ nth paddr size vaddr vsize perm type name
131068 0x00002040 0x1000 0x1fffc000 0x1000 -r-- MAP LOAD131068
131069 0x00002040 0x1000 0x1fffd000 0x1000 -r-x MAP LOAD131069
131070 0x00000000 0x40 0x00000000 0x40 -rw- MAP ehdr
EOF
EXPECT_ERR=
RUN

View File

@ -2,7 +2,7 @@ NAME=ar file sections
FILE=ar://bins/ar/libgdbr.a//responses.o
CMDS=iS~:5
EXPECT=<<EOF
2 0x00007578 0xf00 0x08007578 0xf00 ---- RELA .rela.text
3 0x000014be 0x0 0x080014be 0x0 -rw- PROGBITS .data
EOF
RUN

View File

@ -2,7 +2,6 @@ NAME=bflt
FILE=bins/bflt/bin.bflt
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x00000074 0x00000074 SET_32 0
@ -97,8 +96,5 @@ vaddr paddr type ntype name
0x00002fb4 0x00002fb4 SET_32 0
0x00002fb8 0x00002fb8 SET_32 0
0x00002fbc 0x00002fbc SET_32 0
92 relocations
EOF
RUN

View File

@ -58,8 +58,6 @@ nth vaddr bind type lib name
23 ---------- NONE FUNC __TIFFDataSize
24 ---------- NONE FUNC __TIFFCheckMalloc
25 ---------- NONE UNK __fltused
nth paddr size vaddr vsize perm type name
--------------------------------------------------------
0 0x000001cc 0x2f 0x00000000 0x2f ---- MAP .drectve-0
@ -73,7 +71,6 @@ nth paddr size vaddr vsize perm type name
8 0x0000e96f 0x4 0x0000b660 0x4 -r-- DATA .rdata-8
9 0x0000e973 0x8 0x0000b670 0x8 -r-- DATA .rdata-9
10 0x0000e97b 0x4 0x0000b680 0x4 -r-- DATA .rdata-10
EOF
RUN
@ -90,16 +87,12 @@ nth paddr vaddr bind type size lib name demangled
0 0x00000064 0x00000000 LOCAL SECT 4 .text
0 0x00000064 0x00000000 GLOBAL FUNC 4 main
0 0x0000008b 0x00000030 LOCAL SECT 4 .data
vaddr paddr type ntype name
---------------------------------------
0x00000009 0x0000006d ADD_32 4 .data
0x00000010 0x00000074 ADD_32 4 .data
0x0000001c 0x00000080 ADD_32 4 MessageBoxA
0x00000023 0x00000087 ADD_32 4 ExitProcess
4 relocations
EOF
RUN
@ -249,23 +242,17 @@ iE.
EOF
EXPECT=<<EOF
Current section
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000000 0x4 0x00001180 0x4 -rw- MAP .bss$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa277-280
Current section
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000000 0x4 0x00138820 0x4 -rw- MAP .bss$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa79999-80002
Current section
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000000 0x4 0x00000100 0x4 -rw- MAP .bss$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa13-16
nth paddr vaddr bind type size lib name demangled
---------------------------------------------------------------------
0 0x0030d4d8 0x00138830 LOCAL UNK 4 .llvm_addrsig

View File

@ -213,7 +213,6 @@ nth vaddr bind type lib name
4 0x000001d0 NONE FUNC Ljava/lang/StringBuilder.method.<init>()V
5 0x000001d8 NONE FUNC Ljava/lang/StringBuilder.method.append(Ljava/lang/String;)Ljava/lang/StringBuilder;
6 0x000001e0 NONE FUNC Ljava/lang/StringBuilder.method.toString()Ljava/lang/String;
EOF
RUN

View File

@ -729,28 +729,28 @@ colu: 12
addr: 0x00001149
EOF
EXPECT_ERR=<<EOF
DEBUG: [cbin.c:3333] (section .dynsym) Cd 8[21] @ 0x3d8
DEBUG: [cbin.c:3333] (section .dynstr) Css 141 @ 0x480
DEBUG: [cbin.c:3333] (section .rela.dyn) Cd 8[24] @ 0x550
DEBUG: [cbin.c:3333] (section .rela.plt) Cd 8[3] @ 0x610
DEBUG: [cbin.c:3333] (section .init_array) Cd 8[1] @ 0x3db8
DEBUG: [cbin.c:3333] (section .fini_array) Cd 8[1] @ 0x3dc0
DEBUG: [cbin.c:3333] (section .dynamic) Cd 8[62] @ 0x3dc8
DEBUG: [cbin.c:3333] (section .got) Cd 8[9] @ 0x3fb8
DEBUG: [cbin.c:3333] (section .dynsym) Cd 8[21] @ 0x3d8
DEBUG: [cbin.c:3333] (section .dynstr) Css 141 @ 0x480
DEBUG: [cbin.c:3333] (section .rela.dyn) Cd 8[24] @ 0x550
DEBUG: [cbin.c:3333] (section .rela.plt) Cd 8[3] @ 0x610
DEBUG: [cbin.c:3333] (section .init_array) Cd 8[1] @ 0x3db8
DEBUG: [cbin.c:3333] (section .fini_array) Cd 8[1] @ 0x3dc0
DEBUG: [cbin.c:3333] (section .dynamic) Cd 8[62] @ 0x3dc8
DEBUG: [cbin.c:3333] (section .got) Cd 8[9] @ 0x3fb8
WARN: [cbin.c:1888] Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
DEBUG: [cbin.c:2576] Cannot resolve symbol address __libc_start_main
DEBUG: [cbin.c:2576] Cannot resolve symbol address _ITM_deregisterTMCloneTable
DEBUG: [cbin.c:2576] Cannot resolve symbol address __gmon_start__
DEBUG: [cbin.c:2576] Cannot resolve symbol address _ITM_registerTMCloneTable
DEBUG: [cbin.c:2576] Cannot resolve symbol address __cxa_finalize
DEBUG: [cbin.c:3324] (section .dynsym) Cd 8[21] @ 0x3d8
DEBUG: [cbin.c:3324] (section .dynstr) Css 141 @ 0x480
DEBUG: [cbin.c:3324] (section .rela.dyn) Cd 8[24] @ 0x550
DEBUG: [cbin.c:3324] (section .rela.plt) Cd 8[3] @ 0x610
DEBUG: [cbin.c:3324] (section .init_array) Cd 8[1] @ 0x3db8
DEBUG: [cbin.c:3324] (section .fini_array) Cd 8[1] @ 0x3dc0
DEBUG: [cbin.c:3324] (section .dynamic) Cd 8[62] @ 0x3dc8
DEBUG: [cbin.c:3324] (section .got) Cd 8[9] @ 0x3fb8
DEBUG: [cbin.c:3324] (section .dynsym) Cd 8[21] @ 0x3d8
DEBUG: [cbin.c:3324] (section .dynstr) Css 141 @ 0x480
DEBUG: [cbin.c:3324] (section .rela.dyn) Cd 8[24] @ 0x550
DEBUG: [cbin.c:3324] (section .rela.plt) Cd 8[3] @ 0x610
DEBUG: [cbin.c:3324] (section .init_array) Cd 8[1] @ 0x3db8
DEBUG: [cbin.c:3324] (section .fini_array) Cd 8[1] @ 0x3dc0
DEBUG: [cbin.c:3324] (section .dynamic) Cd 8[62] @ 0x3dc8
DEBUG: [cbin.c:3324] (section .got) Cd 8[9] @ 0x3fb8
WARN: [cbin.c:1887] Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
DEBUG: [cbin.c:2573] Cannot resolve symbol address __libc_start_main
DEBUG: [cbin.c:2573] Cannot resolve symbol address _ITM_deregisterTMCloneTable
DEBUG: [cbin.c:2573] Cannot resolve symbol address __gmon_start__
DEBUG: [cbin.c:2573] Cannot resolve symbol address _ITM_registerTMCloneTable
DEBUG: [cbin.c:2573] Cannot resolve symbol address __cxa_finalize
EOF
RUN

View File

@ -22,7 +22,6 @@ EOF
EXPECT=<<EOF
nth vaddr bind type lib name
----------------------------
[]
EOF
RUN

View File

@ -34,17 +34,12 @@ nth vaddr bind type lib name
1 ---------- GLOBAL FUNC printf
2 ---------- WEAK NOTYPE __gmon_start__
3 ---------- GLOBAL FUNC __libc_start_main
vaddr paddr type ntype name
---------------------------------------
0x10020008 0x00010008 ADD_32 20 __gmon_start__
0x10020064 0x10020064 ADD_32 21 printf
0x1002006c 0x1002006c ADD_32 21 __gmon_start__
0x10020074 0x10020074 ADD_32 21 __libc_start_main
4 relocations
0x100004a0 str.Simple_PPC_program. str.Simple_PPC_program.
0x100004a4 "Simple PPC program."
EOF

View File

@ -10,7 +10,6 @@ NAME=ELF: arm64 relocs crashing
FILE=bins/elf/librsjni_androix.so
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x0000e210 0x0000e210 SET_64 1026 __cxa_finalize
@ -30,9 +29,6 @@ vaddr paddr type ntype name
0x0000e280 0x0000e280 SET_64 1026 memcpy
0x0000e288 0x0000e288 SET_64 1026 memset
0x0000e290 0x0000e290 SET_64 1026 dlsym
17 relocations
EOF
RUN
@ -57,7 +53,6 @@ nth vaddr bind type lib name
13 0x0000b840 GLOBAL FUNC malloc
14 0x0000b8a0 GLOBAL FUNC memcpy
15 0x0000b8b0 GLOBAL FUNC memset
EOF
RUN
@ -298,7 +293,6 @@ nth vaddr bind type lib name
209 0x000525b0 GLOBAL FUNC iconv_open
210 0x000525b8 GLOBAL FUNC __sprintf_chk
211 0x000525c0 GLOBAL FUNC socket
EOF
RUN

View File

@ -18,8 +18,6 @@ EXPECT=<<EOF
0x0000003a 0x0000003a 0x00000040 ShentSize
0x0000003c 0x0000003c 0x00000022 ShNum
0x0000003e 0x0000003e 0x00000021 ShrStrndx
14 fields
EOF
RUN
@ -43,7 +41,5 @@ EXPECT=<<EOF
0x0000003a 0x0000003a 0x00000040 ShentSize
0x0000003c 0x0000003c 0x00000019 ShNum
0x0000003e 0x0000003e 0x00000018 ShrStrndx
14 fields
EOF
RUN

View File

@ -2,7 +2,6 @@ NAME=ELF: dynamic p_offset
FILE=bins/elf/analysis/dynamic-poffset
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x00600988 0x00000988 SET_64 6 __gmon_start__
@ -10,9 +9,6 @@ vaddr paddr type ntype name
0x006009b0 0x000009b0 SET_64 7 close
0x006009b8 0x000009b8 SET_64 7 __libc_start_main
0x006009c0 0x000009c0 SET_64 7 open
5 relocations
EOF
RUN
@ -228,7 +224,6 @@ e asm.bytes=false
pd 40
EOF
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x0003f94c 0x0001f94c ADD_32 20 _Jv_RegisterClasses
@ -353,9 +348,6 @@ vaddr paddr type ntype name
0x000406c0 0x000406c0 ADD_32 19 __ctype
0x000408d8 0x000408d8 ADD_32 19 tzname
0x000408e8 0x000408e8 ADD_32 19 _environ
122 relocations
;-- section..plt:
;-- _PROCEDURE_LINKAGE_TABLE_:
0x0003f95c unimp 0 ; [17] -rwx section size 1420 named .plt
@ -428,7 +420,6 @@ e asm.bytes=false
pd 40
EOF
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x000ec004 0x000cc004 ADD_32 20 __gmon_start__
@ -637,9 +628,6 @@ vaddr paddr type ntype name
0x000f0c70 0x000f0c70 ADD_32 19 stdin
0x000f0c74 0x000f0c74 ADD_32 19 BC
0x000f0c78 0x000f0c78 ADD_32 19 stdout
206 relocations
;-- section..plt:
0x000ec014 unimp 0 ; [23] -rwx section size 2428 named .plt
0x000ec018 unimp 0

View File

@ -34,9 +34,7 @@ nth vaddr bind type lib name
5 0x00000940 GLOBAL FUNC __android_log_print
6 0x00000970 GLOBAL FUNC fopen
7 0x00000980 GLOBAL FUNC __cxa_atexit
relocs
vaddr paddr type ntype name
---------------------------------------
0x00002d78 0x00001d78 ADD_64 1027 0x000009a0
@ -52,9 +50,6 @@ vaddr paddr type ntype name
0x00002fe0 0x00001fe0 SET_64 1026 _JNIEnv::ReleaseStringUTFChars(_jstring*, char const*)
0x00002fe8 0x00001fe8 SET_64 1026 fopen
0x00002ff0 0x00001ff0 SET_64 1026 __cxa_atexit
13 relocations
EOF
RUN
@ -68,7 +63,6 @@ WARN: Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e
WARN: Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
EOF
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x0007b480 0x0007b480 SET_64 1026 __libc_init
@ -392,8 +386,5 @@ vaddr paddr type ntype name
0x0007be70 0x0007be70 SET_64 1026 ttyname
0x0007be78 0x0007be78 SET_64 1026 getppid
0x0007be80 0x0007be80 SET_64 1026 prlimit
321 relocations
EOF
RUN

View File

@ -2,7 +2,6 @@ NAME=sections list
FILE=bins/elf/analysis/main_wrong_sect
CMDS=iS;iSS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
@ -41,8 +40,6 @@ nth paddr size vaddr vsize perm type name
33 0x00000e70 0x156 0x00000000 0x156 ---- STRTAB .shstrtab
34 0x000018c8 0x6d8 0x00000000 0x6d8 ---- SYMTAB .symtab
35 0x00001fa0 0x23a 0x00000000 0x23a ---- STRTAB .strtab
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x00000040 0x1c0 0x00400040 0x1c0 -r-x MAP PHDR
@ -54,7 +51,6 @@ nth paddr size vaddr vsize perm type name
6 0x000005d0 0x34 0x004005d0 0x34 -r-- MAP GNU_EH_FRAME
7 0x00000000 0x0 0x00000000 0x0 -rw- MAP GNU_STACK
8 0x00000000 0x40 0x00400000 0x40 -rw- MAP ehdr
EOF
RUN

View File

@ -18,7 +18,6 @@ NAME=cdogs.exe sections
FILE=bins/le/cdogs.exe
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
---------------------------------------------------------
0 0x0000d200 0x1000 0x00010000 0x1000 -r-x ---- obj.1.page.0
@ -83,7 +82,6 @@ nth paddr size vaddr vsize perm type name
59 0x00048200 0x1000 0x0004e000 0x1000 -rw- ---- obj.2.page.14
60 0x00049200 0xd8c 0x0004f000 0x1000 -rw- ---- obj.2.page.15
61 0x00000000 0x0 0x00050000 0x16030 -rw- ---- obj.2.page.zerofill
EOF
RUN
@ -158,7 +156,7 @@ cat $relocs~0x0004e~?
cat $relocs~0x0004f~?
EOF
EXPECT=<<EOF
5238
5237
151
160
102
@ -246,7 +244,6 @@ NAME=GCC.EXE sections
FILE=bins/le/GCC.EXE
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-----------------------------------------------------------
0 0x00001000 0x1000 0x00010000 0x1000 -r-x ---- obj.1.page.0
@ -268,7 +265,6 @@ nth paddr size vaddr vsize perm type name
16 0x00000000 0x0 0x00021000 0x1804 -rw- ---- obj.2.page.zerofill
17 0x00000000 0x0 0x00030000 0x2000000 -rw- ---- obj.3
18 0x00000000 0x0 0x02030000 0x800000 -rw- ---- obj.4
EOF
RUN
@ -276,7 +272,6 @@ NAME=GCC.EXE relocations
FILE=bins/le/GCC.EXE
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x00010006 0x00001006 SET_32 8 emx.1
@ -290,9 +285,6 @@ vaddr paddr type ntype name
0x0001d39f 0x0000e39f SET_32 8 doscalls.257
0x0001d3d9 0x0000e3d9 SET_32 8 doscalls.281
0x0001d3f4 0x0000e3f4 SET_32 8 doscalls.257
11 relocations
EOF
RUN
@ -302,8 +294,6 @@ CMDS=il
EXPECT=<<EOF
emx
doscalls
2 libraries
EOF
RUN
@ -337,7 +327,6 @@ NAME=GNUGREP.DLL sections
FILE=bins/le/GNUGREP.DLL
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
--------------------------------------------------------
0 0x00001600 0x1000 0x00010000 0x1000 -r-x ---- obj.1.page.0
@ -351,7 +340,6 @@ nth paddr size vaddr vsize perm type name
8 0x00009400 0x8 0x00020000 0x8 -r-x ---- obj.2.page.0
9 0x00009600 0x8 0x00030000 0x8 -r-x ---- obj.3.page.0
10 0x00001400 0x200 0x00040000 0x824 -rw- ---- obj.4.page.0
EOF
RUN
@ -362,8 +350,6 @@ EXPECT=<<EOF
GNUREGEX
EMXLIBC
emx
3 libraries
EOF
RUN
@ -377,7 +363,7 @@ cat $relocs~EMXLIBC~?
cat $relocs~emx~?
EOF
EXPECT=<<EOF
1169
1168
8
183
1

View File

@ -96,9 +96,9 @@ RUN
NAME=: 32bit - libraries count
FILE=bins/mdmp/hello.dmp
CMDS=il~libraries
CMDS=il~?
EXPECT=<<EOF
57 libraries
57
EOF
RUN
@ -188,9 +188,9 @@ RUN
NAME=: 32bit - relocs count
FILE=bins/mdmp/hello.dmp
CMDS=ir~relocations
CMDS=ir~?
EXPECT=<<EOF
2028 relocations
2030
EOF
RUN
@ -232,9 +232,9 @@ RUN
NAME=: 64bit - libraries count
FILE=bins/mdmp/hello64.dmp
CMDS=il~libraries
CMDS=il~?
EXPECT=<<EOF
49 libraries
49
EOF
RUN
@ -320,9 +320,9 @@ RUN
NAME=: 64bit - relocs count
FILE=bins/mdmp/hello64.dmp
CMDS=ir~relocations
CMDS=ir~?
EXPECT=<<EOF
1509 relocations
1511
EOF
RUN

View File

@ -7,12 +7,10 @@ pd 3
om
EOF
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000200 0x0 0x00000000 0x0 -rwx ---- seg_000
1 0x00000200 0x1 0x00000000 0x1 -rwx ---- seg_001
;-- section.seg_000:
;-- section.seg_001:
;-- mz.dos_header:

View File

@ -29,12 +29,10 @@ NAME=NE Segments
FILE=bins/ne/anim8.exe
CMDS=iSS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
--------------------------------------------------------
0 0x00000a00 0x54ee 0x00000a00 0x54ee ---x MAP MOVEABLE.2560
1 0x00007600 0x3ec4 0x00007600 0x3ec4 -rwx MAP MOVEABLE.30208
EOF
RUN
@ -48,7 +46,6 @@ nth vaddr bind type lib name
2 0x00000000 NONE NONE USER
3 0x00000000 NONE NONE GDI
4 0x00000000 NONE NONE WIN87EM
EOF
RUN
@ -76,7 +73,6 @@ EXPECT=<<EOF
0x000056a0 0x000056a0 ADD_16 5 WIN87EM.0
0x000056b3 0x000056b3 ADD_16 5 WIN87EM.0
0x00005891 0x00005891 ADD_16 5 WIN87EM.0
vaddr paddr type ntype name
---------------------------------------
0x00000a01 0x00000a01 SET_32 3 KERNEL.INITTASK
@ -87,5 +83,6 @@ vaddr paddr type ntype name
0x00000ad0 0x00000ad0 SET_32 3 KERNEL.UNLOCKSEGMENT
0x00000f5e 0x00000f5e SET_32 3 USER.SETTIMER
0x00000f4d 0x00000f4d SET_32 3 USER.KILLTIMER
0x00000f13 0x00000f13 SET_32 3 USER.SETTIMER
EOF
RUN

View File

@ -12,7 +12,6 @@ FILE=bins/nro/appstore.nro
ARGS=-e io.cache=true
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
------------------------------------------------------------
0 0x00000000 0x80 0x00000000 0x80 -r-- ---- header
@ -20,7 +19,6 @@ nth paddr size vaddr vsize perm type name
2 0x00000000 0x1b4000 0x00000000 0x1b4000 -r-x ---- text
3 0x001b4000 0x5a000 0x001b4000 0x5a000 -r-- ---- ro
4 0x0020e000 0xf000 0x0020e000 0xf000 -rw- ---- data
EOF
RUN

View File

@ -12,14 +12,12 @@ FILE=bins/nso/application.nso
ARGS=-e io.cache=true
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
----------------------------------------------------------
0 0x00000000 0x100 0x00000000 0x100 -r-- ---- header
1 0x00000100 0x20e18 0x08000000 0x20e18 -r-x ---- text
2 0x0001718f 0xdb0c 0x08021000 0xdb0c -r-- ---- ro
3 0x0001f856 0x4218 0x0802f000 0x4218 -rw- ---- data
EOF
RUN

View File

@ -28,12 +28,10 @@ NAME=sections 16 bits omf
FILE=bins/omf/hello_world
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000073 0x13 0x00001000 0x13 -rwx ---- text_1
1 0x00000095 0xe 0x00001013 0xe -rwx ---- data_1
EOF
RUN
@ -86,12 +84,10 @@ NAME=sections 32 bits omf
FILE=bins/omf/hello_world32
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x00000074 0x1d 0x00001000 0x1d -rwx ---- .text_1
1 0x000000a3 0xe 0x0000101d 0xe -rwx ---- .data_1
EOF
RUN

View File

@ -35,7 +35,6 @@ FILE=bins/pe/96emptysections.exe
ARGS=-n
CMDS=!rabin2 -pS bins/pe/96emptysections.exe
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------
0 0x00001200 0x200 0x00001200 0x1000 -rwx ---- sect_0
@ -134,7 +133,6 @@ nth paddr size vaddr vsize perm type name
93 0x00000000 0x0 0x00000000 0x1000 ---- ---- sect_93
94 0x00000000 0x0 0x00000000 0x1000 ---- ---- sect_94
95 0x00000000 0x0 0x00000000 0x1000 ---- ---- sect_95
EOF
RUN

View File

@ -27,7 +27,6 @@ FILE=bins/pe/96workingsections.exe
ARGS=-n
CMDS=!rabin2 -S bins/pe/96workingsections.exe
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------
0 0x00001200 0x200 0x00402000 0x1000 -rwx ---- sect_0
@ -126,7 +125,6 @@ nth paddr size vaddr vsize perm type name
93 0x0000cc00 0x200 0x0045f000 0x1000 -rwx ---- sect_93
94 0x0000ce00 0x200 0x00460000 0x1000 -rwx ---- sect_94
95 0x0000d000 0x200 0x00461000 0x1000 -rwx ---- sect_95
EOF
RUN
@ -135,7 +133,6 @@ FILE=bins/pe/96workingsections.exe
ARGS=-n
CMDS=!rabin2 -uS bins/pe/96workingsections.exe
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------
0 0x00001200 0x200 0x00402000 0x1000 -rwx ---- sect_0
@ -234,6 +231,5 @@ nth paddr size vaddr vsize perm type name
93 0x0000cc00 0x200 0x0045f000 0x1000 -rwx ---- sect_93
94 0x0000ce00 0x200 0x00460000 0x1000 -rwx ---- sect_94
95 0x0000d000 0x200 0x00461000 0x1000 -rwx ---- sect_95
EOF
RUN

View File

@ -88,7 +88,6 @@ nth vaddr bind type lib name
2 0x00404034 NONE FUNC wlanapi.dll WFDCancelOpenSession
3 0x00404038 NONE FUNC wlanapi.dll WFDCloseSession
1 0x00404028 NONE FUNC winbio.dll WinBioAcquireFocus
nth paddr vaddr bind type size lib name demangled
-----------------------------------------------------------------------------------------------------------------------------------
1 0x00001854 0x00403054 NONE FUNC 0 VCRUNTIME140.dll imp.__current_exception_context
@ -215,7 +214,6 @@ nth vaddr bind type lib name
2 0x140005078 NONE FUNC wlanapi.dll WFDCancelOpenSession
3 0x140005080 NONE FUNC wlanapi.dll WFDCloseSession
1 0x140005060 NONE FUNC winbio.dll WinBioAcquireFocus
nth paddr vaddr bind type size lib name demangled
------------------------------------------------------------------------------------------------------------------------------------
1 0x00001ac0 0x1400030c0 NONE FUNC 0 VCRUNTIME140.dll imp.__current_exception

View File

@ -10,7 +10,6 @@ nth vaddr bind type lib name
------------------------------------------
1 0x004010c0 NONE FUNC kernel32.dll ExitProcess
1 0x004010c8 NONE FUNC msvcrt.dll printf
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------------------------
1 0x000002c0 0x004010c0 NONE FUNC 0 kernel32.dll imp.ExitProcess

View File

@ -12,18 +12,13 @@ ir
ii
EOF
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x8000011c 0x00000248 SET_32 3 kernel32_FindAtomW
0x800004f4 0x00000234 SET_32 3 msvcrt_Ordinal_1268
2 relocations
nth vaddr bind type lib name
---------------------------------------
284 ---------- NONE FUNC kernel32 FindAtomW
1268 0x00401034 NONE FUNC msvcrt Ordinal_1268
EOF
RUN

View File

@ -38,7 +38,6 @@ NAME=pe relocs [rabin2 a.exe]
FILE=bins/pe/a.exe
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x000050fc 0x000012a0 SET_32 3 KERNEL32.dll_AddAtomA
@ -61,9 +60,6 @@ vaddr paddr type ntype name
0x000051dc 0x000012ec SET_32 3 msvcrt.dll_malloc
0x000051e6 0x000012f0 SET_32 3 msvcrt.dll_printf
0x000051f0 0x000012f4 SET_32 3 msvcrt.dll_signal
20 relocations
EOF
RUN
@ -71,7 +67,6 @@ NAME=pe relocs [rabin2 b.exe]
FILE=bins/pe/b.exe
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x000050fc 0x000012a0 SET_32 3 KERNEL32.dll_AddAtomA
@ -94,9 +89,6 @@ vaddr paddr type ntype name
0x000051dc 0x000012ec SET_32 3 msvcrt.dll_malloc
0x000051e6 0x000012f0 SET_32 3 msvcrt.dll_printf
0x000051f0 0x000012f4 SET_32 3 msvcrt.dll_signal
20 relocations
EOF
RUN
@ -126,8 +118,6 @@ pstorec.dll
rasapi32.dll
shell32.dll
crypt32.dll
9 libraries
EOF
RUN
@ -263,7 +253,6 @@ nth vaddr bind type lib name
4 0x004123ac NONE FUNC advapi32.dll CryptGetHashParam
5 0x004123b0 NONE FUNC advapi32.dll CryptReleaseContext
6 0x004123b4 NONE FUNC advapi32.dll CryptAcquireContextA
EOF
RUN
@ -271,7 +260,6 @@ NAME=pe32 imported relocations (ir)
FILE=bins/pe/imports_1210.exe
CMDS=ir
EXPECT=<<EOF
vaddr paddr type ntype name
---------------------------------------
0x000123ca 0x0000097c SET_32 3 kernel32.dll_DeleteCriticalSection
@ -400,9 +388,6 @@ vaddr paddr type ntype name
0x00012d14 0x00000bac SET_32 3 advapi32.dll_CryptGetHashParam
0x00012d28 0x00000bb0 SET_32 3 advapi32.dll_CryptReleaseContext
0x00012d3e 0x00000bb4 SET_32 3 advapi32.dll_CryptAcquireContextA
126 relocations
EOF
RUN
@ -411,8 +396,6 @@ FILE=bins/pe/single_import.exe
CMDS=il
EXPECT=<<EOF
comctl32.dll
1 library
EOF
RUN

View File

@ -10,7 +10,6 @@ FILE=bins/pe/cm01.exe
ARGS=-n
CMDS=!rabin2 -S bins/pe/cm01.exe
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
--------------------------------------------------------
0 0x00000600 0x600 0x00401000 0x1000 -r-x ---- CODE
@ -19,7 +18,6 @@ nth paddr size vaddr vsize perm type name
3 0x00001600 0x200 0x00404000 0x1000 -r-- ---- .edata
4 0x00001800 0x200 0x00405000 0x1000 sr-- ---- .reloc
5 0x00001a00 0x1400 0x00406000 0x2000 sr-- ---- .rsrc
EOF
RUN

View File

@ -20,7 +20,5 @@ CMDS=il
EXPECT=<<EOF
kernel32.dll
msvcrt.dll
2 libraries
EOF
RUN

View File

@ -19,12 +19,10 @@ NAME=sections of qnx
FILE=bins/qnx/test.x
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x00000044 0xf6 0x00000044 0xf6 ---- ---- LMF_LOAD
1 0x00000152 0x6c3 0x00000152 0x6c3 ---- ---- LMF_LOAD
EOF
RUN

View File

@ -14,7 +14,6 @@ FILE=bins/rel/d_profileNP.rel
ARGS=-e bin.relocs.apply=true -B 0x80500000
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-----------------------------------------------------
0 0x000000d0 0xa0 0x805000d0 0xa0 -rwx ---- text_1
@ -22,7 +21,6 @@ nth paddr size vaddr vsize perm type name
2 0x00000174 0x4 0x80500174 0x4 -rw- ---- data_3
3 0x00000178 0x34 0x80500178 0x34 -rw- ---- data_4
4 0x00000000 0x4 0x80500380 0x4 -rw- ---- bss
EOF
RUN

View File

@ -68,14 +68,12 @@ NAME=WASM: Wasm - sections
FILE=bins/wasm/binary.wasm
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x0000000a 0x11 0x0000000a 0x11 ---- ---- type
1 0x0000001d 0x2d 0x0000001d 0x2d ---- ---- function
2 0x0000004d 0x1dd 0x0000004d 0x1dd ---- ---- export
3 0x0000022d 0x1f7 0x0000022d 0x1f7 ---- ---- code
EOF
RUN

View File

@ -18,14 +18,12 @@ NAME=xcoff sections
FILE=bins/xcoff/file-xcoff-aix51
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
----------------------------------------------------------
0 0x00000128 0x3722 0x10000128 0x3722 -r-x TEXT .text-0
1 0x0000384a 0x4ba 0x2000084a 0x4ba -rw- DATA .data-1
2 0x00000000 0x1c 0x20000d04 0x1c -rw- BSS .bss-2
3 0x00003d04 0xc73 0x00000000 0xc73 ---- LOADER .loader-3
EOF
RUN
@ -96,7 +94,6 @@ nth vaddr bind type lib name
27 ---------- NONE UNK optind
28 ---------- NONE FUNC getline
29 ---------- NONE UNK optarg
EOF
RUN
@ -113,6 +110,5 @@ nth vaddr bind type lib name
4 ---------- NONE FUNC fflush
5 ---------- NONE FUNC puts
6 ---------- NONE UNK __crt0v
EOF
RUN

View File

@ -16,7 +16,6 @@ NAME=xcoff64 sections
FILE=bins/xcoff/gcc-ppc64-aix-dwarf2-exec
CMDS=iS
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
----------------------------------------------------------
0 0x00000480 0xafd 0x20001300 0xafd -r-x TEXT .text
@ -29,7 +28,6 @@ nth paddr size vaddr vsize perm type name
7 0x00001c7a 0x40 0x20002830 0x40 ---- DWARF .dwarnge
8 0x00001cba 0x62 0x20002870 0x62 ---- DWARF .dwloc
9 0x00001d1c 0x6605 0x200028e0 0x6605 ---- DEBUG .debug
EOF
RUN

View File

@ -9,13 +9,11 @@ is
EOF
EXPECT=<<EOF
--
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x50 -r-- ---- header
1 0x00000060 0x0 0x00000060 0xa4b8 -r-x ---- blck_code_0
2 0x0000a518 0x0 0x0000a518 0x1518 -r-x ---- trans_code_0
--
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------------

View File

@ -81,7 +81,6 @@ NAME=rabin2 -K md5 -S file
FILE=bins/pe/a.exe
CMDS=!rabin2 -K md5 -S ${R2_FILE}
EXPECT=<<EOF
nth paddr size vaddr vsize perm md5 type name
----------------------------------------------------------------------------------------
0 0x00000400 0xa00 0x00401000 0x1000 -r-x 3d6a5b8dc5e41b09659638ad5735e5b5 ---- .text
@ -89,7 +88,6 @@ nth paddr size vaddr vsize perm md5 t
2 0x00001000 0x200 0x00403000 0x1000 -r-- c9a877a4e945b087b8323830442c88d6 ---- .rdata
3 0x00000000 0x0 0x00404000 0x1000 -rw- ---- .bss
4 0x00001200 0x400 0x00405000 0x1000 -rw- 963212dc58a74f32e0f6ffce84dcf7ea ---- .idata
EOF
RUN
@ -120,7 +118,6 @@ EOF
EXPECT=<<EOF
32
11
nth paddr size vaddr vsize perm type name
-------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL prixfixe.
@ -153,8 +150,6 @@ nth paddr size vaddr vsize perm type name
27 0x000006c5 0x106 0x00000000 0x106 ---- STRTAB prixfixe..shstrtab
28 0x00000c7c 0x450 0x00000000 0x450 ---- SYMTAB prixfixe..symtab
29 0x000010cc 0x257 0x00000000 0x257 ---- STRTAB prixfixe..strtab
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x00000034 0x100 0x08048034 0x100 -r-x MAP prixfixe.PHDR
@ -166,7 +161,6 @@ nth paddr size vaddr vsize perm type name
6 0x000004c0 0x2c 0x080484c0 0x2c -r-- MAP prixfixe.GNU_EH_FRAME
7 0x00000000 0x0 0x00000000 0x0 -rw- MAP prixfixe.GNU_STACK
8 0x00000000 0x34 0x08048000 0x34 -rw- MAP prixfixe.ehdr
EOF
RUN
@ -335,12 +329,10 @@ nth vaddr bind type lib name
---------------------------------
0 0x00001f94 NONE FUNC exit
1 ---------- NONE FUNC dyld_stub_binder
nth vaddr bind type lib name
----------------------------------
0 0x100000f40 NONE FUNC exit
1 ---------- NONE FUNC dyld_stub_binder
[{"ordinal":0,"bind":"NONE","type":"FUNC","name":"exit","plt":4294971200},{"ordinal":1,"bind":"NONE","type":"FUNC","name":"dyld_stub_binder"}]
EOF
RUN
@ -353,7 +345,6 @@ nth vaddr bind type lib name
---------------------------------
0 0x00001f94 NONE FUNC exit
1 ---------- NONE FUNC dyld_stub_binder
EOF
RUN
@ -410,7 +401,6 @@ rm .tmp/rabin2testpe1.exe
EOF
EXPECT=<<EOF
wx e0000040 @ 0x244
nth paddr size vaddr vsize perm type name
--------------------------------------------------------
0 0x00000400 0x8a00 0x00401000 0x9000 -r-x ---- .text
@ -418,7 +408,6 @@ nth paddr size vaddr vsize perm type name
2 0x0000b200 0x1000 0x0040d000 0x3000 -rwx ---- .data
3 0x0000c200 0x200 0x00410000 0x1000 -r-- ---- .rsrc
4 0x0000c400 0xe00 0x00411000 0x1000 -r-- ---- .reloc
EOF
RUN
@ -433,11 +422,9 @@ rm .tmp/rabin2testpe2.exe
EOF
EXPECT=<<EOF
wx 10000000 @ 0x16c
nth paddr size vaddr vsize perm type name
-------------------------------------------------------
0 0x00000200 0x200 0x00401000 0x1000 s--- ---- sect_0
EOF
RUN
@ -483,7 +470,6 @@ NAME=rabin2 -g
FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=!rabin2 -g ${R2_FILE}
EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
@ -516,8 +502,6 @@ nth paddr size vaddr vsize perm type name
27 0x000006c5 0x106 0x00000000 0x106 ---- STRTAB .shstrtab
28 0x00000c7c 0x450 0x00000000 0x450 ---- SYMTAB .symtab
29 0x000010cc 0x257 0x00000000 0x257 ---- STRTAB .strtab
nth paddr size vaddr vsize perm type name
------------------------------------------------------
0 0x00000034 0x100 0x08048034 0x100 -r-x MAP PHDR
@ -529,7 +513,6 @@ nth paddr size vaddr vsize perm type name
6 0x000004c0 0x2c 0x080484c0 0x2c -r-- MAP GNU_EH_FRAME
7 0x00000000 0x0 0x00000000 0x0 -rw- MAP GNU_STACK
8 0x00000000 0x34 0x08048000 0x34 -rw- MAP ehdr
vaddr=0x08048300 paddr=0x00000300 haddr=0x00000018 hvaddr=0x08048018 type=program
vaddr=0x080483d0 paddr=0x000003d0 hvaddr=0x0804959c hpaddr=0x0000059c type=init
vaddr=0x080483b0 paddr=0x000003b0 hvaddr=0x080495a0 hpaddr=0x000005a0 type=fini
@ -539,7 +522,6 @@ nth vaddr bind type lib name
1 0x080482d0 GLOBAL FUNC puts
2 0x080482e0 WEAK NOTYPE __gmon_start__
3 0x080482f0 GLOBAL FUNC __libc_start_main
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------------------------------------------
4 0x000004ac 0x080484ac GLOBAL OBJ 4 _IO_stdin_used
@ -654,21 +636,13 @@ va true
0x0000002e 0x0000002e 0x00000028 ShentSize
0x00000030 0x00000030 0x0000001e ShNum
0x00000032 0x00000032 0x0000001b ShrStrndx
14 fields
libc.so.6
1 library
vaddr paddr type ntype name
---------------------------------------
0x08049690 0x00000690 SET_32 6 __gmon_start__
0x080496a0 0x000006a0 SET_32 7 puts
0x080496a4 0x000006a4 SET_32 7 __gmon_start__
0x080496a8 0x000006a8 SET_32 7 __libc_start_main
4 relocations
4899
Version symbols section '.gnu.version' contains 5 entries:
Addr: 0x08048246 Offset: 0x00000246 Link: 5 (.dynsym)
@ -695,7 +669,6 @@ NOTE .note.ABI-tag .note.gnu.build-id
GNU_EH_FRAME .eh_frame_hdr
GNU_STACK
ehdr
EOF
RUN