diff options
author | peter <peter@FreeBSD.org> | 2003-12-23 02:42:39 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-12-23 02:42:39 +0000 |
commit | 998b79089fba1b775a2a89f2c6d325d97dd21ead (patch) | |
tree | 1907b96bc90f9f9f4007eae1193fdfe639edb170 /sys/alpha | |
parent | 47e1d21299b39eba3b43f8b5986b655cadf52175 (diff) | |
download | FreeBSD-src-998b79089fba1b775a2a89f2c6d325d97dd21ead.zip FreeBSD-src-998b79089fba1b775a2a89f2c6d325d97dd21ead.tar.gz |
Add an additional field to the elf brandinfo structure to support
quicker exec-time replacement of the elf interpreter on an emulation
environment where an entire /compat/* tree isn't really warranted.
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/elf_machdep.c | 20 | ||||
-rw-r--r-- | sys/alpha/linux/linux_sysvec.c | 6 |
2 files changed, 22 insertions, 4 deletions
diff --git a/sys/alpha/alpha/elf_machdep.c b/sys/alpha/alpha/elf_machdep.c index c76f4d91..794328c 100644 --- a/sys/alpha/alpha/elf_machdep.c +++ b/sys/alpha/alpha/elf_machdep.c @@ -81,15 +81,31 @@ static Elf64_Brandinfo freebsd_brand_info = { ELFOSABI_FREEBSD, EM_ALPHA, "FreeBSD", - "", + NULL, "/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec + &elf64_freebsd_sysvec, + NULL, }; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_info); +static Elf64_Brandinfo freebsd_brand_oinfo = { + ELFOSABI_FREEBSD, + EM_ALPHA, + "FreeBSD", + NULL, + "/usr/libexec/ld-elf.so.1", + &elf64_freebsd_sysvec, + NULL, + }; + +SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, + (sysinit_cfunc_t) elf64_insert_brand_entry, + &freebsd_brand_oinfo); + + /* Process one elf relocation with addend. */ static int elf_reloc_internal(linker_file_t lf, const void *data, int type, int local) diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index 09cbadd..add35a3 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -210,7 +210,8 @@ static Elf64_Brandinfo linux_brand = { "Linux", "/compat/linux", "/lib/ld-linux.so.1", - &elf_linux_sysvec + &elf_linux_sysvec, + NULL, }; static Elf64_Brandinfo linux_glibc2brand = { @@ -219,7 +220,8 @@ static Elf64_Brandinfo linux_glibc2brand = { "Linux", "/compat/linux", "/lib/ld-linux.so.2", - &elf_linux_sysvec + &elf_linux_sysvec, + NULL, }; Elf64_Brandinfo *linux_brandlist[] = { |