MCPcopy Create free account
hub / github.com/F-Stack/f-stack / module_info_init

Function module_info_init

freebsd/arm/arm/unwind.c:283–298  ·  view source on GitHub ↗

* Initialization must run fairly early, as soon as malloc(9) is available, and * definitely before witness, which uses stack(9). We synthesize a module_info * entry for the kernel, because unwind_module_loaded() doesn't get called for * it. Also, it is unlike other modules in that the elf metadata for locating * the unwind tables might be stripped, so instead we have to use the * _exidx_sta

Source from the content-addressed store, hash-verified

281 * _exidx_start/end symbols created by ldscript.arm.
282 */
283static int
284module_info_init(void *arg __unused)
285{
286 struct linker_file thekernel;
287
288 STAILQ_INIT(&module_list);
289
290 thekernel.filename = "kernel";
291 thekernel.address = CADDR(&_start);
292 thekernel.size = UADDR(&_end) - UADDR(&_start);
293 thekernel.exidx_addr = CADDR(&_exidx_start);
294 thekernel.exidx_size = UADDR(&_exidx_end) - UADDR(&_exidx_start);
295 populate_module_info(create_module_info(), &thekernel);
296
297 return (0);
298}
299SYSINIT(unwind_init, SI_SUB_KMEM, SI_ORDER_ANY, module_info_init, NULL);
300
301/* Expand a 31-bit signed value to a 32-bit signed value */

Callers

nothing calls this directly

Calls 2

populate_module_infoFunction · 0.85
create_module_infoFunction · 0.85

Tested by

no test coverage detected