aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-02-10 01:25:50 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-10 01:25:50 -0500
commit344e53f562e21ab14734a482042713555a628d39 (patch)
tree7686bc46305e735af96563f99b80fc5d35398b32 /include/asm-sparc
parent9f747d6c4724dd3afa7d3525f6dd5300fc1633c5 (diff)
[SPARC]: Merge asm-sparc{,64}/a.out.h
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc')
-rw-r--r--include/asm-sparc/a.out.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h
index 744cfe6c0de8..2f1c3748a068 100644
--- a/include/asm-sparc/a.out.h
+++ b/include/asm-sparc/a.out.h
@@ -1,24 +1,27 @@
1/* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */
2#ifndef __SPARC_A_OUT_H__ 1#ifndef __SPARC_A_OUT_H__
3#define __SPARC_A_OUT_H__ 2#define __SPARC_A_OUT_H__
4 3
5#define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ 4#define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */
6#define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ 5#define SEGMENT_SIZE SPARC_PGSIZE /* whee... */
7 6
7#ifndef __ASSEMBLY__
8
8struct exec { 9struct exec {
9 unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ 10 unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */
10 unsigned char a_toolversion:7; 11 unsigned char a_toolversion:7;
11 unsigned char a_machtype; 12 unsigned char a_machtype;
12 unsigned short a_info; 13 unsigned short a_info;
13 unsigned long a_text; /* length of text, in bytes */ 14 unsigned int a_text; /* length of text, in bytes */
14 unsigned long a_data; /* length of data, in bytes */ 15 unsigned int a_data; /* length of data, in bytes */
15 unsigned long a_bss; /* length of bss, in bytes */ 16 unsigned int a_bss; /* length of bss, in bytes */
16 unsigned long a_syms; /* length of symbol table, in bytes */ 17 unsigned int a_syms; /* length of symbol table, in bytes */
17 unsigned long a_entry; /* where program begins */ 18 unsigned int a_entry; /* where program begins */
18 unsigned long a_trsize; 19 unsigned int a_trsize;
19 unsigned long a_drsize; 20 unsigned int a_drsize;
20}; 21};
21 22
23#endif /* !__ASSEMBLY__ */
24
22/* Where in the file does the text information begin? */ 25/* Where in the file does the text information begin? */
23#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) 26#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
24 27
@@ -28,19 +31,21 @@ struct exec {
28 (x).a_drsize) 31 (x).a_drsize)
29 32
30/* Where does text segment go in memory after being loaded? */ 33/* Where does text segment go in memory after being loaded? */
31#define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \ 34#define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \
32 ((x).a_entry < SPARC_PGSIZE)) ? \ 35 ((x).a_entry < SPARC_PGSIZE)) ? \
33 0 : SPARC_PGSIZE) 36 0 : SPARC_PGSIZE)
34 37
35/* And same for the data segment.. */ 38/* And same for the data segment.. */
36#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ 39#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \
37 (N_TXTADDR(x) + (x).a_text) \ 40 (N_TXTADDR(x) + (x).a_text) \
38 : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) 41 : (unsigned long) (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
39 42
40#define N_TRSIZE(a) ((a).a_trsize) 43#define N_TRSIZE(a) ((a).a_trsize)
41#define N_DRSIZE(a) ((a).a_drsize) 44#define N_DRSIZE(a) ((a).a_drsize)
42#define N_SYMSIZE(a) ((a).a_syms) 45#define N_SYMSIZE(a) ((a).a_syms)
43 46
47#ifndef __ASSEMBLY__
48
44/* 49/*
45 * Sparc relocation types 50 * Sparc relocation types
46 */ 51 */
@@ -77,14 +82,16 @@ enum reloc_type
77 */ 82 */
78struct relocation_info /* used when header.a_machtype == M_SPARC */ 83struct relocation_info /* used when header.a_machtype == M_SPARC */
79{ 84{
80 unsigned long r_address; /* relocation addr */ 85 unsigned int r_address; /* relocation addr */
81 unsigned int r_index:24; /* segment index or symbol index */ 86 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 */ 87 unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */
83 unsigned int r_pad:2; /* <unused> */ 88 unsigned int r_pad:2; /* <unused> */
84 enum reloc_type r_type:5; /* type of relocation to perform */ 89 enum reloc_type r_type:5; /* type of relocation to perform */
85 long r_addend; /* addend for relocation value */ 90 int r_addend; /* addend for relocation value */
86}; 91};
87 92
88#define N_RELOCATION_INFO_DECLARED 1 93#define N_RELOCATION_INFO_DECLARED 1
89 94
95#endif /* !(__ASSEMBLY__) */
96
90#endif /* __SPARC_A_OUT_H__ */ 97#endif /* __SPARC_A_OUT_H__ */