27 #include <sys/cdefs.h>
30 #include <sys/param.h>
31 #include <sys/systm.h>
32 #include <sys/linker.h>
55 hdr = (uint32_t *)curp;
56 if (hdr[0] == 0 && hdr[1] == 0)
60 if ((hdr[0] == MODINFO_NAME) &&
61 !strcmp(name, curp +
sizeof(uint32_t) * 2))
65 next =
sizeof(uint32_t) * 2 + hdr[1];
66 next = roundup(next,
sizeof(u_long));
88 hdr = (uint32_t *)curp;
89 if (hdr[0] == 0 && hdr[1] == 0)
93 if (hdr[0] == MODINFO_NAME)
97 if ((hdr[0] == MODINFO_TYPE) &&
98 !strcmp(type, curp +
sizeof(uint32_t) * 2))
102 next =
sizeof(uint32_t) * 2 + hdr[1];
103 next = roundup(next,
sizeof(u_long));
126 hdr = (uint32_t *)curp;
127 next =
sizeof(uint32_t) * 2 + hdr[1];
128 next = roundup(next,
sizeof(u_long));
134 hdr = (uint32_t *)curp;
135 if (hdr[0] == 0 && hdr[1] == 0)
139 if (hdr[0] == MODINFO_NAME)
143 next =
sizeof(uint32_t) * 2 + hdr[1];
144 next = roundup(next,
sizeof(u_long));
165 hdr = (uint32_t *)curp;
167 if (hdr[0] == 0 && hdr[1] == 0)
186 return(curp + (
sizeof(uint32_t) * 2));
189 next =
sizeof(uint32_t) * 2 + hdr[1];
190 next = roundup(next,
sizeof(u_long));
212 hdr = (uint32_t *)curp;
213 if (hdr[0] == 0 && hdr[1] == 0)
217 if (hdr[0] == MODINFO_NAME) {
218 if (!strcmp(name, curp +
sizeof(uint32_t) * 2))
224 hdr[0] = MODINFO_EMPTY;
227 next =
sizeof(uint32_t) * 2 + hdr[1];
228 next = roundup(next,
sizeof(u_long));
269 hdr = (uint32_t *)curp;
270 if (hdr[0] == 0 && hdr[1] == 0)
276 case MODINFO_METADATA|MODINFOMD_SSYM:
277 case MODINFO_METADATA|MODINFOMD_ESYM:
278 ptr = (vm_offset_t *)(curp + (
sizeof(uint32_t) * 2));
285 next =
sizeof(uint32_t) * 2 + hdr[1];
286 next = roundup(next,
sizeof(u_long));
void preload_bootstrap_relocate(vm_offset_t offset)
void preload_delete_name(const char *name)
caddr_t preload_search_by_type(const char *type)
size_t preload_fetch_size(caddr_t mod)
caddr_t preload_search_next_name(caddr_t base)
caddr_t preload_search_by_name(const char *name)
void * preload_fetch_addr(caddr_t mod)
caddr_t preload_search_info(caddr_t mod, int inf)
vm_offset_t preload_addr_relocate