Print this page
ld should reject kernel modules as input

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/libconv/common/elf.c
          +++ new/usr/src/cmd/sgs/libconv/common/elf.c
↓ open down ↓ 1203 lines elided ↑ open up ↑
1204 1204                  return (conv_ehdr_type(ELFOSABI_SOLARIS, (Half)info, 0,
1205 1205                      &reject_desc_buf->inv_buf));
1206 1206          case SGS_REJ_BADFLAG:
1207 1207          case SGS_REJ_MISFLAG:
1208 1208          case SGS_REJ_HAL:
1209 1209          case SGS_REJ_US3:
1210 1210                  return (conv_ehdr_flags(mach, (Word)info, 0,
1211 1211                      &reject_desc_buf->flags_buf));
1212 1212          case SGS_REJ_UNKFILE:
1213 1213          case SGS_REJ_ARCHIVE:
     1214 +        case SGS_REJ_KMOD:
1214 1215                  return (NULL);
1215 1216          case SGS_REJ_STR:
1216 1217          case SGS_REJ_HWCAP_1:
1217 1218          case SGS_REJ_SFCAP_1:
1218 1219          case SGS_REJ_HWCAP_2:
1219 1220          case SGS_REJ_MACHCAP:
1220 1221          case SGS_REJ_PLATCAP:
1221 1222                  if (rej->rej_str)
1222 1223                          return ((const char *)rej->rej_str);
1223 1224                  else
1224 1225                          return (MSG_ORIG(MSG_STR_EMPTY));
1225 1226          default:
1226 1227                  return (conv_invalid_val(&reject_desc_buf->inv_buf, info,
1227 1228                      CONV_FMT_DECIMAL));
1228 1229          }
1229 1230  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX