Enable emitting custom name section to aot file (#794)
Enable emitting custom name section to aot file when adding `--enable-dump-call-stack` or `--enable-dump-call-stack` to wamrc and there is custom name section in wasm file, which can be generated by wasi-sdk/emcc "-g" option. So aot runtime can also get the function name from the custom name section instead of export section, to which developer should use `--export-all` for wasi-sdk/emcc to generate export function names.
This commit is contained in:
@ -52,6 +52,7 @@ typedef enum AOTSectionType {
|
||||
typedef enum AOTCustomSectionType {
|
||||
AOT_CUSTOM_SECTION_NATIVE_SYMBOL = 1,
|
||||
AOT_CUSTOM_SECTION_ACCESS_CONTROL = 2,
|
||||
AOT_CUSTOM_SECTION_NAME = 3,
|
||||
} AOTCustomSectionType;
|
||||
|
||||
typedef struct AOTObjectDataSection {
|
||||
@ -133,7 +134,7 @@ typedef struct AOTModule {
|
||||
uint32 mem_init_data_count;
|
||||
AOTMemInitData **mem_init_data_list;
|
||||
|
||||
/* native symobl */
|
||||
/* native symbol */
|
||||
uint32 native_symbol_count;
|
||||
void **native_symbol_list;
|
||||
|
||||
@ -153,7 +154,7 @@ typedef struct AOTModule {
|
||||
uint32 func_type_count;
|
||||
AOTFuncType **func_types;
|
||||
|
||||
/* import global varaible info */
|
||||
/* import global variable info */
|
||||
uint32 import_global_count;
|
||||
AOTImportGlobal *import_globals;
|
||||
|
||||
@ -260,6 +261,11 @@ typedef struct AOTModule {
|
||||
void *elf_hdr;
|
||||
uint32 elf_size;
|
||||
#endif
|
||||
#if WASM_ENABLE_CUSTOM_NAME_SECTION != 0
|
||||
const char **aux_func_names;
|
||||
uint32 *aux_func_indexes;
|
||||
uint32 aux_func_name_count;
|
||||
#endif
|
||||
} AOTModule;
|
||||
|
||||
typedef union {
|
||||
@ -335,7 +341,7 @@ typedef struct AOTModuleInstance {
|
||||
/* points to AOTTableInstance[] */
|
||||
AOTPointer tables;
|
||||
|
||||
/* funciton pointer array */
|
||||
/* function pointer array */
|
||||
AOTPointer func_ptrs;
|
||||
/* function type indexes */
|
||||
AOTPointer func_type_indexes;
|
||||
|
||||
Reference in New Issue
Block a user