diff --git a/src/elfs/elfloader.c b/src/elfs/elfloader.c index ec0b344c9..9f6a47413 100755 --- a/src/elfs/elfloader.c +++ b/src/elfs/elfloader.c @@ -157,7 +157,7 @@ int CalcLoadAddr(elfheader_t* head) const char* ElfName(elfheader_t* head) { if(!head) - return "(noelf)"; + return "box64"; return head->name; } const char* ElfPath(elfheader_t* head) @@ -1353,6 +1353,22 @@ const char* FindNearestSymbolName(elfheader_t* h, void* p, uintptr_t* start, uin const char* ret = NULL; uintptr_t s = 0; uint64_t size = 0; + #ifdef HAVE_TRACE + if(!h) { + if(getProtection((uintptr_t)p)&(PROT_READ)) { + if(*(uint8_t*)(p)==0xCC && *(uint8_t*)(p+1)=='S' && *(uint8_t*)(p+2)=='C') { + ret = getBridgeName(*(void**)(p+3+8)); + if(ret) { + if(start) + *start = (uintptr_t)p; + if(sz) + *sz = 32; + } + } + } + return ret; + } + #endif if(!h || h->fini_done) return ret; diff --git a/tests/test19 b/tests/test19 index c3ab30337..6155399cc 100755 Binary files a/tests/test19 and b/tests/test19 differ diff --git a/tests/test19.c b/tests/test19.c index 545f8f999..f65137d1f 100644 --- a/tests/test19.c +++ b/tests/test19.c @@ -42,6 +42,8 @@ void myfunc3() p = strchr(strings[j], ':'); if(!p) p = strings[j]; + if(!strcmp(p, ":ExitEmulation")) + p = "???"; printf("%s\n", p); } free(strings);