Print this page
ld should reject kernel modules as input

@@ -3193,10 +3193,24 @@
                         if (rej->rej_type == 0) {
                                 *rej = _rej;
                                 rej->rej_name = strdup(_rej.rej_name);
                         }
                         return (0);
+                }
+
+                if (_gelf_getdynval(elf, DT_SUNW_KMOD) == 1) {
+                        _rej.rej_name = name;
+                        DBG_CALL(Dbg_file_rejected(ofl->ofl_lml, &_rej,
+                            ld_targ.t_m.m_mach));
+                        _rej.rej_type = SGS_REJ_KMOD;
+                        _rej.rej_str = elf_errmsg(-1);
+
+                        if (rej->rej_type == 0) {
+                                *rej = _rej;
+                                rej->rej_name = strdup(_rej.rej_name);
+                        }
+                        return (0);
                 }
 
                 /*
                  * Determine if we've already come across this file.
                  */