Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2023 10:06:58 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a04633cef81e - main - imgact_elf: Export __elfN(parse_notes)
Message-ID:  <202311101006.3AAA6wcE016711@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

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

commit a04633cef81e3b29da4eb214331bd472fc2e9238
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-11-01 15:18:12 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-11-10 09:57:45 +0000

    imgact_elf: Export __elfN(parse_notes)
    
    This is useful to check if a note is present and contains an expected
    value, e.g. to read NT_GNU_PROPERTY_TYPE_0 on arm64 to see if we should
    enable BTI.
    
    Reviewed by:    kib, markj
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D42439
---
 sys/kern/imgact_elf.c | 2 +-
 sys/sys/imgact_elf.h  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index e03527f6a873..f361920e16d5 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -2704,7 +2704,7 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep)
 	}
 }
 
-static bool
+bool
 __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote,
     const char *note_vendor, const Elf_Phdr *pnote,
     bool (*cb)(const Elf_Note *, void *, bool *), void *cb_arg)
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index 7210fc2187a9..51e149476a28 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -123,6 +123,9 @@ void	__elfN(prepare_notes)(struct thread *, struct note_info_list *,
 void	__elfN(size_segments)(struct thread *, struct sseg_closure *, int);
 size_t	__elfN(register_note)(struct thread *, struct note_info_list *,
 	    int, outfunc_t, void *);
+bool	__elfN(parse_notes)(struct image_params *, Elf_Note *, const char *,
+	    const Elf_Phdr *, bool (*)(const Elf_Note *, void *, bool *),
+	    void *);
 
 /* Machine specific function to dump per-thread information. */
 void	__elfN(dump_thread)(struct thread *, void *, size_t *);



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