summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2017-07-15 08:27:23 +0000
committerdchagin <dchagin@FreeBSD.org>2017-07-15 08:27:23 +0000
commitf3ba0c85898f56d6e531f6f0cfd5c56b4892711b (patch)
tree87c171f965e176cd872aeeff7329f19ccb3fbba5 /sys/amd64
parentf128204f725541b7b0e1f84e7649604b2b2fdb90 (diff)
downloadFreeBSD-src-f3ba0c85898f56d6e531f6f0cfd5c56b4892711b.zip
FreeBSD-src-f3ba0c85898f56d6e531f6f0cfd5c56b4892711b.tar.gz
MFC r320595:
Add support for musl consumers to the Linuxulator. PR: 213809 Submitted by: Yonas Yanfa (for amd64) Reported by: Yonas Yanfa Relnotes: yes
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/linux/linux_sysvec.c13
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c13
2 files changed, 26 insertions, 0 deletions
diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
index 6e12d41..95e1f8a 100644
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -921,9 +921,22 @@ static Elf64_Brandinfo linux_glibc2brandshort = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
+static Elf64_Brandinfo linux_muslbrand = {
+ .brand = ELFOSABI_LINUX,
+ .machine = EM_X86_64,
+ .compat_3_brand = "Linux",
+ .emul_path = "/compat/linux",
+ .interp_path = "/lib/ld-musl-x86_64.so.1",
+ .sysvec = &elf_linux_sysvec,
+ .interp_newpath = NULL,
+ .brand_note = &linux64_brandnote,
+ .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
+};
+
Elf64_Brandinfo *linux_brandlist[] = {
&linux_glibc2brand,
&linux_glibc2brandshort,
+ &linux_muslbrand,
NULL
};
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index c264f3a..2debd7e 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -1139,9 +1139,22 @@ static Elf32_Brandinfo linux_glibc2brand = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
+static Elf32_Brandinfo linux_muslbrand = {
+ .brand = ELFOSABI_LINUX,
+ .machine = EM_386,
+ .compat_3_brand = "Linux",
+ .emul_path = "/compat/linux",
+ .interp_path = "/lib/ld-musl-i386.so.1",
+ .sysvec = &elf_linux_sysvec,
+ .interp_newpath = NULL,
+ .brand_note = &linux32_brandnote,
+ .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
+};
+
Elf32_Brandinfo *linux_brandlist[] = {
&linux_brand,
&linux_glibc2brand,
+ &linux_muslbrand,
NULL
};
OpenPOWER on IntegriCloud