diff --git a/research/custom_loader/b.cc b/research/custom_loader/b.cc index dfc36b4..003abd1 100644 --- a/research/custom_loader/b.cc +++ b/research/custom_loader/b.cc @@ -319,13 +319,12 @@ void *find_in_export_trie(const void *header, void *trie, const char *symbol) { // terminal node will have data uint32_t data_count = 0; decode_uleb128(ptr, &data_count); - if (data_count != 0) { + if (data_count != 0 && *find == 0) { // printf("reached terminal node\n"); - if (*find != 0) { - // it reaches terminal node but symbol is not fully scanned - return 0; - } break; + } else if (data_count) { + // still need to follow the branch + ptr += data_count; } char num_child = ptr[0]; ptr++;