summaryrefslogtreecommitdiffstats
path: root/sys/amd64/linux32
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/amd64/linux32
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/amd64/linux32')
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index a834c98..3ed65eb 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -1047,6 +1047,16 @@ struct sysentvec elf_linux_sysvec = {
.sv_flags = SV_ABI_LINUX | SV_ILP32 | SV_IA32
};
+static char GNULINUX_ABI_VENDOR[] = "GNU";
+
+static Elf_Brandnote linux32_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,
@@ -1055,7 +1065,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 = &linux32_brandnote,
+ .flags = BI_CAN_EXEC_DYN
};
static Elf32_Brandinfo linux_glibc2brand = {
@@ -1066,7 +1077,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 = &linux32_brandnote,
+ .flags = BI_CAN_EXEC_DYN
};
Elf32_Brandinfo *linux_brandlist[] = {
OpenPOWER on IntegriCloud