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

Function unwind_module_loaded

freebsd/arm/arm/unwind.c:223–248  ·  view source on GitHub ↗

* Handle the loading of a new module by populating a module_info for it. This * is called for both preloaded and dynamically loaded modules. */

Source from the content-addressed store, hash-verified

221 * is called for both preloaded and dynamically loaded modules.
222 */
223void
224unwind_module_loaded(struct linker_file *lf)
225{
226 struct module_info *info;
227
228 /*
229 * A module that contains only data may have no unwind info; don't
230 * create any module info for it.
231 */
232 if (lf->exidx_size == 0)
233 return;
234
235 /*
236 * Find an unused entry in the existing list to reuse. If we don't find
237 * one, create a new one and link it into the list. This is the only
238 * place the module_list is modified. Adding a new entry to the list
239 * will not perturb any other threads currently walking the list. This
240 * function is invoked while kern_linker is still holding its lock
241 * to prevent its module list from being modified, so we don't have to
242 * worry about racing other threads doing an insert concurrently.
243 */
244 if ((info = find_module_info(0)) == NULL) {
245 info = create_module_info();
246 }
247 populate_module_info(info, lf);
248}
249
250/* Handle the unloading of a module. */
251void

Callers 1

elf_cpu_load_fileFunction · 0.85

Calls 3

find_module_infoFunction · 0.85
create_module_infoFunction · 0.85
populate_module_infoFunction · 0.85

Tested by

no test coverage detected