Deleted Added
full compact
26c26
< * $FreeBSD: head/sys/kern/link_elf_obj.c 85735 2001-10-30 15:10:16Z green $
---
> * $FreeBSD: head/sys/kern/link_elf_obj.c 85736 2001-10-30 15:21:45Z green $
115a116,118
> static int link_elf_each_function_name(linker_file_t,
> int (*)(const char *, void *),
> void *);
125a129
> KOBJMETHOD(linker_each_function_name, link_elf_each_function_name),
1151a1156,1174
>
> static int
> link_elf_each_function_name(linker_file_t file,
> int (*callback)(const char *, void *), void *opaque) {
> elf_file_t ef = (elf_file_t)file;
> const Elf_Sym* symp;
> int i, error;
>
> /* Exhaustive search */
> for (i = 0, symp = ef->ddbsymtab; i < ef->ddbsymcnt; i++, symp++) {
> if (symp->st_value != 0 &&
> ELF_ST_TYPE(symp->st_info) == STT_FUNC) {
> error = callback(ef->ddbstrtab + symp->st_name, opaque);
> if (error)
> return (error);
> }
> }
> return (0);
> }