1*84d9c625SLionel Sambuc /* $NetBSD: ldd.h,v 1.7 2012/07/08 00:53:44 matt Exp $ */ 24b999f19SBen Gras 34b999f19SBen Gras /* 44b999f19SBen Gras * Copyright (c) 2008 Matthew R. Green 54b999f19SBen Gras * All rights reserved. 64b999f19SBen Gras * 74b999f19SBen Gras * Redistribution and use in source and binary forms, with or without 84b999f19SBen Gras * modification, are permitted provided that the following conditions 94b999f19SBen Gras * are met: 104b999f19SBen Gras * 1. Redistributions of source code must retain the above copyright 114b999f19SBen Gras * notice, this list of conditions and the following disclaimer. 124b999f19SBen Gras * 2. Redistributions in binary form must reproduce the above copyright 134b999f19SBen Gras * notice, this list of conditions and the following disclaimer in the 144b999f19SBen Gras * documentation and/or other materials provided with the distribution. 154b999f19SBen Gras * 3. The name of the author may not be used to endorse or promote products 164b999f19SBen Gras * derived from this software without specific prior written permission. 174b999f19SBen Gras * 184b999f19SBen Gras * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 194b999f19SBen Gras * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 204b999f19SBen Gras * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 214b999f19SBen Gras * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 224b999f19SBen Gras * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 234b999f19SBen Gras * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 244b999f19SBen Gras * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 254b999f19SBen Gras * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 264b999f19SBen Gras * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 274b999f19SBen Gras * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 284b999f19SBen Gras * SUCH DAMAGE. 294b999f19SBen Gras */ 304b999f19SBen Gras 314b999f19SBen Gras int elf32_ldd(int, char *, const char *, const char *); 324b999f19SBen Gras 334b999f19SBen Gras #ifdef _LP64 344b999f19SBen Gras #define LDD_ELF64 354b999f19SBen Gras #endif 364b999f19SBen Gras 374b999f19SBen Gras #ifdef LDD_ELF64 384b999f19SBen Gras int elf64_ldd(int, char *, const char *, const char *); 394b999f19SBen Gras #define elf_ldd elf64_ldd 404b999f19SBen Gras #elif defined(ELF32_COMPAT) 414b999f19SBen Gras #define elf_ldd elf32_compat_ldd 424b999f19SBen Gras #else 434b999f19SBen Gras #define elf_ldd elf32_ldd 444b999f19SBen Gras #endif 454b999f19SBen Gras 464b999f19SBen Gras extern char *main_local; 474b999f19SBen Gras extern char *main_progname; 48