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 { 395543Ssaidi@eecs.umich.edu uint16_t magic; ///< magic number 405543Ssaidi@eecs.umich.edu uint16_t vstamp; ///< version stamp? 415543Ssaidi@eecs.umich.edu uint16_t bldrev; ///< ??? 425543Ssaidi@eecs.umich.edu uint16_t padcell; ///< padding 435543Ssaidi@eecs.umich.edu uint64_t tsize; ///< text segment size 445543Ssaidi@eecs.umich.edu uint64_t dsize; ///< data segment size 455543Ssaidi@eecs.umich.edu uint64_t bsize; ///< bss segment size 465543Ssaidi@eecs.umich.edu uint64_t entry; ///< entry point 475543Ssaidi@eecs.umich.edu uint64_t text_start; ///< text base address 485543Ssaidi@eecs.umich.edu uint64_t data_start; ///< data base address 495543Ssaidi@eecs.umich.edu uint64_t bss_start; ///< bss base address 505543Ssaidi@eecs.umich.edu uint32_t gprmask; ///< GPR mask (unused, AFAIK) 515543Ssaidi@eecs.umich.edu uint32_t fprmask; ///< FPR mask (unused, AFAIK) 525543Ssaidi@eecs.umich.edu uint64_t gp_value; ///< global pointer reg value 5312SN/A}; 5412SN/A 555543Ssaidi@eecs.umich.edu#define AOUT_LDPGSZ 8192 5612SN/A 575543Ssaidi@eecs.umich.edu#define N_GETMAGIC(ex) ((ex).magic) 5812SN/A 5912SN/A#define N_BADMAX 6012SN/A 615543Ssaidi@eecs.umich.edu#define N_TXTADDR(ex) ((ex).text_start) 625543Ssaidi@eecs.umich.edu#define N_DATADDR(ex) ((ex).data_start) 635543Ssaidi@eecs.umich.edu#define N_BSSADDR(ex) ((ex).bss_start) 6412SN/A 655543Ssaidi@eecs.umich.edu#define N_TXTOFF(ex) \ 6612SN/A (N_GETMAGIC(ex) == ZMAGIC ? 0 : sizeof(struct aout_exechdr)) 6712SN/A 685543Ssaidi@eecs.umich.edu#define N_DATOFF(ex) N_ALIGN(ex, N_TXTOFF(ex) + (ex).tsize) 6912SN/A 7012SN/A#endif /* !__AOUT_MACHDEP_H__*/ 71