Print this page
ld should reject kernel modules as input


1194         case SGS_REJ_MACH:
1195                 return (conv_ehdr_mach((Half)info, 0,
1196                     &reject_desc_buf->inv_buf));
1197         case SGS_REJ_CLASS:
1198                 return (conv_ehdr_class((uchar_t)info, 0,
1199                     &reject_desc_buf->inv_buf));
1200         case SGS_REJ_DATA:
1201                 return (conv_ehdr_data((uchar_t)info, 0,
1202                     &reject_desc_buf->inv_buf));
1203         case SGS_REJ_TYPE:
1204                 return (conv_ehdr_type(ELFOSABI_SOLARIS, (Half)info, 0,
1205                     &reject_desc_buf->inv_buf));
1206         case SGS_REJ_BADFLAG:
1207         case SGS_REJ_MISFLAG:
1208         case SGS_REJ_HAL:
1209         case SGS_REJ_US3:
1210                 return (conv_ehdr_flags(mach, (Word)info, 0,
1211                     &reject_desc_buf->flags_buf));
1212         case SGS_REJ_UNKFILE:
1213         case SGS_REJ_ARCHIVE:

1214                 return (NULL);
1215         case SGS_REJ_STR:
1216         case SGS_REJ_HWCAP_1:
1217         case SGS_REJ_SFCAP_1:
1218         case SGS_REJ_HWCAP_2:
1219         case SGS_REJ_MACHCAP:
1220         case SGS_REJ_PLATCAP:
1221                 if (rej->rej_str)
1222                         return ((const char *)rej->rej_str);
1223                 else
1224                         return (MSG_ORIG(MSG_STR_EMPTY));
1225         default:
1226                 return (conv_invalid_val(&reject_desc_buf->inv_buf, info,
1227                     CONV_FMT_DECIMAL));
1228         }
1229 }


1194         case SGS_REJ_MACH:
1195                 return (conv_ehdr_mach((Half)info, 0,
1196                     &reject_desc_buf->inv_buf));
1197         case SGS_REJ_CLASS:
1198                 return (conv_ehdr_class((uchar_t)info, 0,
1199                     &reject_desc_buf->inv_buf));
1200         case SGS_REJ_DATA:
1201                 return (conv_ehdr_data((uchar_t)info, 0,
1202                     &reject_desc_buf->inv_buf));
1203         case SGS_REJ_TYPE:
1204                 return (conv_ehdr_type(ELFOSABI_SOLARIS, (Half)info, 0,
1205                     &reject_desc_buf->inv_buf));
1206         case SGS_REJ_BADFLAG:
1207         case SGS_REJ_MISFLAG:
1208         case SGS_REJ_HAL:
1209         case SGS_REJ_US3:
1210                 return (conv_ehdr_flags(mach, (Word)info, 0,
1211                     &reject_desc_buf->flags_buf));
1212         case SGS_REJ_UNKFILE:
1213         case SGS_REJ_ARCHIVE:
1214         case SGS_REJ_KMOD:
1215                 return (NULL);
1216         case SGS_REJ_STR:
1217         case SGS_REJ_HWCAP_1:
1218         case SGS_REJ_SFCAP_1:
1219         case SGS_REJ_HWCAP_2:
1220         case SGS_REJ_MACHCAP:
1221         case SGS_REJ_PLATCAP:
1222                 if (rej->rej_str)
1223                         return ((const char *)rej->rej_str);
1224                 else
1225                         return (MSG_ORIG(MSG_STR_EMPTY));
1226         default:
1227                 return (conv_invalid_val(&reject_desc_buf->inv_buf, info,
1228                     CONV_FMT_DECIMAL));
1229         }
1230 }