* Search for a module_info entry on the list whose address range contains the * given address. If the search address is zero (no module will be loaded at * zero), then we're looking for an empty item to reuse, which is indicated by * module_start being set to UINTPTR_MAX in the entry. */
| 204 | * module_start being set to UINTPTR_MAX in the entry. |
| 205 | */ |
| 206 | static struct module_info * |
| 207 | find_module_info(uintptr_t addr) |
| 208 | { |
| 209 | struct module_info *info; |
| 210 | |
| 211 | STAILQ_FOREACH(info, &module_list, link) { |
| 212 | if ((addr >= info->module_start && addr < info->module_end) || |
| 213 | (addr == 0 && info->module_start == UINTPTR_MAX)) |
| 214 | return (info); |
| 215 | } |
| 216 | return (NULL); |
| 217 | } |
| 218 | |
| 219 | /* |
| 220 | * Handle the loading of a new module by populating a module_info for it. This |
no outgoing calls
no test coverage detected