~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/asm-sparc64/a.out.h

Version: ~ [ linux-6.4-rc3 ] ~ [ linux-6.3.4 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.30 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.113 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.180 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.243 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.283 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.315 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* $Id: a.out.h,v 1.8 2002/02/09 19:49:31 davem Exp $ */
  2 #ifndef __SPARC64_A_OUT_H__
  3 #define __SPARC64_A_OUT_H__
  4 
  5 #define SPARC_PGSIZE    0x2000        /* Thanks to the sun4 architecture... */
  6 #define SEGMENT_SIZE    SPARC_PGSIZE  /* whee... */
  7 
  8 #ifndef __ASSEMBLY__
  9 
 10 struct exec {
 11         unsigned char a_dynamic:1;      /* A __DYNAMIC is in this image */
 12         unsigned char a_toolversion:7;
 13         unsigned char a_machtype;
 14         unsigned short a_info;
 15         unsigned int a_text;            /* length of text, in bytes */
 16         unsigned int a_data;            /* length of data, in bytes */
 17         unsigned int a_bss;             /* length of bss, in bytes */
 18         unsigned int a_syms;            /* length of symbol table, in bytes */
 19         unsigned int a_entry;           /* where program begins */
 20         unsigned int a_trsize;
 21         unsigned int a_drsize;
 22 };
 23 
 24 #endif /* !__ASSEMBLY__ */
 25 
 26 /* Where in the file does the text information begin? */
 27 #define N_TXTOFF(x)     (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
 28 
 29 /* Where do the Symbols start? */
 30 #define N_SYMOFF(x)     (N_TXTOFF(x) + (x).a_text +   \
 31                          (x).a_data + (x).a_trsize +  \
 32                          (x).a_drsize)
 33 
 34 /* Where does text segment go in memory after being loaded? */
 35 #define N_TXTADDR(x)    (unsigned long)(((N_MAGIC(x) == ZMAGIC) &&      \
 36                          ((x).a_entry < SPARC_PGSIZE)) ?                \
 37                           0 : SPARC_PGSIZE)
 38 
 39 /* And same for the data segment.. */
 40 #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ?         \
 41                       (N_TXTADDR(x) + (x).a_text)  \
 42                        : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
 43 
 44 #define N_TRSIZE(a)     ((a).a_trsize)
 45 #define N_DRSIZE(a)     ((a).a_drsize)
 46 #define N_SYMSIZE(a)    ((a).a_syms)
 47 
 48 #ifndef __ASSEMBLY__
 49 
 50 /*
 51  * Sparc relocation types
 52  */
 53 enum reloc_type
 54 {
 55         RELOC_8,
 56         RELOC_16,
 57         RELOC_32,       /* simplest relocs */
 58         RELOC_DISP8,
 59         RELOC_DISP16,
 60         RELOC_DISP32,   /* Disp's (pc-rel) */
 61         RELOC_WDISP30,
 62         RELOC_WDISP22,  /* SR word disp's */
 63         RELOC_HI22,
 64         RELOC_22,       /* SR 22-bit relocs */
 65         RELOC_13,
 66         RELOC_LO10,     /* SR 13&10-bit relocs */
 67         RELOC_SFA_BASE,
 68         RELOC_SFA_OFF13, /* SR S.F.A. relocs */
 69         RELOC_BASE10,
 70         RELOC_BASE13,
 71         RELOC_BASE22,   /* base_relative pic */
 72         RELOC_PC10,
 73         RELOC_PC22,     /* special pc-rel pic */
 74         RELOC_JMP_TBL,  /* jmp_tbl_rel in pic */
 75         RELOC_SEGOFF16, /* ShLib offset-in-seg */
 76         RELOC_GLOB_DAT,
 77         RELOC_JMP_SLOT,
 78         RELOC_RELATIVE  /* rtld relocs */
 79 };
 80 
 81 /*
 82  * Format of a relocation datum.
 83  */
 84 struct relocation_info /* used when header.a_machtype == M_SPARC */
 85 {
 86         unsigned int    r_address;  /* relocation addr */
 87         unsigned int    r_index:24; /* segment index or symbol index */
 88         unsigned int    r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */
 89         int             r_pad:2;    /* <unused> */
 90         enum reloc_type r_type:5;   /* type of relocation to perform */
 91         int             r_addend;   /* addend for relocation value */
 92 };
 93 
 94 #define N_RELOCATION_INFO_DECLARED 1
 95 
 96 #ifdef __KERNEL__
 97 
 98 #define STACK_TOP (test_thread_flag(TIF_32BIT) ? 0xf0000000 : 0x80000000000L)
 99 
100 #endif
101 
102 #endif /* !(__ASSEMBLY__) */
103 
104 #endif /* !(__SPARC64_A_OUT_H__) */
105 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp