summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-03-22 22:28:13 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-03-22 22:28:13 +0000
commit2274ab3d7bf73f02d4c505715d47e2060e3afff8 (patch)
treebaa7564370e8627f407c8217906f9d19745f8b37
parent1438fe3cf26f928726c5297d66ce96a303b9ccbc (diff)
Notes
-rw-r--r--sys/amd64/cloudabi32/cloudabi32_sysvec.c2
-rw-r--r--sys/amd64/cloudabi64/cloudabi64_sysvec.c2
-rw-r--r--sys/arm/cloudabi32/cloudabi32_sysvec.c2
-rw-r--r--sys/arm64/cloudabi64/cloudabi64_sysvec.c2
-rw-r--r--sys/i386/cloudabi32/cloudabi32_sysvec.c2
-rw-r--r--sys/kern/imgact_elf.c14
-rw-r--r--sys/sys/imgact_elf.h2
7 files changed, 12 insertions, 14 deletions
diff --git a/sys/amd64/cloudabi32/cloudabi32_sysvec.c b/sys/amd64/cloudabi32/cloudabi32_sysvec.c
index eca42873f8f84..9306dbc5dfb6c 100644
--- a/sys/amd64/cloudabi32/cloudabi32_sysvec.c
+++ b/sys/amd64/cloudabi32/cloudabi32_sysvec.c
@@ -228,5 +228,5 @@ Elf32_Brandinfo cloudabi32_brand = {
.machine = EM_386,
.sysvec = &cloudabi32_elf_sysvec,
.compat_3_brand = "CloudABI",
- .flags = BI_BRAND_NOTE_ONLY_STATIC,
+ .flags = BI_BRAND_ONLY_STATIC,
};
diff --git a/sys/amd64/cloudabi64/cloudabi64_sysvec.c b/sys/amd64/cloudabi64/cloudabi64_sysvec.c
index f953710971da9..3428bbf490931 100644
--- a/sys/amd64/cloudabi64/cloudabi64_sysvec.c
+++ b/sys/amd64/cloudabi64/cloudabi64_sysvec.c
@@ -212,6 +212,6 @@ Elf64_Brandinfo cloudabi64_brand = {
.brand = ELFOSABI_CLOUDABI,
.machine = EM_X86_64,
.sysvec = &cloudabi64_elf_sysvec,
- .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_ONLY_STATIC,
+ .flags = BI_CAN_EXEC_DYN | BI_BRAND_ONLY_STATIC,
.compat_3_brand = "CloudABI",
};
diff --git a/sys/arm/cloudabi32/cloudabi32_sysvec.c b/sys/arm/cloudabi32/cloudabi32_sysvec.c
index b1130c92bcd43..d14129ec4c9e2 100644
--- a/sys/arm/cloudabi32/cloudabi32_sysvec.c
+++ b/sys/arm/cloudabi32/cloudabi32_sysvec.c
@@ -190,5 +190,5 @@ Elf32_Brandinfo cloudabi32_brand = {
.machine = EM_ARM,
.sysvec = &cloudabi32_elf_sysvec,
.compat_3_brand = "CloudABI",
- .flags = BI_BRAND_NOTE_ONLY_STATIC,
+ .flags = BI_BRAND_ONLY_STATIC,
};
diff --git a/sys/arm64/cloudabi64/cloudabi64_sysvec.c b/sys/arm64/cloudabi64/cloudabi64_sysvec.c
index 45e81c05952b0..7f339fe3910ef 100644
--- a/sys/arm64/cloudabi64/cloudabi64_sysvec.c
+++ b/sys/arm64/cloudabi64/cloudabi64_sysvec.c
@@ -181,6 +181,6 @@ Elf64_Brandinfo cloudabi64_brand = {
.brand = ELFOSABI_CLOUDABI,
.machine = EM_AARCH64,
.sysvec = &cloudabi64_elf_sysvec,
- .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_ONLY_STATIC,
+ .flags = BI_CAN_EXEC_DYN | BI_BRAND_ONLY_STATIC,
.compat_3_brand = "CloudABI",
};
diff --git a/sys/i386/cloudabi32/cloudabi32_sysvec.c b/sys/i386/cloudabi32/cloudabi32_sysvec.c
index d03c9e267ab31..1bd46cb99aae2 100644
--- a/sys/i386/cloudabi32/cloudabi32_sysvec.c
+++ b/sys/i386/cloudabi32/cloudabi32_sysvec.c
@@ -201,5 +201,5 @@ Elf32_Brandinfo cloudabi32_brand = {
.machine = EM_386,
.sysvec = &cloudabi32_elf_sysvec,
.compat_3_brand = "CloudABI",
- .flags = BI_BRAND_NOTE_ONLY_STATIC,
+ .flags = BI_BRAND_ONLY_STATIC,
};
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 3036f814faf93..42b02c1bd9e74 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -273,8 +273,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
bi = elf_brand_list[i];
if (bi == NULL)
continue;
- if (interp != NULL &&
- (bi->flags & BI_BRAND_NOTE_ONLY_STATIC) != 0)
+ if (interp != NULL && (bi->flags & BI_BRAND_ONLY_STATIC) != 0)
continue;
if (hdr->e_machine == bi->machine && (bi->flags &
(BI_BRAND_NOTE|BI_BRAND_NOTE_MANDATORY)) != 0) {
@@ -309,8 +308,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
for (i = 0; i < MAX_BRANDS; i++) {
bi = elf_brand_list[i];
if (bi == NULL || (bi->flags & BI_BRAND_NOTE_MANDATORY) != 0 ||
- (interp != NULL && (bi->flags &
- BI_BRAND_NOTE_ONLY_STATIC) != 0))
+ (interp != NULL && (bi->flags & BI_BRAND_ONLY_STATIC) != 0))
continue;
if (hdr->e_machine == bi->machine &&
(hdr->e_ident[EI_OSABI] == bi->brand ||
@@ -356,8 +354,9 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
if (interp != NULL) {
for (i = 0; i < MAX_BRANDS; i++) {
bi = elf_brand_list[i];
- if (bi == NULL || (bi->flags & (BI_BRAND_NOTE_MANDATORY |
- BI_BRAND_NOTE_ONLY_STATIC)) != 0)
+ if (bi == NULL || (bi->flags &
+ (BI_BRAND_NOTE_MANDATORY | BI_BRAND_ONLY_STATIC))
+ != 0)
continue;
if (hdr->e_machine == bi->machine &&
/* ELF image p_filesz includes terminating zero */
@@ -372,8 +371,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
for (i = 0; i < MAX_BRANDS; i++) {
bi = elf_brand_list[i];
if (bi == NULL || (bi->flags & BI_BRAND_NOTE_MANDATORY) != 0 ||
- (interp != NULL && (bi->flags &
- BI_BRAND_NOTE_ONLY_STATIC) != 0))
+ (interp != NULL && (bi->flags & BI_BRAND_ONLY_STATIC) != 0))
continue;
if (hdr->e_machine == bi->machine &&
__elfN(fallback_brand) == bi->brand)
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index 9836b0e93c528..40ad7c72ef3fb 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -81,7 +81,7 @@ typedef struct {
#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. */
-#define BI_BRAND_NOTE_ONLY_STATIC 0x0008
+#define BI_BRAND_ONLY_STATIC 0x0008 /* Match only interp-less binaries. */
} __ElfN(Brandinfo);
__ElfType(Auxargs);