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

Function linker_addmodules

freebsd/kern/kern_linker.c:1470–1491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1468}
1469
1470static void
1471linker_addmodules(linker_file_t lf, struct mod_metadata **start,
1472 struct mod_metadata **stop, int preload)
1473{
1474 struct mod_metadata *mp, **mdp;
1475 const char *modname;
1476 int ver;
1477
1478 for (mdp = start; mdp < stop; mdp++) {
1479 mp = *mdp;
1480 if (mp->md_type != MDT_VERSION)
1481 continue;
1482 modname = mp->md_cval;
1483 ver = ((const struct mod_version *)mp->md_data)->mv_version;
1484 if (modlist_lookup(modname, ver) != NULL) {
1485 printf("module %s already present!\n", modname);
1486 /* XXX what can we do? this is a build error. :-( */
1487 continue;
1488 }
1489 modlist_newmodule(modname, ver, lf);
1490 }
1491}
1492
1493static void
1494linker_preload(void *arg)

Callers 2

linker_preloadFunction · 0.85
linker_load_dependenciesFunction · 0.85

Calls 3

modlist_lookupFunction · 0.85
modlist_newmoduleFunction · 0.85
printfFunction · 0.70

Tested by

no test coverage detected