Lines Matching refs:lc
364 fbt_ctfoff_init(modctl_t *lf, linker_ctf_t *lc) in fbt_ctfoff_init() argument
366 const Elf_Sym *symp = lc->symtab; in fbt_ctfoff_init()
367 const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; in fbt_ctfoff_init()
368 const uint8_t *ctfdata = lc->ctftab + sizeof(ctf_header_t); in fbt_ctfoff_init()
382 if (lc->symtab == NULL) { in fbt_ctfoff_init()
387 ctfoff = malloc(sizeof(uint32_t) * lc->nsym, M_LINKER, M_WAITOK); in fbt_ctfoff_init()
388 *lc->ctfoffp = ctfoff; in fbt_ctfoff_init()
392 for (i = 0; i < lc->nsym; i++, ctfoff++, symp++) { in fbt_ctfoff_init()
543 fbt_typoff_init(linker_ctf_t *lc) in fbt_typoff_init() argument
545 const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; in fbt_typoff_init()
547 const uint8_t *ctfdata = lc->ctftab + sizeof(ctf_header_t); in fbt_typoff_init()
643 *lc->typlenp = ctf_typemax; in fbt_typoff_init()
648 *lc->typoffp = xp; in fbt_typoff_init()
855 ctf_lookup_by_id(linker_ctf_t *lc, ctf_id_t type) in ctf_lookup_by_id() argument
859 uint32_t *typoff = *lc->typoffp; in ctf_lookup_by_id()
861 if (type >= *lc->typlenp) { in ctf_lookup_by_id()
862 printf("%s(%d): type %d exceeds max %ld\n",__func__,__LINE__,(int) type,*lc->typlenp); in ctf_lookup_by_id()
872 tp = (const void *) (lc->ctftab + offset + sizeof(ctf_header_t)); in ctf_lookup_by_id()
878 fbt_array_info(linker_ctf_t *lc, ctf_id_t type, ctf_arinfo_t *arp) in fbt_array_info() argument
880 const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; in fbt_array_info()
887 if ((tp = ctf_lookup_by_id(lc, type)) == NULL) in fbt_array_info()
914 ctf_strptr(linker_ctf_t *lc, int name) in ctf_strptr() argument
916 const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; in ctf_strptr()
922 strp = (const char *)(lc->ctftab + hp->cth_stroff + name + sizeof(ctf_header_t)); in ctf_strptr()
928 ctf_type_rname(linker_ctf_t *lc, const void *v) in ctf_type_rname() argument
930 const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; in ctf_type_rname()
943 return (ctf_strptr(lc, name)); in ctf_type_rname()
947 ctf_decl_push(ctf_decl_t *cd, linker_ctf_t *lc, ctf_id_t type) in ctf_decl_push() argument
949 const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; in ctf_decl_push()
958 if ((tp = ctf_lookup_by_id(lc, type)) == NULL) { in ctf_decl_push()
968 fbt_array_info(lc, type, &ar); in ctf_decl_push()
969 ctf_decl_push(cd, lc, ar.ctr_contents); in ctf_decl_push()
975 if (ctf_type_rname(lc, tp)[0] == '\0') { in ctf_decl_push() local
976 ctf_decl_push(cd, lc, t); in ctf_decl_push()
983 ctf_decl_push(cd, lc, t); in ctf_decl_push()
988 ctf_decl_push(cd, lc, t); in ctf_decl_push()
995 ctf_decl_push(cd, lc, t); in ctf_decl_push()
1046 fbt_type_name(linker_ctf_t *lc, ctf_id_t type, char *buf, size_t len) in fbt_type_name() argument
1054 if (lc == NULL && type == CTF_ERR) in fbt_type_name()
1058 ctf_decl_push(&cd, lc, type); in fbt_type_name()
1084 const void *tp = ctf_lookup_by_id(lc, cdp->cd_type); in fbt_type_name()
1085 const char *name = ctf_type_rname(lc, tp); in fbt_type_name()
1148 linker_ctf_t lc; in fbt_getargdesc() local
1166 if (linker_ctf_get(ctl, &lc) != 0) in fbt_getargdesc()
1171 if (*lc.ctfoffp == NULL) { in fbt_getargdesc()
1176 if (fbt_ctfoff_init(ctl, &lc) != 0) in fbt_getargdesc()
1180 if (fbt_typoff_init(&lc) != 0) in fbt_getargdesc()
1184 ctfoff = *lc.ctfoffp; in fbt_getargdesc()
1186 if (ctfoff == NULL || *lc.typoffp == NULL) in fbt_getargdesc()
1190 if (symindx >= lc.nsym) in fbt_getargdesc()
1197 hp = (const ctf_header_t *) lc.ctftab; in fbt_getargdesc()
1199 dp = (const char *)(lc.ctftab + offset + sizeof(ctf_header_t)); in fbt_getargdesc()
1238 if (fbt_type_name(&lc, type, desc->dtargd_native, sizeof(desc->dtargd_native)) > 0) in fbt_getargdesc()