From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4908C1395E5 for ; Sat, 12 Nov 2016 07:15:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BA94DE0C08; Sat, 12 Nov 2016 07:15:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9E291E0C08 for ; Sat, 12 Nov 2016 07:15:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BDE8E34166E for ; Sat, 12 Nov 2016 07:15:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 380B424BA for ; Sat, 12 Nov 2016 07:15:35 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1478934604.02ab226f7ff6bcc4a5943c1c7e5aef3ccebc33e3.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: paxldso.c paxldso.h X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 02ab226f7ff6bcc4a5943c1c7e5aef3ccebc33e3 X-VCS-Branch: master Date: Sat, 12 Nov 2016 07:15:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a98c1f30-c70d-46f5-8f45-dbfd51c83d45 X-Archives-Hash: 0ec61c7b718bb4955c25cca24916dcba commit: 02ab226f7ff6bcc4a5943c1c7e5aef3ccebc33e3 Author: Mike Frysinger gentoo org> AuthorDate: Mon Jul 25 08:17:58 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sat Nov 12 07:10:04 2016 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=02ab226f paxldso: delete netbsd cache logic This doesn't actually parse the cache file, it walks the registered ld.so.conf paths. Since common code takes care of that via with the --use-ldpaths option, delete the duplicate ldpath logic. paxldso.c | 28 ---------------------------- paxldso.h | 3 +-- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/paxldso.c b/paxldso.c index 638db77..67f317c 100644 --- a/paxldso.c +++ b/paxldso.c @@ -119,34 +119,6 @@ char *ldso_cache_lookup_lib(elfobj *elf, const char *fname) return buf; } -#elif defined(__NetBSD__) - -char *ldso_cache_lookup_lib(elfobj *elf, const char *fname) -{ - static char buf[__PAX_UTILS_PATH_MAX] = ""; - static struct stat st; - size_t n; - char *ldpath; - - array_for_each(ldpath, n, ldpath) { - if ((unsigned) snprintf(buf, sizeof(buf), "%s/%s", ldpath, fname) >= sizeof(buf)) - continue; /* if the pathname is too long, or something went wrong, ignore */ - - if (stat(buf, &st) != 0) - continue; /* if the lib doesn't exist in *ldpath, look further */ - - /* NetBSD doesn't actually do sanity checks, it just loads the file - * and if that doesn't work, continues looking in other directories. - * This cannot easily be safely emulated, unfortunately. For now, - * just assume that if it exists, it's a valid library. */ - - return buf; - } - - /* not found in any path */ - return NULL; -} - #endif static void ldso_cache_cleanup(void) diff --git a/paxldso.h b/paxldso.h index 2fdc540..bbf8852 100644 --- a/paxldso.h +++ b/paxldso.h @@ -14,8 +14,7 @@ */ #if !defined(__GLIBC__) && \ - !defined(__UCLIBC__) && \ - !defined(__NetBSD__) + !defined(__UCLIBC__) # ifdef __ELF__ # warning Cache support not implemented for your target # endif