diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sparc/a.out.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-sparc/a.out.h')
-rw-r--r-- | include/asm-sparc/a.out.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h new file mode 100644 index 000000000000..e4e83eb0161e --- /dev/null +++ b/include/asm-sparc/a.out.h | |||
@@ -0,0 +1,98 @@ | |||
1 | /* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton 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 | 0 : SPARC_PGSIZE) | ||
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 | /* | ||
45 | * Sparc relocation types | ||
46 | */ | ||
47 | enum reloc_type | ||
48 | { | ||
49 | RELOC_8, | ||
50 | RELOC_16, | ||
51 | RELOC_32, /* simplest relocs */ | ||
52 | RELOC_DISP8, | ||
53 | RELOC_DISP16, | ||
54 | RELOC_DISP32, /* Disp's (pc-rel) */ | ||
55 | RELOC_WDISP30, | ||
56 | RELOC_WDISP22, /* SR word disp's */ | ||
57 | RELOC_HI22, | ||
58 | RELOC_22, /* SR 22-bit relocs */ | ||
59 | RELOC_13, | ||
60 | RELOC_LO10, /* SR 13&10-bit relocs */ | ||
61 | RELOC_SFA_BASE, | ||
62 | RELOC_SFA_OFF13, /* SR S.F.A. relocs */ | ||
63 | RELOC_BASE10, | ||
64 | RELOC_BASE13, | ||
65 | RELOC_BASE22, /* base_relative pic */ | ||
66 | RELOC_PC10, | ||
67 | RELOC_PC22, /* special pc-rel pic */ | ||
68 | RELOC_JMP_TBL, /* jmp_tbl_rel in pic */ | ||
69 | RELOC_SEGOFF16, /* ShLib offset-in-seg */ | ||
70 | RELOC_GLOB_DAT, | ||
71 | RELOC_JMP_SLOT, | ||
72 | RELOC_RELATIVE /* rtld relocs */ | ||
73 | }; | ||
74 | |||
75 | /* | ||
76 | * Format of a relocation datum. | ||
77 | */ | ||
78 | struct relocation_info /* used when header.a_machtype == M_SPARC */ | ||
79 | { | ||
80 | unsigned long r_address; /* relocation addr */ | ||
81 | unsigned int r_index:24; /* segment index or symbol index */ | ||
82 | unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ | ||
83 | int r_pad:2; /* <unused> */ | ||
84 | enum reloc_type r_type:5; /* type of relocation to perform */ | ||
85 | long r_addend; /* addend for relocation value */ | ||
86 | }; | ||
87 | |||
88 | #define N_RELOCATION_INFO_DECLARED 1 | ||
89 | |||
90 | #ifdef __KERNEL__ | ||
91 | |||
92 | #include <asm/page.h> | ||
93 | |||
94 | #define STACK_TOP (PAGE_OFFSET - PAGE_SIZE) | ||
95 | |||
96 | #endif /* __KERNEL__ */ | ||
97 | |||
98 | #endif /* __SPARC_A_OUT_H__ */ | ||