Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/linux/linux_sysvec.c
| Show First 20 Lines • Show All 790 Lines • ▼ Show 20 Lines | case R_386_IRELATIVE: | ||||
| break; | break; | ||||
| default: | default: | ||||
| printf("Linux i386 vDSO: unexpected relocation type %d, " | printf("Linux i386 vDSO: unexpected relocation type %d, " | ||||
| "symbol index %d\n", rtype, symidx); | "symbol index %d\n", rtype, symidx); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static Elf_Brandnote linux_brandnote = { | static const Elf_Brandnote linux_brandnote = { | ||||
| .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), | .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), | ||||
| .hdr.n_descsz = 16, /* XXX at least 16 */ | .hdr.n_descsz = 16, /* XXX at least 16 */ | ||||
| .hdr.n_type = 1, | .hdr.n_type = 1, | ||||
| .vendor = GNU_ABI_VENDOR, | .vendor = GNU_ABI_VENDOR, | ||||
| .flags = BN_TRANSLATE_OSREL, | .flags = BN_TRANSLATE_OSREL, | ||||
| .trans_osrel = linux_trans_osrel | .trans_osrel = linux_trans_osrel | ||||
| }; | }; | ||||
| static Elf32_Brandinfo linux_brand = { | static const Elf32_Brandinfo linux_brand = { | ||||
| .brand = ELFOSABI_LINUX, | .brand = ELFOSABI_LINUX, | ||||
| .machine = EM_386, | .machine = EM_386, | ||||
| .compat_3_brand = "Linux", | .compat_3_brand = "Linux", | ||||
| .interp_path = "/lib/ld-linux.so.1", | .interp_path = "/lib/ld-linux.so.1", | ||||
| .sysvec = &elf_linux_sysvec, | .sysvec = &elf_linux_sysvec, | ||||
| .interp_newpath = NULL, | .interp_newpath = NULL, | ||||
| .brand_note = &linux_brandnote, | .brand_note = &linux_brandnote, | ||||
| .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | ||||
| }; | }; | ||||
| static Elf32_Brandinfo linux_glibc2brand = { | static const Elf32_Brandinfo linux_glibc2brand = { | ||||
| .brand = ELFOSABI_LINUX, | .brand = ELFOSABI_LINUX, | ||||
| .machine = EM_386, | .machine = EM_386, | ||||
| .compat_3_brand = "Linux", | .compat_3_brand = "Linux", | ||||
| .interp_path = "/lib/ld-linux.so.2", | .interp_path = "/lib/ld-linux.so.2", | ||||
| .sysvec = &elf_linux_sysvec, | .sysvec = &elf_linux_sysvec, | ||||
| .interp_newpath = NULL, | .interp_newpath = NULL, | ||||
| .brand_note = &linux_brandnote, | .brand_note = &linux_brandnote, | ||||
| .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | ||||
| }; | }; | ||||
| static Elf32_Brandinfo linux_muslbrand = { | static const Elf32_Brandinfo linux_muslbrand = { | ||||
| .brand = ELFOSABI_LINUX, | .brand = ELFOSABI_LINUX, | ||||
| .machine = EM_386, | .machine = EM_386, | ||||
| .compat_3_brand = "Linux", | .compat_3_brand = "Linux", | ||||
| .interp_path = "/lib/ld-musl-i386.so.1", | .interp_path = "/lib/ld-musl-i386.so.1", | ||||
| .sysvec = &elf_linux_sysvec, | .sysvec = &elf_linux_sysvec, | ||||
| .interp_newpath = NULL, | .interp_newpath = NULL, | ||||
| .brand_note = &linux_brandnote, | .brand_note = &linux_brandnote, | ||||
| .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | | .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | | ||||
| LINUX_BI_FUTEX_REQUEUE | LINUX_BI_FUTEX_REQUEUE | ||||
| }; | }; | ||||
| Elf32_Brandinfo *linux_brandlist[] = { | const Elf32_Brandinfo *linux_brandlist[] = { | ||||
| &linux_brand, | &linux_brand, | ||||
| &linux_glibc2brand, | &linux_glibc2brand, | ||||
| &linux_muslbrand, | &linux_muslbrand, | ||||
| NULL | NULL | ||||
| }; | }; | ||||
| static int | static int | ||||
| linux_elf_modevent(module_t mod, int type, void *data) | linux_elf_modevent(module_t mod, int type, void *data) | ||||
| { | { | ||||
| Elf32_Brandinfo **brandinfo; | const Elf32_Brandinfo **brandinfo; | ||||
| int error; | int error; | ||||
| struct linux_ioctl_handler **lihp; | struct linux_ioctl_handler **lihp; | ||||
| error = 0; | error = 0; | ||||
| switch(type) { | switch(type) { | ||||
| case MOD_LOAD: | case MOD_LOAD: | ||||
| for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; | for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||