summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_sysvec.c
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2009-03-13 16:40:51 +0000
committerdchagin <dchagin@FreeBSD.org>2009-03-13 16:40:51 +0000
commit2408b715a04f6a51269044473eb72c51e41c48dd (patch)
treefbdbeeec5ea5a4eb25824f4c5ab07ffceb56db40 /sys/i386/linux/linux_sysvec.c
parent2e55cf9c4afa6978ed9052a4aa6e13b410d79ced (diff)
downloadFreeBSD-src-2408b715a04f6a51269044473eb72c51e41c48dd.zip
FreeBSD-src-2408b715a04f6a51269044473eb72c51e41c48dd.tar.gz
Implement new way of branding ELF binaries by looking to a
".note.ABI-tag" section. The search order of a brand is changed, now first of all the ".note.ABI-tag" is looked through. Move code which fetch osreldate for ELF binary to check_note() handler. PR: 118473 Approved by: kib (mentor)
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r--sys/i386/linux/linux_sysvec.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 4efd496..26e58ec 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -1019,6 +1019,16 @@ struct sysentvec elf_linux_sysvec = {
.sv_flags = SV_ABI_LINUX | SV_IA32 | SV_ILP32
};
+static char GNULINUX_ABI_VENDOR[] = "GNU";
+
+static Elf_Brandnote linux_brandnote = {
+ .hdr.n_namesz = sizeof(GNULINUX_ABI_VENDOR),
+ .hdr.n_descsz = 16,
+ .hdr.n_type = 1,
+ .vendor = GNULINUX_ABI_VENDOR,
+ .flags = 0
+};
+
static Elf32_Brandinfo linux_brand = {
.brand = ELFOSABI_LINUX,
.machine = EM_386,
@@ -1027,7 +1037,8 @@ static Elf32_Brandinfo linux_brand = {
.interp_path = "/lib/ld-linux.so.1",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
- .flags = BI_CAN_EXEC_DYN,
+ .brand_note = &linux_brandnote,
+ .flags = BI_CAN_EXEC_DYN
};
static Elf32_Brandinfo linux_glibc2brand = {
@@ -1038,7 +1049,8 @@ static Elf32_Brandinfo linux_glibc2brand = {
.interp_path = "/lib/ld-linux.so.2",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
- .flags = BI_CAN_EXEC_DYN,
+ .brand_note = &linux_brandnote,
+ .flags = BI_CAN_EXEC_DYN
};
Elf32_Brandinfo *linux_brandlist[] = {
OpenPOWER on IntegriCloud