Print this page
10366 ld(1) should support GNU-style linker sets
10581 ld(1) should know kernel modules are a thing

@@ -3193,10 +3193,25 @@
                         if (rej->rej_type == 0) {
                                 *rej = _rej;
                                 rej->rej_name = strdup(_rej.rej_name);
                         }
                         return (0);
+                }
+
+                if (_gelf_getdynval(elf, DT_SUNW_KMOD) > 0) {
+                        _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);
+                        _rej.rej_name = name;
+
+                        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.
                  */