Add experimental zign.mangled to not use demmangled symbol names ##signatures

This commit is contained in:
pancake 2023-04-09 17:30:59 +02:00
parent 93b2886ade
commit 5bf6f11c9c
23 changed files with 224 additions and 194 deletions

View File

@ -1197,7 +1197,7 @@ static void insn_memory_error_func(int status, bfd_vma memaddr, struct disassemb
static int loongarch_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *b, int len, RAnalOpMask mask) {
struct loongarch_ASE *ase = NULL;
const struct loongarch_anal_opcode *it;
ut32 opcode, optype;
ut32 opcode; // , optype;
ut32 insn_id = 0;
if (!op || (len < INSNLEN)) {
return INSNLEN;
@ -1209,7 +1209,7 @@ static int loongarch_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *b, int l
opcode = r_read_le32 (b);
/* eprintf("opcode: 0x%x \n", opcode); */
optype = 0;
// optype = 0;
for (ase = la_ases; ase->opcode; ase++) {
if (!ase->opc_htab_inited) {
@ -1230,7 +1230,7 @@ static int loongarch_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *b, int l
it = ase->la_opcode_ht[LA_INSN_HASH(opcode)];
/* it = ase->opcode; */
for (; it->match; it++) {
optype ++;
// optype ++;
if ((opcode & it->mask) == it->match) {
insn_id = it->index;
op->type = it->r_type;

View File

@ -892,6 +892,21 @@ static char *get_unique_name(Sdb *sdb, const char *name, const RSpace *sp) {
return NULL;
}
static char *real_function_name(RAnal *a, ut64 addr, const char *name) {
RCore *core = a->coreb.core;
if (a->coreb.cfggeti (core, "zign.mangled")) {
// resolve the manged name
char *res = a->coreb.cmdstrf (core, "is,vaddr/eq/0x%"PFMT64x",name/cols,a/head/1,:quiet", addr);
if (res) {
r_str_trim (res);
if (*res) {
return res;
}
}
}
return strdup (name);
}
R_API int r_sign_all_functions(RAnal *a, bool merge) {
RAnalFunction *fcni = NULL;
RListIter *iter = NULL;
@ -904,15 +919,17 @@ R_API int r_sign_all_functions(RAnal *a, bool merge) {
if (r_cons_is_breaked ()) {
break;
}
char *realname = real_function_name (a, fcni->addr, fcni->name);
RSignItem *it = NULL;
if (merge || !name_exists (a->sdb_zigns, fcni->name, sp)) {
it = item_from_func (a, fcni, fcni->name);
if (merge || !name_exists (a->sdb_zigns, realname, sp)) {
it = item_from_func (a, fcni, realname);
} else {
char *name = get_unique_name (a->sdb_zigns, fcni->name, sp);
if (name) {
it = item_from_func (a, fcni, name);
}
free (name);
free (realname);
}
if (it) {
if (prev_name) {

View File

@ -304,7 +304,7 @@ R_API bool r_core_bin_load_structs(RCore *core, const char *file) {
return false;
}
}
if (strchr (file, '\"')) { // TODO: escape "?
if (strchr (file, '\"')) { // TODO: escape "?
R_LOG_ERROR ("Invalid char found in filename");
return false;
}
@ -2312,7 +2312,7 @@ static void snFini(SymName *sn) {
R_FREE (sn->methflag);
}
static bool isAnExport(RBinSymbol *s) {
static bool its_an_export(RBinSymbol *s) {
/* workaround for some bin plugs */
if (s->is_imported) {
return false;
@ -2409,7 +2409,7 @@ static int bin_symbols(RCore *r, PJ *pj, int mode, ut64 laddr, int va, ut64 at,
return 0;
}
bool is_arm = info && info->arch && !strncmp (info->arch, "arm", 3);
bool is_arm = info && info->arch && r_str_startswith (info->arch, "arm");
const char *lang = bin_demangle ? r_config_get (r->config, "bin.lang") : NULL;
RList *symbols = r_bin_get_symbols (r->bin);

View File

@ -3864,6 +3864,7 @@ R_API int r_core_config_init(RCore *core) {
SETPREF ("zign.diff.bthresh", "1.0", "threshold for diffing zign bytes [0, 1] (see zc?)");
SETPREF ("zign.diff.gthresh", "1.0", "threshold for diffing zign graphs [0, 1] (see zc?)");
SETPREF ("zign.threshold", "0.0", "minimum similarity required for inclusion in zb output");
SETBPREF ("zign.mangled", "false", "use the manged name for zignatures (EXPERIMENTAL)");
/* diff */
SETCB ("diff.sort", "addr", &cb_diff_sort, "specify function diff sorting column see (e diff.sort=?)");

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2009-2022 - pancake */
/* radare - LGPL - Copyright 2009-2023 - pancake */
#include <r_core.h>
#include "../bin/format/pdb/pdb_downloader.h"

View File

@ -734,7 +734,7 @@ static bool search(RCore *core, bool rad, bool only_func) {
}
}
print_ctx_hits (&ctx);
return ctx.count > 0? true: false;
return ctx.count > 0;
}
static void print_possible_matches(RList *list, bool json, RCore *core) {
@ -843,11 +843,11 @@ static bool bestmatch_fcn(RCore *core, const char *input, bool json) {
}
free (argv);
if (!r_config_get_i (core->config, "zign.bytes")) {
if (!r_config_get_b (core->config, "zign.bytes")) {
r_sign_bytes_free (it->bytes);
it->bytes = NULL;
}
if (!r_config_get_i (core->config, "zign.graph")) {
if (!r_config_get_b (core->config, "zign.graph")) {
r_sign_graph_free (it->graph);
it->graph = NULL;
}
@ -886,7 +886,7 @@ static bool bestmatch_sig(RCore *core, const char *input, bool json) {
return false;
}
if (r_config_get_i (core->config, "zign.bytes")) {
if (r_config_get_b (core->config, "zign.bytes")) {
r_sign_addto_item (core->anal, item, fcn, R_SIGN_BYTES);
RSignBytes *b = item->bytes;
int minsz = r_config_get_i (core->config, "zign.minsz");
@ -894,7 +894,7 @@ static bool bestmatch_sig(RCore *core, const char *input, bool json) {
R_LOG_WARN ("Function signature is too small (%d < %d) See e zign.minsz", b->size, minsz);
}
}
if (r_config_get_i (core->config, "zign.graph")) {
if (r_config_get_b (core->config, "zign.graph")) {
r_sign_addto_item (core->anal, item, fcn, R_SIGN_GRAPH);
}
@ -947,7 +947,6 @@ static bool bestmatch(void *data, const char *input) {
static bool _sig_bytediff_cb(RLevBuf *va, RLevBuf *vb, ut32 ia, ut32 ib) {
RSignBytes *a = (RSignBytes *)va->buf;
RSignBytes *b = (RSignBytes *)vb->buf;
if ((a->bytes[ia] & a->mask[ia]) == (b->bytes[ib] & b->mask[ib])) {
return false;
}

View File

@ -268,6 +268,7 @@ typedef struct r_anal_function_meta_t {
typedef struct r_anal_function_t {
char *name;
// R2_590: add realname for the mangled one
int bits; // ((> bits 0) (set-bits bits))
int type;
const char *cc; // calling convention, should come from RAnal.constpool

View File

@ -1,11 +1,8 @@
/* radare2 - LGPL - Copyright 2015-2021 - pancake */
/* radare2 - LGPL - Copyright 2015-2023 - pancake */
#ifndef R2_BIND_H
#define R2_BIND_H
// TODO: move riobind here too?
// TODO: move rprint here too
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -74,6 +74,9 @@ static bool buf_bytes_resize(RBuffer *b, ut64 newsize) {
static st64 buf_bytes_read(RBuffer *b, ut8 *buf, ut64 len) {
struct buf_bytes_priv *priv = get_priv_bytes (b);
if (!priv->buf) {
return 0;
}
ut64 real_len = priv->length < priv->offset? 0: R_MIN (priv->length - priv->offset, len);
memmove (buf, priv->buf + priv->offset, real_len);
priv->offset += real_len;

View File

@ -1732,3 +1732,29 @@ EXPECT=<<EOF
1
EOF
RUN
NAME=Mangled zignatures
FILE=bins/mach0/mangled
CMDS=<<EOF
e zign.mangled=true
aa
zg
z*~N
?e --
z-*
e zign.mangled=false
zg
z*~N
EOF
EXPECT=<<EOF
za __Z3fooi N __Z3fooii
za __Z3foov N __Z3fooi
za _main N imp.atoi
za __Z3fooii N _main
--
za sym.foo_int__int_ N main
za sym.foo__ N sym.foo_int_
za main N sym.imp.atoi
za sym.foo_int_ N sym.foo_int__int_
EOF
RUN

View File

@ -6,98 +6,98 @@ EXPECT=<<EOF
vaddr paddr type name
---------------------------------
0x00000074 0x00000074 SET_32
0x00000078 0x00000078 SET_32
0x0000007c 0x0000007c SET_32
0x000000a4 0x000000a4 SET_32
0x000000a8 0x000000a8 SET_32
0x000000ac 0x000000ac SET_32
0x000000dc 0x000000dc SET_32
0x000000e0 0x000000e0 SET_32
0x000000e4 0x000000e4 SET_32
0x00000110 0x00000110 SET_32
0x00000148 0x00000148 SET_32
0x0000014c 0x0000014c SET_32
0x0000018c 0x0000018c SET_32
0x000001d4 0x000001d4 SET_32
0x0000020c 0x0000020c SET_32
0x00000260 0x00000260 SET_32
0x00000264 0x00000264 SET_32
0x00000474 0x00000474 SET_32
0x00000640 0x00000640 SET_32
0x00000678 0x00000678 SET_32
0x0000067c 0x0000067c SET_32
0x000006e8 0x000006e8 SET_32
0x000006ec 0x000006ec SET_32
0x000006f0 0x000006f0 SET_32
0x00000814 0x00000814 SET_32
0x00000818 0x00000818 SET_32
0x0000081c 0x0000081c SET_32
0x00000820 0x00000820 SET_32
0x00000824 0x00000824 SET_32
0x00000828 0x00000828 SET_32
0x0000082c 0x0000082c SET_32
0x00000830 0x00000830 SET_32
0x000008a8 0x000008a8 SET_32
0x000008ac 0x000008ac SET_32
0x000008f0 0x000008f0 SET_32
0x00000938 0x00000938 SET_32
0x00000968 0x00000968 SET_32
0x00000994 0x00000994 SET_32
0x00000a68 0x00000a68 SET_32
0x00000c6c 0x00000c6c SET_32
0x00000f68 0x00000f68 SET_32
0x00000f6c 0x00000f6c SET_32
0x00000fac 0x00000fac SET_32
0x00000fd8 0x00000fd8 SET_32
0x000010a8 0x000010a8 SET_32
0x00001108 0x00001108 SET_32
0x00001620 0x00001620 SET_32
0x00001820 0x00001820 SET_32
0x00001824 0x00001824 SET_32
0x00001828 0x00001828 SET_32
0x00001950 0x00001950 SET_32
0x00001954 0x00001954 SET_32
0x00001958 0x00001958 SET_32
0x00001d58 0x00001d58 SET_32
0x00001d5c 0x00001d5c SET_32
0x00001d60 0x00001d60 SET_32
0x00001d64 0x00001d64 SET_32
0x00001d68 0x00001d68 SET_32
0x00001de4 0x00001de4 SET_32
0x00001de8 0x00001de8 SET_32
0x00001dec 0x00001dec SET_32
0x00001df0 0x00001df0 SET_32
0x00001df4 0x00001df4 SET_32
0x00002368 0x00002368 SET_32
0x0000239c 0x0000239c SET_32
0x000023a0 0x000023a0 SET_32
0x000023a4 0x000023a4 SET_32
0x000023a8 0x000023a8 SET_32
0x000023ac 0x000023ac SET_32
0x00002f30 0x00002f30 SET_32
0x00002f3c 0x00002f3c SET_32
0x00002f40 0x00002f40 SET_32
0x00002f44 0x00002f44 SET_32
0x00002f48 0x00002f48 SET_32
0x00002f4c 0x00002f4c SET_32
0x00002f50 0x00002f50 SET_32
0x00002f54 0x00002f54 SET_32
0x00002f60 0x00002f60 SET_32
0x00002f64 0x00002f64 SET_32
0x00002f68 0x00002f68 SET_32
0x00002f6c 0x00002f6c SET_32
0x00002f70 0x00002f70 SET_32
0x00002f74 0x00002f74 SET_32
0x00002f78 0x00002f78 SET_32
0x00002fa0 0x00002fa0 SET_32
0x00002fa4 0x00002fa4 SET_32
0x00002fa8 0x00002fa8 SET_32
0x00002fac 0x00002fac SET_32
0x00002fb0 0x00002fb0 SET_32
0x00002fb4 0x00002fb4 SET_32
0x00002fb8 0x00002fb8 SET_32
0x00002fbc 0x00002fbc SET_32
0x00000074 0x00000074 SET_32
0x00000078 0x00000078 SET_32
0x0000007c 0x0000007c SET_32
0x000000a4 0x000000a4 SET_32
0x000000a8 0x000000a8 SET_32
0x000000ac 0x000000ac SET_32
0x000000dc 0x000000dc SET_32
0x000000e0 0x000000e0 SET_32
0x000000e4 0x000000e4 SET_32
0x00000110 0x00000110 SET_32
0x00000148 0x00000148 SET_32
0x0000014c 0x0000014c SET_32
0x0000018c 0x0000018c SET_32
0x000001d4 0x000001d4 SET_32
0x0000020c 0x0000020c SET_32
0x00000260 0x00000260 SET_32
0x00000264 0x00000264 SET_32
0x00000474 0x00000474 SET_32
0x00000640 0x00000640 SET_32
0x00000678 0x00000678 SET_32
0x0000067c 0x0000067c SET_32
0x000006e8 0x000006e8 SET_32
0x000006ec 0x000006ec SET_32
0x000006f0 0x000006f0 SET_32
0x00000814 0x00000814 SET_32
0x00000818 0x00000818 SET_32
0x0000081c 0x0000081c SET_32
0x00000820 0x00000820 SET_32
0x00000824 0x00000824 SET_32
0x00000828 0x00000828 SET_32
0x0000082c 0x0000082c SET_32
0x00000830 0x00000830 SET_32
0x000008a8 0x000008a8 SET_32
0x000008ac 0x000008ac SET_32
0x000008f0 0x000008f0 SET_32
0x00000938 0x00000938 SET_32
0x00000968 0x00000968 SET_32
0x00000994 0x00000994 SET_32
0x00000a68 0x00000a68 SET_32
0x00000c6c 0x00000c6c SET_32
0x00000f68 0x00000f68 SET_32
0x00000f6c 0x00000f6c SET_32
0x00000fac 0x00000fac SET_32
0x00000fd8 0x00000fd8 SET_32
0x000010a8 0x000010a8 SET_32
0x00001108 0x00001108 SET_32
0x00001620 0x00001620 SET_32
0x00001820 0x00001820 SET_32
0x00001824 0x00001824 SET_32
0x00001828 0x00001828 SET_32
0x00001950 0x00001950 SET_32
0x00001954 0x00001954 SET_32
0x00001958 0x00001958 SET_32
0x00001d58 0x00001d58 SET_32
0x00001d5c 0x00001d5c SET_32
0x00001d60 0x00001d60 SET_32
0x00001d64 0x00001d64 SET_32
0x00001d68 0x00001d68 SET_32
0x00001de4 0x00001de4 SET_32
0x00001de8 0x00001de8 SET_32
0x00001dec 0x00001dec SET_32
0x00001df0 0x00001df0 SET_32
0x00001df4 0x00001df4 SET_32
0x00002368 0x00002368 SET_32
0x0000239c 0x0000239c SET_32
0x000023a0 0x000023a0 SET_32
0x000023a4 0x000023a4 SET_32
0x000023a8 0x000023a8 SET_32
0x000023ac 0x000023ac SET_32
0x00002f30 0x00002f30 SET_32
0x00002f3c 0x00002f3c SET_32
0x00002f40 0x00002f40 SET_32
0x00002f44 0x00002f44 SET_32
0x00002f48 0x00002f48 SET_32
0x00002f4c 0x00002f4c SET_32
0x00002f50 0x00002f50 SET_32
0x00002f54 0x00002f54 SET_32
0x00002f60 0x00002f60 SET_32
0x00002f64 0x00002f64 SET_32
0x00002f68 0x00002f68 SET_32
0x00002f6c 0x00002f6c SET_32
0x00002f70 0x00002f70 SET_32
0x00002f74 0x00002f74 SET_32
0x00002f78 0x00002f78 SET_32
0x00002fa0 0x00002fa0 SET_32
0x00002fa4 0x00002fa4 SET_32
0x00002fa8 0x00002fa8 SET_32
0x00002fac 0x00002fac SET_32
0x00002fb0 0x00002fb0 SET_32
0x00002fb4 0x00002fb4 SET_32
0x00002fb8 0x00002fb8 SET_32
0x00002fbc 0x00002fbc SET_32
92 relocations

View File

@ -75,9 +75,8 @@ EXPECT=<<EOF
* 2 fd: 3 +0x00000064 0x00000000 - 0x00000026 r-x fmap..text_0
- 1 fd: 3 +0x0000008b 0x00000030 - 0x0000004b r-- fmap..data_1
[Symbols]
nth paddr vaddr bind type size lib name
---------------------------------------------------
nth paddr vaddr bind type size lib name demangled
------------------------------------------------------------------------
0 ---------- ---------- NONE UNK 4 imp.MessageBoxA
0 ---------- ---------- NONE UNK 4 imp.ExitProcess
0 0x00000064 0x00000000 LOCAL SECT 4 .text

View File

@ -226,9 +226,8 @@ FILE=bins/dex/HelloWorld.dex
CMDS=iE
EXPECT=<<EOF
[Exports]
nth paddr vaddr bind type size lib name
---------------------------------------------------
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------------------------------------------
2 0x00000238 0x00000238 GLOBAL FUNC 20 LHello.method.<init>()V
3 0x0000025c 0x0000025c GLOBAL FUNC 34 LHello.method.main([Ljava/lang/String;)V
4 0x00000290 0x00000290 GLOBAL FUNC 84 LHello.method.foo(I)V

View File

@ -23,7 +23,7 @@ EXPECT=<<EOF
[Imports]
nth vaddr bind type lib name
---------------------------------
0 ---------- NONE NONE
0 ---------- NONE NONE
[{"ordinal":0,"name":""}]
EOF

View File

@ -49,9 +49,8 @@ FILE=bins/elf/analysis/guess-number-riscv64
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-----------------------------------------------------
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------------------------------------------
1 0x00001000 0x00010000 LOCAL SECT 0 .text
2 0x000124f8 0x000214f8 LOCAL SECT 0 .rodata
3 0x00013620 0x00022620 LOCAL SECT 0 .init_array

View File

@ -6,7 +6,7 @@ EXPECT=<<EOF
nth paddr size vaddr vsize perm type name
-------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
0 0x00000000 0x0 0x00000000 0x0 ---- NULL
1 0x00000200 0x1c 0x00404500 0x1c -r-- PROGBITS .interp
2 0x0000021c 0x20 0x0040021c 0x20 -r-- NOTE .note.ABI-tag
3 0x0000023c 0x24 0x0040023c 0x24 -r-- NOTE .note.gnu.build-id

View File

@ -14,9 +14,8 @@ FILE=bins/elf/analysis/custom_ldscript
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-----------------------------------------------------
nth paddr vaddr bind type size lib name demangled
--------------------------------------------------------------------------------
1 0x00000200 0x00400200 LOCAL SECT 0 .interp
2 0x0000022c 0x0040022c LOCAL SECT 0 .note.ABI-tag
3 0x00000250 0x00400250 LOCAL SECT 0 .hash
@ -73,9 +72,8 @@ FILE=bins/elf/analysis/main_nosect
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-----------------------------------------------------
nth paddr vaddr bind type size lib name demangled
--------------------------------------------------------------------------------
1 0x000003e0 0x004003e0 GLOBAL FUNC 16 imp.puts
2 0x000003f0 0x004003f0 GLOBAL FUNC 16 imp.__libc_start_main
3 0x00000400 0x00400400 WEAK NOTYPE 16 imp.__gmon_start__
@ -87,9 +85,8 @@ FILE=bins/elf/analysis/clark
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-----------------------------------------------------
nth paddr vaddr bind type size lib name demangled
--------------------------------------------------------------------------------
8 0x000007dc 0x080487dc GLOBAL OBJ 4 _IO_stdin_used
1 0x00000370 0x08048370 GLOBAL FUNC 16 imp.mprotect
2 0x00000380 0x08048380 GLOBAL FUNC 16 imp.puts
@ -106,49 +103,48 @@ FILE=bins/elf/libmemalloc-dump-mem
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-----------------------------------------------------
3 0x00002dd0 0x00003dd0 WEAK OBJ 36 vtable for gralloc::IMemAlloc
6 0x00001210 0x00001210 GLOBAL FUNC 68 gralloc::IonAlloc::unmap_buffer(void*, unsigned int, int)
11 0x00001254 0x00001254 GLOBAL FUNC 96 gralloc::IonAlloc::open_device()
13 0x000012b4 0x000012b4 GLOBAL FUNC 240 gralloc::IonAlloc::clean_buffer(void*, unsigned int, int, int, int)
15 0x000013a4 0x000013a4 GLOBAL FUNC 84 gralloc::IonAlloc::map_buffer(void**, unsigned int, int, int)
17 0x000013f8 0x000013f8 GLOBAL FUNC 68 gralloc::IonAlloc::free_buffer(void*, unsigned int, int, int)
21 0x0000143c 0x0000143c GLOBAL FUNC 304 gralloc::IonAlloc::alloc_buffer(gralloc::alloc_data&)
22 0x0000156c 0x0000156c GLOBAL FUNC 22 gralloc::IonAlloc::close_device()
24 0x00002df8 0x00003df8 GLOBAL OBJ 36 vtable for gralloc::IonAlloc
26 0x00002e20 0x00003e20 WEAK OBJ 24 vtable for gralloc::IAllocController
27 0x00001614 0x00001614 GLOBAL FUNC 48 gralloc::IonController::getAllocator(int)
28 0x00001644 0x00001644 GLOBAL FUNC 452 gralloc::IonController::allocate(gralloc::alloc_data&, int)
36 0x00001808 0x00001808 GLOBAL FUNC 40 AdrenoMemInfo::AdrenoMemInfo()
39 0x00001808 0x00001808 GLOBAL FUNC 40 AdrenoMemInfo::AdrenoMemInfo()
40 0x00001830 0x00001830 GLOBAL FUNC 16 AdrenoMemInfo::~AdrenoMemInfo()
42 0x00001830 0x00001830 GLOBAL FUNC 16 AdrenoMemInfo::~AdrenoMemInfo()
43 0x00001840 0x00001840 GLOBAL FUNC 288 AdrenoMemInfo::getStride(int, int)
45 0x00001960 0x00001960 GLOBAL FUNC 68 gralloc::IonController::IonController()
47 0x00001960 0x00001960 GLOBAL FUNC 68 gralloc::IonController::IonController()
48 0x000019a4 0x000019a4 GLOBAL FUNC 40 gralloc::IAllocController::getInstance()
49 0x000019cc 0x000019cc GLOBAL FUNC 60 free_buffer(private_handle_t*)
50 0x00001a08 0x00001a08 WEAK FUNC 56 android::Singleton<AdrenoMemInfo>::getInstance()
51 0x00001a40 0x00001a40 GLOBAL FUNC 636 getBufferSizeAndDimensions(int, int, int, int&, int&)
52 0x00001cbc 0x00001cbc GLOBAL FUNC 244 alloc_buffer(private_handle_t**, int, int, int, int)
54 0x00001db0 0x00001db0 WEAK FUNC 44 android::Singleton<AdrenoMemInfo>::hasInstance()
55 0x00001ddc 0x00001ddc WEAK FUNC 2 android::Singleton<AdrenoMemInfo>::~Singleton()
56 0x00001ddc 0x00001ddc WEAK FUNC 2 android::Singleton<AdrenoMemInfo>::~Singleton()
57 0x00001ddc 0x00001ddc WEAK FUNC 2 android::Singleton<AdrenoMemInfo>::Singleton()
58 0x00001ddc 0x00001ddc WEAK FUNC 2 android::Singleton<AdrenoMemInfo>::Singleton()
60 0x00002e38 0x00003e38 GLOBAL OBJ 24 vtable for gralloc::IonController
61 ---------- 0x0000400c GLOBAL OBJ 4 gralloc::IAllocController::sController
62 ---------- 0x00004004 GLOBAL OBJ 4 android::Singleton<AdrenoMemInfo>::sInstance
63 ---------- 0x00004008 GLOBAL OBJ 4 android::Singleton<AdrenoMemInfo>::sLock
nth paddr vaddr bind type size lib name demangled
------------------------------------------------------------------------------------------------------------------------------
3 0x00002dd0 0x00003dd0 WEAK OBJ 36 _ZTVN7gralloc9IMemAllocE vtable for gralloc::IMemAlloc
6 0x00001210 0x00001210 GLOBAL FUNC 68 _ZN7gralloc8IonAlloc12unmap_bufferEPvji gralloc::IonAlloc::unmap_buffer(void*, unsigned int, int)
11 0x00001254 0x00001254 GLOBAL FUNC 96 _ZN7gralloc8IonAlloc11open_deviceEv gralloc::IonAlloc::open_device()
13 0x000012b4 0x000012b4 GLOBAL FUNC 240 _ZN7gralloc8IonAlloc12clean_bufferEPvjiii gralloc::IonAlloc::clean_buffer(void*, unsigned int, int, int, int)
15 0x000013a4 0x000013a4 GLOBAL FUNC 84 _ZN7gralloc8IonAlloc10map_bufferEPPvjii gralloc::IonAlloc::map_buffer(void**, unsigned int, int, int)
17 0x000013f8 0x000013f8 GLOBAL FUNC 68 _ZN7gralloc8IonAlloc11free_bufferEPvjii gralloc::IonAlloc::free_buffer(void*, unsigned int, int, int)
21 0x0000143c 0x0000143c GLOBAL FUNC 304 _ZN7gralloc8IonAlloc12alloc_bufferERNS_10alloc_dataE gralloc::IonAlloc::alloc_buffer(gralloc::alloc_data&)
22 0x0000156c 0x0000156c GLOBAL FUNC 22 _ZN7gralloc8IonAlloc12close_deviceEv gralloc::IonAlloc::close_device()
24 0x00002df8 0x00003df8 GLOBAL OBJ 36 _ZTVN7gralloc8IonAllocE vtable for gralloc::IonAlloc
26 0x00002e20 0x00003e20 WEAK OBJ 24 _ZTVN7gralloc16IAllocControllerE vtable for gralloc::IAllocController
27 0x00001614 0x00001614 GLOBAL FUNC 48 _ZN7gralloc13IonController12getAllocatorEi gralloc::IonController::getAllocator(int)
28 0x00001644 0x00001644 GLOBAL FUNC 452 _ZN7gralloc13IonController8allocateERNS_10alloc_dataEi gralloc::IonController::allocate(gralloc::alloc_data&, int)
36 0x00001808 0x00001808 GLOBAL FUNC 40 _ZN13AdrenoMemInfoC2Ev AdrenoMemInfo::AdrenoMemInfo()
39 0x00001808 0x00001808 GLOBAL FUNC 40 _ZN13AdrenoMemInfoC1Ev AdrenoMemInfo::AdrenoMemInfo()
40 0x00001830 0x00001830 GLOBAL FUNC 16 _ZN13AdrenoMemInfoD2Ev AdrenoMemInfo::~AdrenoMemInfo()
42 0x00001830 0x00001830 GLOBAL FUNC 16 _ZN13AdrenoMemInfoD1Ev AdrenoMemInfo::~AdrenoMemInfo()
43 0x00001840 0x00001840 GLOBAL FUNC 288 _ZN13AdrenoMemInfo9getStrideEii AdrenoMemInfo::getStride(int, int)
45 0x00001960 0x00001960 GLOBAL FUNC 68 _ZN7gralloc13IonControllerC2Ev gralloc::IonController::IonController()
47 0x00001960 0x00001960 GLOBAL FUNC 68 _ZN7gralloc13IonControllerC1Ev gralloc::IonController::IonController()
48 0x000019a4 0x000019a4 GLOBAL FUNC 40 _ZN7gralloc16IAllocController11getInstanceEv gralloc::IAllocController::getInstance()
49 0x000019cc 0x000019cc GLOBAL FUNC 60 _Z11free_bufferP16private_handle_t free_buffer(private_handle_t*)
50 0x00001a08 0x00001a08 WEAK FUNC 56 _ZN7android9SingletonI13AdrenoMemInfoE11getInstanceEv android::Singleton<AdrenoMemInfo>::getInstance()
51 0x00001a40 0x00001a40 GLOBAL FUNC 636 _Z26getBufferSizeAndDimensionsiiiRiS_ getBufferSizeAndDimensions(int, int, int, int&, int&)
52 0x00001cbc 0x00001cbc GLOBAL FUNC 244 _Z12alloc_bufferPP16private_handle_tiiii alloc_buffer(private_handle_t**, int, int, int, int)
54 0x00001db0 0x00001db0 WEAK FUNC 44 _ZN7android9SingletonI13AdrenoMemInfoE11hasInstanceEv android::Singleton<AdrenoMemInfo>::hasInstance()
55 0x00001ddc 0x00001ddc WEAK FUNC 2 _ZN7android9SingletonI13AdrenoMemInfoED2Ev android::Singleton<AdrenoMemInfo>::~Singleton()
56 0x00001ddc 0x00001ddc WEAK FUNC 2 _ZN7android9SingletonI13AdrenoMemInfoED1Ev android::Singleton<AdrenoMemInfo>::~Singleton()
57 0x00001ddc 0x00001ddc WEAK FUNC 2 _ZN7android9SingletonI13AdrenoMemInfoEC2Ev android::Singleton<AdrenoMemInfo>::Singleton()
58 0x00001ddc 0x00001ddc WEAK FUNC 2 _ZN7android9SingletonI13AdrenoMemInfoEC1Ev android::Singleton<AdrenoMemInfo>::Singleton()
60 0x00002e38 0x00003e38 GLOBAL OBJ 24 _ZTVN7gralloc13IonControllerE vtable for gralloc::IonController
61 ---------- 0x0000400c GLOBAL OBJ 4 _ZN7gralloc16IAllocController11sControllerE gralloc::IAllocController::sController
62 ---------- 0x00004004 GLOBAL OBJ 4 _ZN7android9SingletonI13AdrenoMemInfoE9sInstanceE android::Singleton<AdrenoMemInfo>::sInstance
63 ---------- 0x00004008 GLOBAL OBJ 4 _ZN7android9SingletonI13AdrenoMemInfoE5sLockE android::Singleton<AdrenoMemInfo>::sLock
64 ---------- 0x00004004 GLOBAL NOTYPE 0 _edata
65 ---------- 0x00004004 GLOBAL NOTYPE 0 __bss_start
66 ---------- 0x00004010 GLOBAL NOTYPE 0 _end
1 0x00001050 0x00001050 GLOBAL FUNC 16 imp.__cxa_finalize
2 0x0000105c 0x0000105c GLOBAL FUNC 16 imp.__cxa_atexit
4 0x00000000 0x00000000 GLOBAL FUNC 16 imp.__aeabi_unwind_cpp_pr0
5 0x00001068 0x00001068 GLOBAL FUNC 16 operator delete(void*)
5 0x00001068 0x00001068 GLOBAL FUNC 16 imp._ZdlPv operator delete(void*)
7 0x00001074 0x00001074 GLOBAL FUNC 16 imp.munmap
8 0x00001080 0x00001080 GLOBAL FUNC 16 imp.__errno
9 0x0000108c 0x0000108c GLOBAL FUNC 16 imp.strerror
@ -161,7 +157,7 @@ nth paddr vaddr bind type size lib name
20 0x000010e0 0x000010e0 GLOBAL FUNC 16 imp.pthread_mutex_unlock
23 0x000010ec 0x000010ec GLOBAL FUNC 16 imp.pthread_mutex_destroy
25 0x000010f8 0x000010f8 GLOBAL FUNC 16 imp.__cxa_pure_virtual
29 0x00001104 0x00001104 GLOBAL FUNC 16 operator new(unsigned int)
29 0x00001104 0x00001104 GLOBAL FUNC 16 imp._Znwj operator new(unsigned int)
30 0x00001110 0x00001110 GLOBAL FUNC 16 imp.property_get
31 0x0000111c 0x0000111c GLOBAL FUNC 16 imp.strncmp
32 0x00001128 0x00001128 GLOBAL FUNC 16 imp.__stack_chk_fail

View File

@ -330,9 +330,8 @@ FILE=bins/le/GNUGREP.DLL
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
---------------------------------------------------
nth paddr vaddr bind type size lib name demangled
-----------------------------------------------------------------
1 0x00000000 0x00010ddc GLOBAL FUNC 0 grepmain
EOF
RUN

View File

@ -258,9 +258,8 @@ ARGS=-a x86 -b32 -B 0x90000000
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
---------------------------------------------------
nth paddr vaddr bind type size lib name demangled
----------------------------------------------------------------------------
0 0x00005000 0x90000000 GLOBAL FUNC 0 __mh_execute_header
1 0x00005000 0x95613542 LOCAL FUNC 0 radr://5614542
2 0x00005f94 0x90000f94 LOCAL FUNC 0 imp.exit

View File

@ -302,9 +302,8 @@ FILE=bins/mach0/longIdentifiers.dylib
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
---------------------------------------------------
nth paddr vaddr bind type size lib name demangled
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 0x00007fa8 0x00007fa8 GLOBAL FUNC 0 _abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij
1 0x00007fb0 0x00007fb0 GLOBAL FUNC 0 _abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst
2 0x00007fa8 0x00007fa8 LOCAL FUNC 0 func.00007fa8

View File

@ -88,10 +88,10 @@ NAME=C++ demangle exported GLIBCXX symbols
FILE=bins/elf/libstdc++.so.6
CMDS=iE~0x0008ce50
EXPECT=<<EOF
3770 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 std::istream::ignore(long)
3771 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 std::istream::ignore(long)
5087 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 std::istream::ignore(long)
5345 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 std::istream::ignore(long)
3770 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 _ZNSi6ignoreEl std::istream::ignore(long)
3771 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 _ZNSi6ignoreEl std::istream::ignore(long)
5087 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 _ZNSi6ignoreEl@@GLIBCXX_3.4.5 std::istream::ignore(long)
5345 0x0008ce50 0x0008ce50 GLOBAL FUNC 609 _ZNSi6ignoreEl@GLIBCXX_3.4 std::istream::ignore(long)
EOF
RUN

View File

@ -17,9 +17,8 @@ FILE=bins/ne/anim8.exe
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
---------------------------------------------------
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------------
0 0x00000a00 0x00000a00 NONE NONE 0 ANIM8
1 0x00000d8e 0x00000d8e GLOBAL NONE 0 WNDPROC
2 0x00002b5a 0x00002b5a GLOBAL NONE 0 DIAL_ABOUT

View File

@ -19,9 +19,8 @@ FILE=bins/omf/hello_world
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-------------------------------------------------
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------
1 0x00000073 0x00001000 NONE NONE 0 _start
EOF
RUN
@ -80,9 +79,8 @@ FILE=bins/omf/hello_world32
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-------------------------------------------------
nth paddr vaddr bind type size lib name demangled
-------------------------------------------------------------
1 0x00000074 0x00001000 NONE NONE 0 _start
EOF
RUN
@ -114,9 +112,8 @@ FILE=bins/omf/multi_pubdef
CMDS=is
EXPECT=<<EOF
[Symbols]
nth paddr vaddr bind type size lib name
-------------------------------------------------
nth paddr vaddr bind type size lib name demangled
--------------------------------------------------------------------
1 0x00000084 0x00001000 NONE NONE 0 _start
2 0x00000097 0x00001013 NONE NONE 0 second_symbol
EOF