diff options
author | 2017-09-05 06:35:19 +0000 | |
---|---|---|
committer | 2017-09-05 06:35:19 +0000 | |
commit | 50a81047607fd1c3334f5e86858a088582a4b36a (patch) | |
tree | 5f563176f18252006a5752ff6e2f0c449dbd3bd9 /lib/libc | |
parent | Add -Wno-sign-compare, the single warning produced is a false positive; (diff) | |
download | wireguard-openbsd-50a81047607fd1c3334f5e86858a088582a4b36a.tar.xz wireguard-openbsd-50a81047607fd1c3334f5e86858a088582a4b36a.zip |
Remove unused 32bit version of elf_hash().
Riding previous libc bump.
ok kettenis@
Diffstat (limited to 'lib/libc')
-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 |
3 files changed, 2 insertions, 62 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; -} |