| 552 | |
| 553 | } |
| 554 | void *GetLinuxSigPtr(void *handle, const char* symbol) |
| 555 | { |
| 556 | bool isAt = (symbol[0] == '@' && symbol[1] != '\0'); |
| 557 | int matches = 0; |
| 558 | bool dummy; |
| 559 | |
| 560 | if (isAt) |
| 561 | { |
| 562 | if( use_symtab && mu.ResolveSymbol(handle, &symbol[1]) ) |
| 563 | return mu.ResolveSymbol(handle, &symbol[1]); |
| 564 | else if( !use_symtab && dlsym(handle, &symbol[1]) ) |
| 565 | return dlsym(handle, &symbol[1]); |
| 566 | } |
| 567 | else |
| 568 | { |
| 569 | unsigned char real_sig[511]; |
| 570 | size_t real_bytes = UTIL_DecodeHexString(real_sig, sizeof(real_sig), symbol); |
| 571 | |
| 572 | if (real_bytes >= 1) |
| 573 | { |
| 574 | struct link_map *dlmap = (struct link_map *)handle; |
| 575 | |
| 576 | return mu.FindPattern((void *)dlmap->l_addr, (char*)real_sig, real_bytes, matches, dummy); |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | return NULL; |
| 581 | } |
| 582 | int checkSigStringW(int file, const char* symbol) |
| 583 | { |
| 584 | int matches = 0; |
no test coverage detected