exec_aout.h revision 2244
12632Sstever@eecs.umich.edu/* 22632Sstever@eecs.umich.edu * Taken from NetBSD sys/exec_aout.h 32632Sstever@eecs.umich.edu */ 42632Sstever@eecs.umich.edu 54479Sbinkertn@umich.edu/* $NetBSD: exec_aout.h,v 1.29 2002/12/10 17:14:31 thorpej Exp $ */ 64479Sbinkertn@umich.edu 74479Sbinkertn@umich.edu/* 84479Sbinkertn@umich.edu * Copyright (c) 1993, 1994 Christopher G. Demetriou 92632Sstever@eecs.umich.edu * All rights reserved. 102632Sstever@eecs.umich.edu * 112632Sstever@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 122632Sstever@eecs.umich.edu * modification, are permitted provided that the following conditions 132632Sstever@eecs.umich.edu * are met: 142632Sstever@eecs.umich.edu * 1. Redistributions of source code must retain the above copyright 152632Sstever@eecs.umich.edu * notice, this list of conditions and the following disclaimer. 162632Sstever@eecs.umich.edu * 2. Redistributions in binary form must reproduce the above copyright 172632Sstever@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 182632Sstever@eecs.umich.edu * documentation and/or other materials provided with the distribution. 192632Sstever@eecs.umich.edu * 3. All advertising materials mentioning features or use of this software 202632Sstever@eecs.umich.edu * must display the following acknowledgement: 212632Sstever@eecs.umich.edu * This product includes software developed by Christopher G. Demetriou. 222632Sstever@eecs.umich.edu * 4. The name of the author may not be used to endorse or promote products 232632Sstever@eecs.umich.edu * derived from this software without specific prior written permission 242632Sstever@eecs.umich.edu * 252632Sstever@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 262632Sstever@eecs.umich.edu * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 272632Sstever@eecs.umich.edu * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 282632Sstever@eecs.umich.edu * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 292632Sstever@eecs.umich.edu * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 302632Sstever@eecs.umich.edu * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 */ 36 37#ifndef _SYS_EXEC_AOUT_H_ 38#define _SYS_EXEC_AOUT_H_ 39 40#ifndef N_PAGSIZ 41#define N_PAGSIZ(ex) (AOUT_LDPGSZ) 42#endif 43 44/* a_magic */ 45#define OMAGIC 0407 /* old impure format */ 46#define NMAGIC 0410 /* read-only text */ 47#define ZMAGIC 0413 /* demand load format */ 48 49#define N_ALIGN(ex,x) \ 50 (N_GETMAGIC(ex) == ZMAGIC ? \ 51 ((x) + AOUT_LDPGSZ - 1) & ~(AOUT_LDPGSZ - 1) : (x)) 52 53/* Valid magic number check. */ 54#define N_BADMAG(ex) \ 55 (N_GETMAGIC(ex) != NMAGIC && N_GETMAGIC(ex) != OMAGIC && \ 56 N_GETMAGIC(ex) != ZMAGIC) 57 58//Only alpha will be able to load aout for now 59#include "arch/alpha/aout_machdep.h" 60 61#endif /* !_SYS_EXEC_AOUT_H_ */ 62