aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux32/linux32_sysvec.c
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2009-03-13 16:40:51 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2009-03-13 16:40:51 +0000
commit32c01de21c9a5ae157b5e5164539be70d573edf4 (patch)
treefbdbeeec5ea5a4eb25824f4c5ab07ffceb56db40 /sys/amd64/linux32/linux32_sysvec.c
parente667034d80d8b4e7a9ce99104b678463349d8597 (diff)
downloadsrc-32c01de21c9a5ae157b5e5164539be70d573edf4.tar.gz
src-32c01de21c9a5ae157b5e5164539be70d573edf4.zip
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)
Notes
Notes: svn path=/head/; revision=189771
Diffstat (limited to 'sys/amd64/linux32/linux32_sysvec.c')
-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 a834c98cb08d..3ed65eb4cfb8 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[] = {