diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-06-06 20:40:25 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-06-06 20:44:46 +0000 |
commit | 1ea87e2a70c31454a8696ab2979d13d21c5575d2 (patch) | |
tree | 617ee0826f87916ecddfd3ca5648b8f7ea4a6246 /stand | |
parent | fbeb4ccac990fdb3bc26ab925a3ca8e7d2f89721 (diff) | |
download | src-1ea87e2a70c31454a8696ab2979d13d21c5575d2.tar.gz src-1ea87e2a70c31454a8696ab2979d13d21c5575d2.zip |
stand: Fix __elfN(loadimage) return value
Caller functions expect __elfN(loadimage) to return a value of zero on
failure and the file size on success.
PR: 256390
Reviewed by: markj
MFC after: 2 weeks
Diffstat (limited to 'stand')
-rw-r--r-- | stand/common/load_elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index 8bb780ef34df..f1a9ff8e0c22 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -893,7 +893,7 @@ nosyms: p_start = sym.st_value + ef->off; if (__elfN(lookup_symbol)(ef, "__stop_set_modmetadata_set", &sym, STT_NOTYPE) != 0) - return ENOENT; + return 0; p_end = sym.st_value + ef->off; if (__elfN(parse_modmetadata)(fp, ef, p_start, p_end) == 0) |