Lines Matching defs:sym
390 symbolname(const struct fileRecord *file, const struct nlist *sym)
394 index = sym - file->fSymbolBase;
396 if (index && !sym->n_un.n_strx)
397 return file->fStringBase + sym->n_value;
402 if (-1 == sym->n_un.n_strx)
403 return (char *) sym->n_value;
410 return file->fStringBase + sym->n_un.n_strx;
906 const struct nlist *sym;
917 for (i = 0, sym = file->fSymbolBase; i < nsyms; i++, sym++) {
921 unsigned char n_type = sym->n_type;
979 struct nlist *sym;
1027 for (i = 0, sym = file->fSymbolBase; i < nsyms; i++, sym++) {
1028 long strx = sym->n_un.n_strx;
1037 if ( (sym->n_type & N_TYPE) == N_SECT) {
1038 sym->n_sect = NO_SECT;
1039 sym->n_type = (sym->n_type & ~N_TYPE) | N_ABS;
1047 struct nlist *patchsym = sym;
1083 // Load up lookup symbol look table with sym names
1086 n_type = sym->n_type & (N_TYPE | N_EXT);
1092 file->fLocalSyms = sym;
1139 else if (sym->n_type == (N_EXT | N_UNDF)) {
1179 struct nlist *sym;
1184 sym = file->fLocalSyms;
1185 for (i = 0, nsyms = file->fNLocal; i < nsyms; i++, sym++) {
1186 if (sym->n_value == (unsigned long) entry && !(sym->n_type & N_STAB) )
1187 return sym;
1192 sym = file->fSymbolBase;
1193 for (i = 0, nsyms = file->fSymtab->nsyms; i < nsyms; i++, sym++) {
1194 if ( (sym->n_type & N_EXT) )
1196 if ( sym->n_value == (unsigned long) entry && !(sym->n_type & N_STAB) )
1197 return sym;
1239 const struct nlist *sym = (const struct nlist *) vSym;
1241 return strcmp(key->fSymname, symbolname(key->fFile, sym));
1250 const struct nlist *sym;
1254 for (sym = file->fLocalSyms; i < nLocal; i++, sym++)
1256 return sym;
1480 // Note 'sym' is the <cname>10superClassE symbol.
1482 recordClass(struct fileRecord *file, const char *cname, const struct nlist *sym)
1500 unsigned char sectind = sym->n_sect;
1516 + sym->n_value - section->addr );
1574 const struct nlist *sym;
1590 sym = file->fLocalSyms;
1591 for (i = 0, nsyms = file->fNLocal; i < nsyms; i++, sym++) {
1595 unsigned char n_type = sym->n_type & (N_TYPE | N_EXT);
1600 || !sym->n_un.n_strx)
1605 symname = symbolname(file, sym) + 1;
1621 if (!recordClass(file, classname, sym))
1873 struct nlist **sym;
1886 sym = (struct nlist **) DataGetPtr(file->fNewSymbols);
1887 for (i = 0; i < size; i++, sym++) {
1893 return *sym;
1954 struct nlist *sym = (struct nlist *) reloc->fSymbol;
1955 char *oldname = symbolname(file, sym);
1957 // assert(sym->n_un.n_strx >= 0);
1961 sym->n_un.n_strx = -sym->n_un.n_strx;
1967 return sym;
1974 file->fSymbToStringTable[sym - file->fSymbolBase] = oldname;
1976 return sym;
2303 struct nlist **symp, *sym;
2400 sym = file->fSymbolBase;
2405 for (i = 0; i < file->fSymtab->nsyms; i++, sym++) {
2410 // Rebase sym in the new symbol region
2412 sym = symp[i];
2414 if (sym->n_un.n_strx < 0 && sym->n_type == (N_EXT | N_UNDF)
2415 && (unsigned char) -1 == sym->n_sect) {
2419 bzero(sym, sizeof(*sym));
2420 sym->n_type = N_ABS;
2424 if (-1 == sym->n_un.n_strx)
2425 sym->n_value = 0;
2432 sym->n_un.n_strx = strx;
2674 const struct nlist *sym;
2682 sym = findSymbolByName(file, symname);
2685 if (!sym) {
2688 sym = file->fSymbolBase;
2689 for (i = 0, nsyms = file->fSymtab->nsyms; i < nsyms; i++, sym++) {
2690 if ( (sym->n_type & N_EXT) ) {
2691 sym = 0;
2694 if ( (sym->n_type & N_STAB) )
2701 return_if(!sym,
2705 sectind = sym->n_sect;
2713 return (void *) (sectionBase + sym->n_value);