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

Diff for /src/usr.bin/pmdb/Attic/elf_syms.c between version 1.7 and 1.8

version 1.7, 2002/07/31 04:42:01 version 1.8, 2003/03/28 23:33:27
Line 165 
Line 165 
                 goto fail;                  goto fail;
         }          }
   
         if ((esh->esh_strtab = mmap(NULL, esh->esh_strsize, PROT_READ,          if (esh->esh_symsize) {
             MAP_SHARED, fd, stroff)) == MAP_FAILED) {  
                 goto fail;  
         }  
   
         if ((esh->esh_symtab = mmap(NULL, esh->esh_symsize, PROT_READ,                  if ((esh->esh_strtab = mmap(NULL, esh->esh_strsize, PROT_READ,
             MAP_SHARED, fd, symoff)) == MAP_FAILED) {                      MAP_SHARED, fd, stroff)) == MAP_FAILED) {
                 goto fail;                          goto fail;
                   }
   
                   if ((esh->esh_symtab = mmap(NULL, esh->esh_symsize, PROT_READ,
                       MAP_SHARED, fd, symoff)) == MAP_FAILED) {
                           goto fail;
                   }
         }          }
   
         return (ESH_TO_ST(esh));          return (ESH_TO_ST(esh));
Line 204 
Line 207 
         int nsyms, i;          int nsyms, i;
         char *symn;          char *symn;
   
           if (esh == NULL)
                   return (NULL);
   
 #define SYMVAL(S) (unsigned long)((S)->st_value + st->st_offs)  #define SYMVAL(S) (unsigned long)((S)->st_value + st->st_offs)
   
         nsyms = esh->esh_symsize / sizeof(Elf_Sym);          nsyms = esh->esh_symsize / sizeof(Elf_Sym);
Line 240 
Line 246 
         int nsyms, i;          int nsyms, i;
         char *symn;          char *symn;
         Elf_Sym *s = NULL;          Elf_Sym *s = NULL;
   
           if (esh == NULL)
                   return (NULL);
   
         /* XXX - dumb, doesn't follow the rules (weak, hash, etc.). */          /* XXX - dumb, doesn't follow the rules (weak, hash, etc.). */
         nsyms = esh->esh_symsize / sizeof(Elf_Sym);          nsyms = esh->esh_symsize / sizeof(Elf_Sym);

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