OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-sparc/] [a.out.h] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/* $Id: a.out.h,v 1.1 2005-12-20 11:32:11 jcastillo Exp $ */
2
#ifndef __SPARC_A_OUT_H__
3
#define __SPARC_A_OUT_H__
4
 
5
#define SPARC_PGSIZE    0x2000        /* Thanks to the sun4 architecture... */
6
#define SEGMENT_SIZE    SPARC_PGSIZE  /* whee... */
7
 
8
struct exec {
9
        unsigned char a_dynamic:1;      /* A __DYNAMIC is in this image */
10
        unsigned char a_toolversion:7;
11
        unsigned char a_machtype;
12
        unsigned short a_info;
13
        unsigned long a_text;           /* length of text, in bytes */
14
        unsigned long a_data;           /* length of data, in bytes */
15
        unsigned long a_bss;            /* length of bss, in bytes */
16
        unsigned long a_syms;           /* length of symbol table, in bytes */
17
        unsigned long a_entry;          /* where program begins */
18
        unsigned long a_trsize;
19
        unsigned long a_drsize;
20
};
21
 
22
/* Where in the file does the text information begin? */
23
#define N_TXTOFF(x)     (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
24
 
25
/* Where do the Symbols start? */
26
#define N_SYMOFF(x)     (N_TXTOFF(x) + (x).a_text +   \
27
                         (x).a_data + (x).a_trsize +  \
28
                         (x).a_drsize)
29
 
30
/* Where does text segment go in memory after being loaded? */
31
#define N_TXTADDR(x)    (((N_MAGIC(x) == ZMAGIC) &&        \
32
                         ((x).a_entry < SPARC_PGSIZE)) ?   \
33
 
34
 
35
/* And same for the data segment.. */
36
#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ?         \
37
                      (N_TXTADDR(x) + (x).a_text)  \
38
                       : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
39
 
40
#define N_TRSIZE(a)     ((a).a_trsize)
41
#define N_DRSIZE(a)     ((a).a_drsize)
42
#define N_SYMSIZE(a)    ((a).a_syms)
43
 
44
#ifdef __KERNEL__
45
 
46
#define STACK_TOP       TASK_SIZE
47
 
48
#endif
49
 
50
#endif /* __SPARC_A_OUT_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.