Lines Matching refs:lf

82 	struct linker_file lf;		/* Common fields */
194 typedef int (*elf_reloc_fn)(linker_file_t lf, Elf_Addr relocbase,
365 link_elf_link_common_finish(linker_file_t lf)
368 elf_file_t ef = (elf_file_t)lf;
374 error = elf_cpu_load_file(lf);
380 ef->gdb.l_addr = lf->address;
381 newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, M_WAITOK);
382 strcpy(newfilename, lf->filename);
390 link_elf_invoke_ctors(lf->ctors_addr, lf->ctors_size);
628 error = link_elf_lookup_set(&ef->lf, "pcpu", (void ***)&ef->pcpu_start,
646 __func__, size, ef->lf.pathname);
665 error = link_elf_lookup_set(&ef->lf, "vnet", (void ***)&ef->vnet_start,
683 __func__, size, ef->lf.pathname);
702 link_elf_locate_exidx(linker_file_t lf, Elf_Shdr *shdr, int nhdr)
708 lf->exidx_addr = shdr[i].sh_addr + lf->address;
709 lf->exidx_size = shdr[i].sh_size;
722 link_elf_locate_exidx_preload(struct linker_file *lf, caddr_t modptr)
733 link_elf_locate_exidx(lf, shdr, nhdr);
748 linker_file_t lf;
769 lf = linker_make_file(filename, &link_elf_class);
770 if (lf == NULL)
773 ef = (elf_file_t) lf;
782 lf->address = ef->address;
783 lf->size = *(size_t *)sizeptr;
790 lf->ctors_addr = ef->address + *ctors_addrp;
791 lf->ctors_size = *ctors_sizep;
795 link_elf_locate_exidx_preload(lf, modptr);
806 linker_file_unload(lf, LINKER_UNLOAD_FORCE);
809 link_elf_reloc_local(lf);
810 *result = lf;
815 link_elf_link_preload_finish(linker_file_t lf)
820 ef = (elf_file_t) lf;
826 return (link_elf_link_common_finish(lf));
851 linker_file_t lf;
861 lf = NULL;
990 lf = linker_make_file(filename, &link_elf_class);
991 if (lf == NULL) {
996 ef = (elf_file_t) lf;
1071 lf->address = ef->address;
1072 lf->size = mapsize;
1085 link_elf_reloc_local(lf);
1088 error = linker_load_dependencies(lf);
1161 lf->ctors_addr = mapbase + shdr[i].sh_addr - base_vaddr;
1162 lf->ctors_size = shdr[i].sh_size;
1194 link_elf_locate_exidx(lf, shdr, hdr->e_shnum);
1197 error = link_elf_link_common_finish(lf);
1201 *result = lf;
1206 if (error != 0 && lf != NULL)
1207 linker_file_unload(lf, LINKER_UNLOAD_FORCE);
1216 elf_relocaddr(linker_file_t lf, Elf_Addr x)
1220 KASSERT(lf->ops->cls == (kobj_class_t)&link_elf_class,
1221 ("elf_relocaddr: unexpected linker file %p", lf));
1223 ef = (elf_file_t)lf;
1330 if (reloc(&ef->lf, (Elf_Addr)ef->address, \
1382 link_elf_lookup_symbol(linker_file_t lf, const char *name, c_linker_sym_t *sym)
1384 elf_file_t ef = (elf_file_t) lf;
1452 link_elf_symbol_values(linker_file_t lf, c_linker_sym_t sym,
1459 ef = (elf_file_t)lf;
1485 link_elf_search_symbol(linker_file_t lf, caddr_t value,
1488 elf_file_t ef = (elf_file_t) lf;
1524 link_elf_lookup_set(linker_file_t lf, const char *name,
1538 error = link_elf_lookup_symbol(lf, setsym, &sym);
1541 link_elf_symbol_values(lf, sym, &symval);
1550 error = link_elf_lookup_symbol(lf, setsym, &sym);
1553 link_elf_symbol_values(lf, sym, &symval);
1624 elf_get_sym(linker_file_t lf, Elf_Size symidx)
1626 elf_file_t ef = (elf_file_t)lf;
1634 elf_get_symname(linker_file_t lf, Elf_Size symidx)
1636 elf_file_t ef = (elf_file_t)lf;
1653 elf_lookup(linker_file_t lf, Elf_Size symidx, int deps, Elf_Addr *res)
1655 elf_file_t ef = (elf_file_t)lf;
1697 addr = ((Elf_Addr)linker_file_lookup_symbol(lf, symbol, deps));
1714 link_elf_reloc_local(linker_file_t lf)
1720 elf_file_t ef = (elf_file_t)lf;
1726 elf_reloc_local(lf, (Elf_Addr)ef->address, rel,
1737 elf_reloc_local(lf, (Elf_Addr)ef->address, rela,
1745 link_elf_symtab_get(linker_file_t lf, const Elf_Sym **symtab)
1747 elf_file_t ef = (elf_file_t)lf;
1758 link_elf_strtab_get(linker_file_t lf, caddr_t *strtab)
1760 elf_file_t ef = (elf_file_t)lf;
1777 elf_lookup_ifunc(linker_file_t lf, Elf_Size symidx, int deps __unused,
1784 ef = (elf_file_t)lf;