- if ( it->flags & EXPORT_SYMBOL_FLAGS_REEXPORT ) {
- if ( it->importName[0] == '\0' )
- fprintf(stdout, "[re-export] %s from dylib=%llu\n", it->name, it->other);
- else
- fprintf(stdout, "[re-export] %s from dylib=%llu named=%s\n", it->name, it->other, it->importName);
- }
- else {
- const char* flags = "";
- if ( it->flags & EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION )
- flags = "[weak_def] ";
- else if ( (it->flags & EXPORT_SYMBOL_FLAGS_KIND_MASK) == EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL )
- flags = "[per-thread] ";
- if ( it->flags & EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER ) {
- flags = "[resolver] ";
- fprintf(stdout, "0x%08llX %s%s (resolver=0x%08llX)\n", fBaseAddress+it->address, flags, it->name, it->other);
+ const bool reExport = (it->flags & EXPORT_SYMBOL_FLAGS_REEXPORT);
+ const bool weakDef = (it->flags & EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION);
+ const bool threadLocal = ((it->flags & EXPORT_SYMBOL_FLAGS_KIND_MASK) == EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL);
+ const bool abs = ((it->flags & EXPORT_SYMBOL_FLAGS_KIND_MASK) == EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE);
+ const bool resolver = (it->flags & EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER);
+ if ( reExport )
+ printf("[re-export] ");
+ else
+ printf("0x%08llX ", fBaseAddress+it->address);
+ printf("%s", it->name);
+ if ( weakDef || threadLocal || resolver || abs ) {
+ bool needComma = false;
+ printf(" [");
+ if ( weakDef ) {
+ printf("weak_def");
+ needComma = true;