diff options
author | jake <jake@FreeBSD.org> | 2003-01-05 03:48:14 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-01-05 03:48:14 +0000 |
commit | 6243006062d2b36ba6967e44b6f1fd9fa00173e4 (patch) | |
tree | af77949ecd99c3d1c518e58905561cc4b241c19e /sys/kern/imgact_elf.c | |
parent | 5b582a2ed13d6960e8221ba0a8df0e26e69adfcf (diff) | |
download | FreeBSD-src-6243006062d2b36ba6967e44b6f1fd9fa00173e4.zip FreeBSD-src-6243006062d2b36ba6967e44b6f1fd9fa00173e4.tar.gz |
- Provide backwards compatibility for kern.fallback_elf_brand.
- Use the generic elf type macros in imgact_elf.h instead of ifdefing the
entire contents of the header.
Diffstat (limited to 'sys/kern/imgact_elf.c')
-rw-r--r-- | sys/kern/imgact_elf.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 714ee15..f6b0cb2 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -67,9 +67,6 @@ #define OLD_EI_BRAND 8 -__ElfType(Brandinfo); -__ElfType(Auxargs); - static int __elfN(check_header)(const Elf_Ehdr *hdr); static Elf_Brandinfo *__elfN(get_brandinfo)(const Elf_Ehdr *hdr, const char *interp); @@ -84,12 +81,12 @@ static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); SYSCTL_NODE(_kern, OID_AUTO, __CONCAT(elf, __ELF_WORD_SIZE), CTLFLAG_RW, 0, ""); -static int fallback_brand = -1; -SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, fallback_brand, - CTLFLAG_RW, &fallback_brand, 0, +int __elfN(fallback_brand) = -1; +SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, + fallback_brand, CTLFLAG_RW, &__elfN(fallback_brand), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) " brand of last resort"); TUNABLE_INT("kern.elf" __XSTRING(__ELF_WORD_SIZE) ".fallback_brand", - &fallback_brand); + &__elfN(fallback_brand)); static int elf_trace = 0; SYSCTL_INT(_debug, OID_AUTO, __elfN(trace), CTLFLAG_RW, &elf_trace, 0, ""); @@ -188,7 +185,7 @@ __elfN(get_brandinfo)(const Elf_Ehdr *hdr, const char *interp) for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; if (bi != NULL && hdr->e_machine == bi->machine && - fallback_brand == bi->brand) + __elfN(fallback_brand) == bi->brand) return (bi); } return (NULL); |