diff options
-rw-r--r-- | lib/libc/Symbols.list | 1 | ||||
-rw-r--r-- | lib/libc/gen/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/gen/elf_hash.c | 59 | ||||
-rw-r--r-- | sys/sys/exec_elf.h | 5 |
4 files changed, 3 insertions, 66 deletions
diff --git a/lib/libc/Symbols.list b/lib/libc/Symbols.list index ba40b90534f..56545aef0ac 100644 --- a/lib/libc/Symbols.list +++ b/lib/libc/Symbols.list @@ -585,7 +585,6 @@ daemon devname dirfd dirname -elf_hash endfsent endgrent endnetgrent diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index fdcd7007123..0d3f3c2b0af 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.76 2017/06/19 03:06:26 dlg Exp $ +# $OpenBSD: Makefile.inc,v 1.77 2017/09/05 06:35:19 mpi Exp $ # gen sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/gen ${LIBCSRCDIR}/gen @@ -6,7 +6,7 @@ SRCS+= alarm.c assert.c auth_subr.c authenticate.c \ basename.c clock.c clock_getcpuclockid.c \ closedir.c confstr.c ctermid.c ctype_.c \ - daemon.c devname.c dirfd.c dirname.c disklabel.c elf_hash.c err.c \ + daemon.c devname.c dirfd.c dirname.c disklabel.c err.c \ errc.c errx.c errlist.c errno.c exec.c \ fdatasync.c fnmatch.c fpclassify.c frexp.c \ fstab.c ftok.c fts.c ftw.c getbsize.c getcap.c getcwd.c \ diff --git a/lib/libc/gen/elf_hash.c b/lib/libc/gen/elf_hash.c deleted file mode 100644 index 5fdc2815457..00000000000 --- a/lib/libc/gen/elf_hash.c +++ /dev/null @@ -1,59 +0,0 @@ -/* $OpenBSD: elf_hash.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */ -/* - * Copyright (c) 1995, 1996 Erik Theisen - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/types.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <sys/file.h> - -#include <errno.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <sys/exec.h> - -#include <elf_abi.h> - -/* - * Standard ELF ABI hash function. - * DO NOT MODIFY THIS FUNCTION -- INVALID - * HASH TABLES WILL BE GENERATED! - */ -unsigned int -elf_hash(const unsigned char *name) -{ - unsigned int h = 0, g; - - while (*name) { - h = (h << 4) + *name++; - if ((g = h & 0xf0000000)) - h ^= g >> 24; - h &= ~g; - } - return h; -} diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h index 77c13a0372c..2efe09ebc9d 100644 --- a/sys/sys/exec_elf.h +++ b/sys/sys/exec_elf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.h,v 1.74 2017/05/30 15:39:05 mpi Exp $ */ +/* $OpenBSD: exec_elf.h,v 1.75 2017/09/05 06:35:19 mpi Exp $ */ /* * Copyright (c) 1995, 1996 Erik Theisen. All rights reserved. * @@ -528,9 +528,6 @@ typedef struct { #define DF_1_NODUMP 0x00001000 #define DF_1_CONLFAT 0x00002000 -/* Standard ELF hashing function */ -unsigned int elf_hash(const unsigned char *name); - /* * Note header */ |