nlist_private.h revision 1.7
11.7Smsaitoh/*	$NetBSD: nlist_private.h,v 1.7 2000/01/03 02:13:32 msaitoh Exp $	*/
21.1Scgd
31.1Scgd/*
41.1Scgd * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
51.1Scgd *
61.1Scgd * Redistribution and use in source and binary forms, with or without
71.1Scgd * modification, are permitted provided that the following conditions
81.1Scgd * are met:
91.1Scgd * 1. Redistributions of source code must retain the above copyright
101.1Scgd *    notice, this list of conditions and the following disclaimer.
111.1Scgd * 2. Redistributions in binary form must reproduce the above copyright
121.1Scgd *    notice, this list of conditions and the following disclaimer in the
131.1Scgd *    documentation and/or other materials provided with the distribution.
141.1Scgd * 3. All advertising materials mentioning features or use of this software
151.1Scgd *    must display the following acknowledgement:
161.1Scgd *      This product includes software developed by Christopher G. Demetriou
171.1Scgd *	for the NetBSD Project.
181.1Scgd * 4. The name of the author may not be used to endorse or promote products
191.1Scgd *    derived from this software without specific prior written permission
201.1Scgd *
211.1Scgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.1Scgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.1Scgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.1Scgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.1Scgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.1Scgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.1Scgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.1Scgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.1Scgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.1Scgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.1Scgd */
321.1Scgd
331.4Sthorpej#if defined(__alpha__)
341.4Sthorpej#  define	NLIST_ECOFF
351.4Sthorpej#  define	NLIST_ELF64
361.4Sthorpej#elif defined(__mips__)
371.4Sthorpej#  define	NLIST_AOUT
381.4Sthorpej#  define	NLIST_ECOFF
391.4Sthorpej#  define	NLIST_ELF32
401.6Sthorpej#elif defined(__i386__) || defined (__m68k__) || defined(__powerpc__)
411.4Sthorpej#  define	NLIST_AOUT
421.4Sthorpej#  define	NLIST_ELF32
431.6Sthorpej#elif defined(__sparc__)
441.6Sthorpej#  define	NLIST_AOUT
451.6Sthorpej#  define	NLIST_ELF32
461.6Sthorpej#  define	NLIST_ELF64
471.7Smsaitoh#elif defined(__sh__)
481.7Smsaitoh#  define	NLIST_COFF
491.7Smsaitoh#  define	NLIST_ELF32
501.2Scgd#else
511.4Sthorpej#  define	NLIST_AOUT
521.2Scgd/* #define	NLIST_ECOFF */
531.2Scgd/* #define	NLIST_ELF32 */
541.2Scgd/* #define	NLIST_ELF64 */
551.2Scgd#endif
561.1Scgd
571.1Scgd#define	ISLAST(p)	(p->n_un.n_name == 0 || p->n_un.n_name[0] == 0)
581.1Scgd
591.1Scgd#ifdef NLIST_AOUT
601.1Scgdint	__fdnlist_aout __P((int, struct nlist *));
611.7Smsaitoh#endif
621.7Smsaitoh#ifdef NLIST_COFF
631.7Smsaitohint	__fdnlist_coff __P((int, struct nlist *));
641.1Scgd#endif
651.1Scgd#ifdef NLIST_ECOFF
661.1Scgdint	__fdnlist_ecoff __P((int, struct nlist *));
671.1Scgd#endif
681.1Scgd#ifdef NLIST_ELF32
691.1Scgdint	__fdnlist_elf32 __P((int, struct nlist *));
701.1Scgd#endif
711.1Scgd#ifdef NLIST_ELF64
721.1Scgdint	__fdnlist_elf64 __P((int, struct nlist *));
731.1Scgd#endif
74