Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/dev/fbt/fbt.c
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | fbt_ctfoff_init(modctl_t *lf, linker_ctf_t *lc) | ||||
} | } | ||||
if ((ctfoff = malloc(sizeof(uint32_t) * lc->nsym, M_LINKER, M_WAITOK)) == NULL) | if ((ctfoff = malloc(sizeof(uint32_t) * lc->nsym, M_LINKER, M_WAITOK)) == NULL) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
*lc->ctfoffp = ctfoff; | *lc->ctfoffp = ctfoff; | ||||
for (i = 0; i < lc->nsym; i++, ctfoff++, symp++) { | for (i = 0; i < lc->nsym; i++, ctfoff++, symp++) { | ||||
if (symp->st_name == 0 || symp->st_shndx == SHN_UNDEF) { | if (symp->st_name == 0 || symp->st_shndx == SHN_UNDEF || | ||||
symp->st_shndx == SHN_FBSD_CACHED) { | |||||
*ctfoff = 0xffffffff; | *ctfoff = 0xffffffff; | ||||
continue; | continue; | ||||
} | } | ||||
switch (ELF_ST_TYPE(symp->st_info)) { | switch (ELF_ST_TYPE(symp->st_info)) { | ||||
case STT_OBJECT: | case STT_OBJECT: | ||||
if (objtoff >= hp->cth_funcoff || | if (objtoff >= hp->cth_funcoff || | ||||
(symp->st_shndx == SHN_ABS && symp->st_value == 0)) { | (symp->st_shndx == SHN_ABS && symp->st_value == 0)) { | ||||
▲ Show 20 Lines • Show All 819 Lines • Show Last 20 Lines |