[BACK]Return to elf.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / nm

Diff for /src/usr.bin/nm/elf.c between version 1.7 and 1.8

version 1.7, 2004/08/19 19:23:08 version 1.8, 2004/08/20 04:42:51
Line 199 
Line 199 
                 }                  }
                 break;                  break;
   
           case STT_OBJECT:
                   np->n_type = N_DATA;
                   switch (sym->st_shndx) {
                   case SHN_ABS:
                           np->n_type = N_ABS;
                           break;
                   case SHN_COMMON:
                           np->n_type = N_COMM;
                           break;
                   default:
                           if (sym->st_shndx >= eh->e_shnum)
                                   break;
                           else if (!strcmp(sn, ELF_SBSS))
                                   np->n_type = N_BSS;
                           else if (!strcmp(sn, ELF_BSS))
                                   np->n_type = N_BSS;
                           else if (!strcmp(sn, ELF_RODATA))
                                   np->n_other = 'r';
                   }
                   break;
   
         case STT_FUNC:          case STT_FUNC:
                 np->n_type = N_TEXT;                  np->n_type = N_TEXT;
                 if (ELF_ST_BIND(sym->st_info) == STB_WEAK) {                  if (ELF_ST_BIND(sym->st_info) == STB_WEAK) {
Line 214 
Line 235 
                         np->n_other = '?';                          np->n_other = '?';
                 break;                  break;
   
         case STT_OBJECT:          case STT_SECTION:
                 np->n_type = N_DATA;                  switch (sym->st_shndx) {
                 if (sym->st_shndx == SHN_ABS)                  case SHN_ABS:
                         np->n_type = N_ABS;                          np->n_type = N_ABS;
                 if (sym->st_shndx == SHN_COMMON)                          break;
                   case SHN_COMMON:
                         np->n_type = N_COMM;                          np->n_type = N_COMM;
                 else if (sym->st_shndx >= eh->e_shnum)  
                         break;                          break;
                 else if (!strcmp(sn, ELF_SBSS))                  default:
                         np->n_type = N_BSS;                          np->n_other = '?';
                 else if (!strcmp(sn, ELF_BSS))                  }
                         np->n_type = N_BSS;  
                 else if (!strcmp(sn, ELF_RODATA))  
                         np->n_other = 'r';  
                 break;                  break;
   
         case STT_FILE:          case STT_FILE:

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8