Lines Matching refs:sym
396 GElf_Sym sym;
509 if (gelf_getsym(id, i, &sym) != &sym)
512 if ((name = elf_strptr(ecp->ein, symndx, sym.st_name)) == NULL)
517 if (is_remove_symbol(ecp, sc, i, &sym, name) != 0)
521 if (is_global_symbol(sym.st_info) ||
522 is_weak_symbol(sym.st_info)) {
529 sym.st_info = GELF_ST_INFO(STB_WEAK,
530 GELF_ST_TYPE(sym.st_info));
532 if (sym.st_shndx != SHN_UNDEF &&
535 sym.st_info = GELF_ST_INFO(STB_LOCAL,
536 GELF_ST_TYPE(sym.st_info));
538 sym.st_shndx != SHN_UNDEF &&
540 sym.st_info = GELF_ST_INFO(STB_LOCAL,
541 GELF_ST_TYPE(sym.st_info));
543 sym.st_shndx != SHN_UNDEF &&
544 is_hidden_symbol(sym.st_other))
545 sym.st_info = GELF_ST_INFO(STB_LOCAL,
546 GELF_ST_TYPE(sym.st_info));
551 sym.st_info = GELF_ST_INFO(STB_GLOBAL,
552 GELF_ST_TYPE(sym.st_info));
572 if (is_global_symbol(sym.st_info) ||
573 is_weak_symbol(sym.st_info)) {
578 add_to_symtab(ecp, name, sym.st_value, sym.st_size,
579 sym.st_shndx, sym.st_info, sym.st_other, 0);
588 if (GELF_ST_TYPE(sym.st_info) == STT_SECTION &&
589 sym.st_shndx < SHN_LORESERVE) {
590 assert(ecp->secndx[sym.st_shndx] < (uint64_t)ecp->nos);
591 BIT_SET(ecp->v_secsym, ecp->secndx[sym.st_shndx]);
624 sym.st_name = 0;
625 sym.st_value = s->vma;
626 sym.st_size = 0;
627 sym.st_info = GELF_ST_INFO(STB_LOCAL, STT_SECTION);
628 sym.st_other = STV_DEFAULT;
630 * Don't let add_to_symtab() touch sym.st_shndx.
633 add_to_symtab(ecp, NULL, sym.st_value, sym.st_size,
634 ndx, sym.st_info, sym.st_other, 1);