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

Function link_elf_each_function_nameval

freebsd/kern/link_elf.c:1712–1736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1710}
1711
1712static int
1713link_elf_each_function_nameval(linker_file_t file,
1714 linker_function_nameval_callback_t callback, void *opaque)
1715{
1716 linker_symval_t symval;
1717 elf_file_t ef = (elf_file_t)file;
1718 const Elf_Sym* symp;
1719 int i, error;
1720
1721 /* Exhaustive search */
1722 for (i = 0, symp = ef->ddbsymtab; i < ef->ddbsymcnt; i++, symp++) {
1723 if (symp->st_value != 0 &&
1724 (ELF_ST_TYPE(symp->st_info) == STT_FUNC ||
1725 ELF_ST_TYPE(symp->st_info) == STT_GNU_IFUNC)) {
1726 error = link_elf_symbol_values(file,
1727 (c_linker_sym_t) symp, &symval);
1728 if (error != 0)
1729 return (error);
1730 error = callback(file, i, &symval, opaque);
1731 if (error != 0)
1732 return (error);
1733 }
1734 }
1735 return (0);
1736}
1737
1738const Elf_Sym *
1739elf_get_sym(linker_file_t lf, Elf_Size symidx)

Callers

nothing calls this directly

Calls 2

link_elf_symbol_valuesFunction · 0.70
callbackClass · 0.50

Tested by

no test coverage detected