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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-sparc/] [a.out.h] - Diff between revs 1765 and 1782

Only display areas with differences | Details | Blame | View Log

Rev 1765 Rev 1782
/* $Id: a.out.h,v 1.1 2005-12-20 11:32:11 jcastillo Exp $ */
/* $Id: a.out.h,v 1.1 2005-12-20 11:32:11 jcastillo Exp $ */
#ifndef __SPARC_A_OUT_H__
#ifndef __SPARC_A_OUT_H__
#define __SPARC_A_OUT_H__
#define __SPARC_A_OUT_H__
 
 
#define SPARC_PGSIZE    0x2000        /* Thanks to the sun4 architecture... */
#define SPARC_PGSIZE    0x2000        /* Thanks to the sun4 architecture... */
#define SEGMENT_SIZE    SPARC_PGSIZE  /* whee... */
#define SEGMENT_SIZE    SPARC_PGSIZE  /* whee... */
 
 
struct exec {
struct exec {
        unsigned char a_dynamic:1;      /* A __DYNAMIC is in this image */
        unsigned char a_dynamic:1;      /* A __DYNAMIC is in this image */
        unsigned char a_toolversion:7;
        unsigned char a_toolversion:7;
        unsigned char a_machtype;
        unsigned char a_machtype;
        unsigned short a_info;
        unsigned short a_info;
        unsigned long a_text;           /* length of text, in bytes */
        unsigned long a_text;           /* length of text, in bytes */
        unsigned long a_data;           /* length of data, in bytes */
        unsigned long a_data;           /* length of data, in bytes */
        unsigned long a_bss;            /* length of bss, in bytes */
        unsigned long a_bss;            /* length of bss, in bytes */
        unsigned long a_syms;           /* length of symbol table, in bytes */
        unsigned long a_syms;           /* length of symbol table, in bytes */
        unsigned long a_entry;          /* where program begins */
        unsigned long a_entry;          /* where program begins */
        unsigned long a_trsize;
        unsigned long a_trsize;
        unsigned long a_drsize;
        unsigned long a_drsize;
};
};
 
 
/* Where in the file does the text information begin? */
/* Where in the file does the text information begin? */
#define N_TXTOFF(x)     (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
#define N_TXTOFF(x)     (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
 
 
/* Where do the Symbols start? */
/* Where do the Symbols start? */
#define N_SYMOFF(x)     (N_TXTOFF(x) + (x).a_text +   \
#define N_SYMOFF(x)     (N_TXTOFF(x) + (x).a_text +   \
                         (x).a_data + (x).a_trsize +  \
                         (x).a_data + (x).a_trsize +  \
                         (x).a_drsize)
                         (x).a_drsize)
 
 
/* Where does text segment go in memory after being loaded? */
/* Where does text segment go in memory after being loaded? */
#define N_TXTADDR(x)    (((N_MAGIC(x) == ZMAGIC) &&        \
#define N_TXTADDR(x)    (((N_MAGIC(x) == ZMAGIC) &&        \
                         ((x).a_entry < SPARC_PGSIZE)) ?   \
                         ((x).a_entry < SPARC_PGSIZE)) ?   \
                          0 : SPARC_PGSIZE)
                          0 : SPARC_PGSIZE)
 
 
/* And same for the data segment.. */
/* And same for the data segment.. */
#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ?         \
#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ?         \
                      (N_TXTADDR(x) + (x).a_text)  \
                      (N_TXTADDR(x) + (x).a_text)  \
                       : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
                       : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
 
 
#define N_TRSIZE(a)     ((a).a_trsize)
#define N_TRSIZE(a)     ((a).a_trsize)
#define N_DRSIZE(a)     ((a).a_drsize)
#define N_DRSIZE(a)     ((a).a_drsize)
#define N_SYMSIZE(a)    ((a).a_syms)
#define N_SYMSIZE(a)    ((a).a_syms)
 
 
#ifdef __KERNEL__
#ifdef __KERNEL__
 
 
#define STACK_TOP       TASK_SIZE
#define STACK_TOP       TASK_SIZE
 
 
#endif
#endif
 
 
#endif /* __SPARC_A_OUT_H__ */
#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.