| 1453 | } |
| 1454 | |
| 1455 | static modlist_t |
| 1456 | modlist_newmodule(const char *modname, int version, linker_file_t container) |
| 1457 | { |
| 1458 | modlist_t mod; |
| 1459 | |
| 1460 | mod = malloc(sizeof(struct modlist), M_LINKER, M_NOWAIT | M_ZERO); |
| 1461 | if (mod == NULL) |
| 1462 | panic("no memory for module list"); |
| 1463 | mod->container = container; |
| 1464 | mod->name = modname; |
| 1465 | mod->version = version; |
| 1466 | TAILQ_INSERT_TAIL(&found_modules, mod, link); |
| 1467 | return (mod); |
| 1468 | } |
| 1469 | |
| 1470 | static void |
| 1471 | linker_addmodules(linker_file_t lf, struct mod_metadata **start, |
no test coverage detected