From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21391 invoked by alias); 26 Nov 2012 15:05:14 -0000 Received: (qmail 21374 invoked by uid 22791); 26 Nov 2012 15:05:13 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_CP X-Spam-Check-By: sourceware.org Received: from cheddar.halon.org.uk (HELO cheddar.halon.org.uk) (217.10.144.130) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Nov 2012 15:05:07 +0000 Received: from bsmtp by cheddar.halon.org.uk with local-bsmtp (Exim 4.72) (envelope-from ) id 1Td0F8-00071W-Cx for libc-ports@sourceware.org; Mon, 26 Nov 2012 15:05:06 +0000 Received: from steve by tack.local with local (Exim 4.80) (envelope-from ) id 1Td0Ec-00088v-Rw for libc-ports@sourceware.org; Mon, 26 Nov 2012 15:04:34 +0000 Date: Mon, 26 Nov 2012 15:05:00 -0000 From: Steve McIntyre To: libc-ports@sourceware.org Subject: Re: [PATCH 2/4] Check for the FLAG_AARCH64_LIB64 flag in the ldconfig cache Message-ID: <20121126150434.GB28791@einval.com> References: <20121126150131.GA28791@einval.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121126150131.GA28791@einval.com> X-attached: none User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00110.txt.bz2 Use the new FLAG_AARCH64_LIB64 ldconfig cache tag for AArch64, similarly to the way tags are handled for other architectures. ======================================================== Check for the FLAG_AARCH64_LIB64 flag in the ldconfig cache * sysdeps/unix/sysv/linux/aarch64/dl-cache.h: New file. Signed-off-by: Steve McIntyre --- ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h b/ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h new file mode 100644 index 0000000..1aa1a84 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h @@ -0,0 +1,45 @@ +/* Support for reading /etc/ld.so.cache files written by Linux ldconfig. + Copyright (C) 2003-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include + +#define _DL_CACHE_DEFAULT_ID (FLAG_AARCH64_LIB64 | FLAG_ELF_LIBC6) + +#define _dl_cache_check_flags(flags) \ + ((flags) == _DL_CACHE_DEFAULT_ID) + +#define add_system_dir(dir) \ + do \ + { \ + size_t len = strlen (dir); \ + char path[len + 3]; \ + memcpy (path, dir, len + 1); \ + if (len >= 6 && ! memcmp (path + len - 6, "/lib64", 6)) \ + { \ + len -= 2; \ + path[len] = '\0'; \ + } \ + add_dir (path); \ + if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4)) \ + { \ + memcpy (path + len, "64", 3); \ + add_dir (path); \ + } \ + } while (0) + +#include_next -- 1.7.10.4 Cheers, -- Steve McIntyre steve.mcintyre@linaro.org Linaro.org | Open source software for ARM SoCs