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

Function linker_add_class

freebsd/kern/kern_linker.c:176–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174SYSINIT(linker_class, SI_SUB_KLD, SI_ORDER_ANY, linker_stop_class_add, NULL);
175
176int
177linker_add_class(linker_class_t lc)
178{
179
180 /*
181 * We disallow any class registration past SI_ORDER_ANY
182 * of SI_SUB_KLD. We bump the reference count to keep the
183 * ops from being freed.
184 */
185 if (linker_no_more_classes == 1)
186 return (EPERM);
187 kobj_class_compile((kobj_class_t) lc);
188 ((kobj_class_t)lc)->refs++; /* XXX: kobj_mtx */
189 TAILQ_INSERT_TAIL(&classes, lc, link);
190 return (0);
191}
192
193static void
194linker_file_sysinit(linker_file_t lf)

Callers 2

link_elf_initFunction · 0.85
link_elf_initFunction · 0.85

Calls 1

kobj_class_compileFunction · 0.85

Tested by

no test coverage detected