aout_machdep.h revision 2665
172SN/A/* 21762SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan 372SN/A * All rights reserved. 472SN/A * 572SN/A * Redistribution and use in source and binary forms, with or without 672SN/A * modification, are permitted provided that the following conditions are 772SN/A * met: redistributions of source code must retain the above copyright 872SN/A * notice, this list of conditions and the following disclaimer; 972SN/A * redistributions in binary form must reproduce the above copyright 1072SN/A * notice, this list of conditions and the following disclaimer in the 1172SN/A * documentation and/or other materials provided with the distribution; 1272SN/A * neither the name of the copyright holders nor the names of its 1372SN/A * contributors may be used to endorse or promote products derived from 1472SN/A * this software without specific prior written permission. 1572SN/A * 1672SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1772SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1872SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1972SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2072SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2172SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2272SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2372SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2472SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2572SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2672SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu * 282665Ssaidi@eecs.umich.edu * Authors: Steve Reinhardt 292665Ssaidi@eecs.umich.edu * Nathan Binkert 3072SN/A */ 3112SN/A 3212SN/A#ifndef __AOUT_MACHDEP_H__ 3312SN/A#define __AOUT_MACHDEP_H__ 3412SN/A 3512SN/A/// 3612SN/A/// Funky Alpha 64-bit a.out header used for PAL code. 3712SN/A/// 3812SN/Astruct aout_exechdr { 39125SN/A uint16_t magic; ///< magic number 40125SN/A uint16_t vstamp; ///< version stamp? 41125SN/A uint16_t bldrev; ///< ??? 42125SN/A uint16_t padcell; ///< padding 43125SN/A uint64_t tsize; ///< text segment size 44125SN/A uint64_t dsize; ///< data segment size 45125SN/A uint64_t bsize; ///< bss segment size 46125SN/A uint64_t entry; ///< entry point 47125SN/A uint64_t text_start; ///< text base address 48125SN/A uint64_t data_start; ///< data base address 49125SN/A uint64_t bss_start; ///< bss base address 50125SN/A uint32_t gprmask; ///< GPR mask (unused, AFAIK) 51125SN/A uint32_t fprmask; ///< FPR mask (unused, AFAIK) 52125SN/A uint64_t gp_value; ///< global pointer reg value 5312SN/A}; 5412SN/A 5512SN/A#define AOUT_LDPGSZ 8192 5612SN/A 5712SN/A#define N_GETMAGIC(ex) ((ex).magic) 5812SN/A 5912SN/A#define N_BADMAX 6012SN/A 6112SN/A#define N_TXTADDR(ex) ((ex).text_start) 6212SN/A#define N_DATADDR(ex) ((ex).data_start) 6312SN/A#define N_BSSADDR(ex) ((ex).bss_start) 6412SN/A 6512SN/A#define N_TXTOFF(ex) \ 6612SN/A (N_GETMAGIC(ex) == ZMAGIC ? 0 : sizeof(struct aout_exechdr)) 6712SN/A 6812SN/A#define N_DATOFF(ex) N_ALIGN(ex, N_TXTOFF(ex) + (ex).tsize) 6912SN/A 7012SN/A#endif /* !__AOUT_MACHDEP_H__*/ 71