Print this page
smatch clean rtld

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/rtld/i386/i386_elf.c
          +++ new/usr/src/cmd/sgs/rtld/i386/i386_elf.c
↓ open down ↓ 214 lines elided ↑ open up ↑
 215  215          if ((lmflags = lml->lm_flags) & LML_FLG_RTLDLM) {
 216  216                  dbg_class = dbg_desc->d_class;
 217  217                  dbg_desc->d_class = 0;
 218  218          }
 219  219  
 220  220          /*
 221  221           * Perform some basic sanity checks.  If we didn't get a load map or
 222  222           * the relocation offset is invalid then its possible someone has walked
 223  223           * over the .got entries or jumped to plt0 out of the blue.
 224  224           */
 225      -        if (!lmp || ((reloff % sizeof (Rel)) != 0)) {
      225 +        if ((reloff % sizeof (Rel)) != 0) {
 226  226                  Conv_inv_buf_t inv_buf;
 227  227  
 228  228                  eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_PLTREF),
 229  229                      conv_reloc_386_type(R_386_JMP_SLOT, 0, &inv_buf),
 230  230                      EC_NATPTR(lmp), EC_XWORD(reloff), EC_NATPTR(from));
 231  231                  rtldexit(lml, 1);
 232  232          }
 233  233  
 234  234          /*
 235  235           * Use relocation entry to get symbol table entry and symbol name.
↓ open down ↓ 793 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX