aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2021-06-29 17:15:08 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2021-06-29 17:15:08 +0000
commit615f22b2fb6d999005473abcb771c6bf25118dfe (patch)
treef0f1f6c67d81bf2d2ee2d0a7e819a7b270c5b84a /sys/sys
parentf77697dd9f31df85cd86370888606c81833f7c8a (diff)
downloadsrc-615f22b2fb6d999005473abcb771c6bf25118dfe.tar.gz
src-615f22b2fb6d999005473abcb771c6bf25118dfe.zip
Add a link to the Elf_Brandinfo into the struc proc.
To allow the ABI to make a dicision based on the Brandinfo add a link to the Elf_Brandinfo into the struct proc. Add a note that the high 8 bits of Elf_Brandinfo flags is private to the ABI. Note to MFC: it breaks KBI. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D30918 MFC after: 2 weeks
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/imgact_elf.h1
-rw-r--r--sys/sys/proc.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index 44a860359a75..97383c6eeeb8 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -91,6 +91,7 @@ typedef struct {
Elf_Brandnote *brand_note;
boolean_t (*header_supported)(struct image_params *,
int32_t *, uint32_t *);
+ /* High 8 bits of flags is private to the ABI */
#define BI_CAN_EXEC_DYN 0x0001
#define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */
#define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index ef27691ae4cd..36c07b3b5e78 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -702,6 +702,8 @@ struct proc {
our subtree. */
uint16_t p_elf_machine; /* (x) ELF machine type */
uint64_t p_elf_flags; /* (x) ELF flags */
+ void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for
+ non ELF binaries. */
/* End area that is copied on creation. */
#define p_endcopy p_xexit