MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-nios2nommu / a.out.h
blob829768763b7574679cb1bb7386d9395180ac16e8
1 /* $Id: a.out.h,v 1.1 2006/07/05 06:20:25 gerg Exp $ */
2 /*
3 * Copyright (C) 2004 Microtronix Datacom Ltd.
5 * All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
15 * NON INFRINGEMENT. See the GNU General Public License for more
16 * details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #ifndef __NIOS2NOMMU_A_OUT_H__
24 #define __NIOS2NOMMU_A_OUT_H__
26 #define SPARC_PGSIZE 0x1000 /* Thanks to the sun4 architecture... */
27 #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */
29 struct exec {
30 unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */
31 unsigned char a_toolversion:7;
32 unsigned char a_machtype;
33 unsigned short a_info;
34 unsigned long a_text; /* length of text, in bytes */
35 unsigned long a_data; /* length of data, in bytes */
36 unsigned long a_bss; /* length of bss, in bytes */
37 unsigned long a_syms; /* length of symbol table, in bytes */
38 unsigned long a_entry; /* where program begins */
39 unsigned long a_trsize;
40 unsigned long a_drsize;
43 #define INIT_EXEC { \
44 .a_dynamic = 0, \
45 .a_toolversion = 0, \
46 .a_machtype = 0, \
47 .a_info = 0, \
48 .a_text = 0, \
49 .a_data = 0, \
50 .a_bss = 0, \
51 .a_syms = 0, \
52 .a_entry = 0, \
53 .a_trsize = 0, \
54 .a_drsize = 0, \
57 /* Where in the file does the text information begin? */
58 #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
60 /* Where do the Symbols start? */
61 #define N_SYMOFF(x) (N_TXTOFF(x) + (x).a_text + \
62 (x).a_data + (x).a_trsize + \
63 (x).a_drsize)
65 /* Where does text segment go in memory after being loaded? */
66 #define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \
67 ((x).a_entry < SPARC_PGSIZE)) ? \
68 0 : SPARC_PGSIZE)
70 /* And same for the data segment.. */
71 #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \
72 (N_TXTADDR(x) + (x).a_text) \
73 : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
75 #define N_TRSIZE(a) ((a).a_trsize)
76 #define N_DRSIZE(a) ((a).a_drsize)
77 #define N_SYMSIZE(a) ((a).a_syms)
79 #ifdef __KERNEL__
81 #define STACK_TOP TASK_SIZE
83 #endif
85 #endif /* __NIOS2NOMMU_A_OUT_H__ */