| 33 | }; |
| 34 | |
| 35 | int fake_dlclose(void *handle) { |
| 36 | if (handle) { |
| 37 | struct ctx *ctx = (struct ctx *) handle; |
| 38 | if (ctx->dynsym) free(ctx->dynsym); /* we're saving dynsym and dynstr */ |
| 39 | if (ctx->dynstr) free(ctx->dynstr); /* from library file just in case */ |
| 40 | free(ctx); |
| 41 | } |
| 42 | return 0; |
| 43 | } |
| 44 | |
| 45 | void *fake_dlopen(const char *libpath, int flags) { |
| 46 | FILE *maps; |