Commit 6892434b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winedump: Add support for dumping IMPORT_OBJECT_NAME_EXPORTAS symbols.

This is used by ARM64EC importlibs.
parent 7aa6da98
...@@ -3541,7 +3541,8 @@ typedef enum IMPORT_OBJECT_NAME_TYPE ...@@ -3541,7 +3541,8 @@ typedef enum IMPORT_OBJECT_NAME_TYPE
IMPORT_OBJECT_ORDINAL = 0, IMPORT_OBJECT_ORDINAL = 0,
IMPORT_OBJECT_NAME = 1, IMPORT_OBJECT_NAME = 1,
IMPORT_OBJECT_NAME_NO_PREFIX = 2, IMPORT_OBJECT_NAME_NO_PREFIX = 2,
IMPORT_OBJECT_NAME_UNDECORATE = 3 IMPORT_OBJECT_NAME_UNDECORATE = 3,
IMPORT_OBJECT_NAME_EXPORTAS = 4
} IMPORT_OBJECT_NAME_TYPE; } IMPORT_OBJECT_NAME_TYPE;
typedef struct _ANON_OBJECT_HEADER typedef struct _ANON_OBJECT_HEADER
......
...@@ -46,18 +46,21 @@ static void dump_import_object(const IMPORT_OBJECT_HEADER *ioh) ...@@ -46,18 +46,21 @@ static void dump_import_object(const IMPORT_OBJECT_HEADER *ioh)
if (ioh->Version == 0) if (ioh->Version == 0)
{ {
static const char * const obj_type[] = { "code", "data", "const" }; static const char * const obj_type[] = { "code", "data", "const" };
static const char * const name_type[] = { "ordinal", "name", "no prefix", "undecorate" }; static const char * const name_type[] = { "ordinal", "name", "no prefix", "undecorate", "export as" };
const char *name; const char *name, *dll_name;
printf(" Version : %X\n", ioh->Version); printf(" Version : %X\n", ioh->Version);
printf(" Machine : %X (%s)\n", ioh->Machine, get_machine_str(ioh->Machine)); printf(" Machine : %X (%s)\n", ioh->Machine, get_machine_str(ioh->Machine));
printf(" TimeDateStamp: %08X %s\n", (UINT)ioh->TimeDateStamp, get_time_str(ioh->TimeDateStamp)); printf(" TimeDateStamp: %08X %s\n", (UINT)ioh->TimeDateStamp, get_time_str(ioh->TimeDateStamp));
printf(" SizeOfData : %08X\n", (UINT)ioh->SizeOfData); printf(" SizeOfData : %08X\n", (UINT)ioh->SizeOfData);
name = (const char *)ioh + sizeof(*ioh); name = (const char *)ioh + sizeof(*ioh);
printf(" DLL name : %s\n", name + strlen(name) + 1); dll_name = name + strlen(name) + 1;
printf(" DLL name : %s\n", dll_name);
printf(" Symbol name : %s\n", name); printf(" Symbol name : %s\n", name);
printf(" Type : %s\n", (ioh->Type < ARRAY_SIZE(obj_type)) ? obj_type[ioh->Type] : "unknown"); printf(" Type : %s\n", (ioh->Type < ARRAY_SIZE(obj_type)) ? obj_type[ioh->Type] : "unknown");
printf(" Name type : %s\n", (ioh->NameType < ARRAY_SIZE(name_type)) ? name_type[ioh->NameType] : "unknown"); printf(" Name type : %s\n", (ioh->NameType < ARRAY_SIZE(name_type)) ? name_type[ioh->NameType] : "unknown");
if (ioh->NameType == IMPORT_OBJECT_NAME_EXPORTAS)
printf(" Export name : %s\n", dll_name + strlen(dll_name) + 1);
printf(" %-13s: %u\n", (ioh->NameType == IMPORT_OBJECT_ORDINAL) ? "Ordinal" : "Hint", ioh->Ordinal); printf(" %-13s: %u\n", (ioh->NameType == IMPORT_OBJECT_ORDINAL) ? "Ordinal" : "Hint", ioh->Ordinal);
printf("\n"); printf("\n");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment