diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-05-13 16:39:24 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-05-13 16:39:24 +0000 |
commit | 5012c831c332b2006450ea5b18471e5a3d31a45f (patch) | |
tree | 10bc70209a7dbdba361a433c5100e9bc20e5cf61 /sys | |
parent | bb325e7b36afb8a252b9db1e956b0e40fc7600cd (diff) |
Use EI_OSABI instead of EI_BRAND
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/exec_elf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 982a43412db..4ee10c9af01 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.45 2003/04/16 21:17:52 drahn Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.46 2003/05/13 16:39:23 millert Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -833,12 +833,16 @@ ELFNAME2(exec,fixup)(struct proc *p, struct exec_package *epp) return (error); } +/* + * Older ELF binaries use EI_ABIVERSION (formerly EI_BRAND) to brand + * executables. Newer ELF binaries use EI_OSABI instead. + */ char * ELFNAME(check_brand)(Elf_Ehdr *eh) { - if (eh->e_ident[EI_BRAND] == '\0') + if (eh->e_ident[EI_ABIVERSION] == '\0') return (NULL); - return (&eh->e_ident[EI_BRAND]); + return (&eh->e_ident[EI_ABIVERSION]); } int |