Don't return an error if a kld does not contain any modules (e.g. a

kld that only contained a sysctl).  The kernel linker allows such
modules, so the boot loader should not reject them.

MFC after:	2 weeks
This commit is contained in:
John Baldwin 2012-06-20 21:06:51 +00:00
parent f0e130f7b7
commit 32abc7ddc1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237338
2 changed files with 2 additions and 2 deletions

View File

@ -612,7 +612,7 @@ __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
Elf_Addr v, p, p_stop;
if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0)
return ENOENT;
return 0;
p = sym.st_value + ef->off;
if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0)
return ENOENT;

View File

@ -369,7 +369,7 @@ __elfN(obj_parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
if (__elfN(obj_lookup_set)(fp, ef, "modmetadata_set", &p, &p_stop,
&modcnt) != 0)
return ENOENT;
return 0;
modcnt = 0;
while (p < p_stop) {