1*d6aaec91Ssevan /* $NetBSD: extern.h,v 1.20 2018/01/23 21:06:25 sevan Exp $ */ 2326b2259Sagc 3326b2259Sagc /*- 4326b2259Sagc * Copyright (c) 1992, 1993 5326b2259Sagc * The Regents of the University of California. All rights reserved. 6326b2259Sagc * 7326b2259Sagc * Redistribution and use in source and binary forms, with or without 8326b2259Sagc * modification, are permitted provided that the following conditions 9326b2259Sagc * are met: 10326b2259Sagc * 1. Redistributions of source code must retain the above copyright 11326b2259Sagc * notice, this list of conditions and the following disclaimer. 12326b2259Sagc * 2. Redistributions in binary form must reproduce the above copyright 13326b2259Sagc * notice, this list of conditions and the following disclaimer in the 14326b2259Sagc * documentation and/or other materials provided with the distribution. 15326b2259Sagc * 3. Neither the name of the University nor the names of its contributors 16326b2259Sagc * may be used to endorse or promote products derived from this software 17326b2259Sagc * without specific prior written permission. 18326b2259Sagc * 19326b2259Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20326b2259Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21326b2259Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22326b2259Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23326b2259Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24326b2259Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25326b2259Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26326b2259Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27326b2259Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28326b2259Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29326b2259Sagc * SUCH DAMAGE. 30326b2259Sagc * 31326b2259Sagc * from: @(#)extern.h 8.1 (Berkeley) 6/6/93 32326b2259Sagc */ 3363488d73Sthorpej 34ec1b7778Spk /*- 35c347bc09Scgd * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. 36ec1b7778Spk * 37ec1b7778Spk * Redistribution and use in source and binary forms, with or without 38ec1b7778Spk * modification, are permitted provided that the following conditions 39ec1b7778Spk * are met: 40ec1b7778Spk * 1. Redistributions of source code must retain the above copyright 41ec1b7778Spk * notice, this list of conditions and the following disclaimer. 42ec1b7778Spk * 2. Redistributions in binary form must reproduce the above copyright 43ec1b7778Spk * notice, this list of conditions and the following disclaimer in the 44ec1b7778Spk * documentation and/or other materials provided with the distribution. 45ec1b7778Spk * 3. All advertising materials mentioning features or use of this software 46ec1b7778Spk * must display the following acknowledgement: 47ec1b7778Spk * This product includes software developed by the University of 48ec1b7778Spk * California, Berkeley and its contributors. 49ec1b7778Spk * 4. Neither the name of the University nor the names of its contributors 50ec1b7778Spk * may be used to endorse or promote products derived from this software 51ec1b7778Spk * without specific prior written permission. 52ec1b7778Spk * 53ec1b7778Spk * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 54ec1b7778Spk * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 55ec1b7778Spk * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 56ec1b7778Spk * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 57ec1b7778Spk * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 58ec1b7778Spk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 59ec1b7778Spk * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 60ec1b7778Spk * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 61ec1b7778Spk * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 62ec1b7778Spk * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 63ec1b7778Spk * SUCH DAMAGE. 64ec1b7778Spk * 65c250a078Smycroft * from: @(#)extern.h 8.1 (Berkeley) 6/6/93 66ec1b7778Spk */ 67ec1b7778Spk 6805297fb9Sthorpej #if defined(__alpha__) 69c347bc09Scgd # define NLIST_ECOFF 70c347bc09Scgd # define NLIST_ELF64 71d06e65a2Sfvdl #elif defined(__x86_64) 72d06e65a2Sfvdl # define NLIST_ELF64 7305297fb9Sthorpej #elif defined(__mips__) 7405297fb9Sthorpej # define NLIST_AOUT 7505297fb9Sthorpej # define NLIST_ECOFF 7605297fb9Sthorpej # define NLIST_ELF32 77d47ff437Sbjh21 #elif defined(__arm__) || defined(__i386__) || defined(__m68k__) || \ 78ba472566Sthorpej defined(__powerpc__) || defined(__vax__) 7905297fb9Sthorpej # define NLIST_AOUT 8005297fb9Sthorpej # define NLIST_ELF32 81861fc188Seeh #elif defined(__sparc__) 82861fc188Seeh # define NLIST_AOUT 83861fc188Seeh # define NLIST_ELF32 84861fc188Seeh # define NLIST_ELF64 8505774dcdSscw #elif defined(__SH5__) 8605774dcdSscw # define NLIST_ELF32 8705774dcdSscw # define NLIST_ELF64 8895991499Smsaitoh #elif defined(__sh__) 89ec7f04c3Sitojun # define NLIST_COFF 90ec7f04c3Sitojun # define NLIST_ELF32 91dcff733bSfredette #elif defined(__hppa__) 92dcff733bSfredette # define NLIST_ELF32 93c347bc09Scgd #else 94c347bc09Scgd # define NLIST_AOUT 95c347bc09Scgd /* #define NLIST_ECOFF */ 96c347bc09Scgd /* #define NLIST_ELF32 */ 97c347bc09Scgd /* #define NLIST_ELF64 */ 98c347bc09Scgd #endif 99c347bc09Scgd 100*d6aaec91Ssevan void create_knlist(const char *, DB *); 101*d6aaec91Ssevan void punt(void); 102*d6aaec91Ssevan int testdb(void); 103c347bc09Scgd 104c347bc09Scgd #ifdef NLIST_AOUT 105*d6aaec91Ssevan int create_knlist_aout(const char *, DB *); 106c347bc09Scgd #endif 107ec7f04c3Sitojun #ifdef NLIST_COFF 108*d6aaec91Ssevan int create_knlist_coff(const char *, DB *); 109ec7f04c3Sitojun #endif 110c347bc09Scgd #ifdef NLIST_ECOFF 111*d6aaec91Ssevan int create_knlist_ecoff(const char *, DB *); 112c347bc09Scgd #endif 113c347bc09Scgd #ifdef NLIST_ELF32 114*d6aaec91Ssevan int create_knlist_elf32(const char *, DB *); 115c347bc09Scgd #endif 116c347bc09Scgd #ifdef NLIST_ELF64 117*d6aaec91Ssevan int create_knlist_elf64(const char *, DB *); 118c347bc09Scgd #endif 119