| 1710 | } |
| 1711 | |
| 1712 | static int |
| 1713 | link_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 | |
| 1738 | const Elf_Sym * |
| 1739 | elf_get_sym(linker_file_t lf, Elf_Size symidx) |
nothing calls this directly
no test coverage detected