Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jun 2021 19:03:04 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 765c6eb3953c - stable/13 - stand: Fix __elfN(loadimage) return value
Message-ID:  <202106201903.15KJ34cA008060@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=765c6eb3953c0e9e95543bfb9e7352772ace030c

commit 765c6eb3953c0e9e95543bfb9e7352772ace030c
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-06-06 20:40:25 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-06-20 19:00:54 +0000

    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
    
    (cherry picked from commit 1ea87e2a70c31454a8696ab2979d13d21c5575d2)
---
 stand/common/load_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106201903.15KJ34cA008060>