···11-/* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */21#ifndef __SPARC_A_OUT_H__32#define __SPARC_A_OUT_H__4354#define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */65#define SEGMENT_SIZE SPARC_PGSIZE /* whee... */7677+#ifndef __ASSEMBLY__88+89struct exec {910 unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */1011 unsigned char a_toolversion:7;1112 unsigned char a_machtype;1213 unsigned short a_info;1313- unsigned long a_text; /* length of text, in bytes */1414- unsigned long a_data; /* length of data, in bytes */1515- unsigned long a_bss; /* length of bss, in bytes */1616- unsigned long a_syms; /* length of symbol table, in bytes */1717- unsigned long a_entry; /* where program begins */1818- unsigned long a_trsize;1919- unsigned long a_drsize;1414+ unsigned int a_text; /* length of text, in bytes */1515+ unsigned int a_data; /* length of data, in bytes */1616+ unsigned int a_bss; /* length of bss, in bytes */1717+ unsigned int a_syms; /* length of symbol table, in bytes */1818+ unsigned int a_entry; /* where program begins */1919+ unsigned int a_trsize;2020+ unsigned int a_drsize;2021};2222+2323+#endif /* !__ASSEMBLY__ */21242225/* Where in the file does the text information begin? */2326#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))···3128 (x).a_drsize)32293330/* Where does text segment go in memory after being loaded? */3434-#define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \3131+#define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \3532 ((x).a_entry < SPARC_PGSIZE)) ? \3633 0 : SPARC_PGSIZE)37343835/* And same for the data segment.. */3936#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \4037 (N_TXTADDR(x) + (x).a_text) \4141- : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))3838+ : (unsigned long) (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))42394340#define N_TRSIZE(a) ((a).a_trsize)4441#define N_DRSIZE(a) ((a).a_drsize)4542#define N_SYMSIZE(a) ((a).a_syms)4343+4444+#ifndef __ASSEMBLY__46454746/*4847 * Sparc relocation types···8277 */8378struct relocation_info /* used when header.a_machtype == M_SPARC */8479{8585- unsigned long r_address; /* relocation addr */8080+ unsigned int r_address; /* relocation addr */8681 unsigned int r_index:24; /* segment index or symbol index */8782 unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */8883 unsigned int r_pad:2; /* <unused> */8984 enum reloc_type r_type:5; /* type of relocation to perform */9090- long r_addend; /* addend for relocation value */8585+ int r_addend; /* addend for relocation value */9186};92879388#define N_RELOCATION_INFO_DECLARED 18989+9090+#endif /* !(__ASSEMBLY__) */94919592#endif /* __SPARC_A_OUT_H__ */
+1-98
include/asm-sparc64/a.out.h
···11-/* $Id: a.out.h,v 1.8 2002/02/09 19:49:31 davem Exp $ */22-#ifndef __SPARC64_A_OUT_H__33-#define __SPARC64_A_OUT_H__44-55-#define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */66-#define SEGMENT_SIZE SPARC_PGSIZE /* whee... */77-88-#ifndef __ASSEMBLY__99-1010-struct exec {1111- unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */1212- unsigned char a_toolversion:7;1313- unsigned char a_machtype;1414- unsigned short a_info;1515- unsigned int a_text; /* length of text, in bytes */1616- unsigned int a_data; /* length of data, in bytes */1717- unsigned int a_bss; /* length of bss, in bytes */1818- unsigned int a_syms; /* length of symbol table, in bytes */1919- unsigned int a_entry; /* where program begins */2020- unsigned int a_trsize;2121- unsigned int a_drsize;2222-};2323-2424-#endif /* !__ASSEMBLY__ */2525-2626-/* Where in the file does the text information begin? */2727-#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))2828-2929-/* Where do the Symbols start? */3030-#define N_SYMOFF(x) (N_TXTOFF(x) + (x).a_text + \3131- (x).a_data + (x).a_trsize + \3232- (x).a_drsize)3333-3434-/* Where does text segment go in memory after being loaded? */3535-#define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \3636- ((x).a_entry < SPARC_PGSIZE)) ? \3737- 0 : SPARC_PGSIZE)3838-3939-/* And same for the data segment.. */4040-#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \4141- (N_TXTADDR(x) + (x).a_text) \4242- : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))4343-4444-#define N_TRSIZE(a) ((a).a_trsize)4545-#define N_DRSIZE(a) ((a).a_drsize)4646-#define N_SYMSIZE(a) ((a).a_syms)4747-4848-#ifndef __ASSEMBLY__4949-5050-/*5151- * Sparc relocation types5252- */5353-enum reloc_type5454-{5555- RELOC_8,5656- RELOC_16,5757- RELOC_32, /* simplest relocs */5858- RELOC_DISP8,5959- RELOC_DISP16,6060- RELOC_DISP32, /* Disp's (pc-rel) */6161- RELOC_WDISP30,6262- RELOC_WDISP22, /* SR word disp's */6363- RELOC_HI22,6464- RELOC_22, /* SR 22-bit relocs */6565- RELOC_13,6666- RELOC_LO10, /* SR 13&10-bit relocs */6767- RELOC_SFA_BASE,6868- RELOC_SFA_OFF13, /* SR S.F.A. relocs */6969- RELOC_BASE10,7070- RELOC_BASE13,7171- RELOC_BASE22, /* base_relative pic */7272- RELOC_PC10,7373- RELOC_PC22, /* special pc-rel pic */7474- RELOC_JMP_TBL, /* jmp_tbl_rel in pic */7575- RELOC_SEGOFF16, /* ShLib offset-in-seg */7676- RELOC_GLOB_DAT,7777- RELOC_JMP_SLOT,7878- RELOC_RELATIVE /* rtld relocs */7979-};8080-8181-/*8282- * Format of a relocation datum.8383- */8484-struct relocation_info /* used when header.a_machtype == M_SPARC */8585-{8686- unsigned int r_address; /* relocation addr */8787- unsigned int r_index:24; /* segment index or symbol index */8888- unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */8989- unsigned int r_pad:2; /* <unused> */9090- enum reloc_type r_type:5; /* type of relocation to perform */9191- int r_addend; /* addend for relocation value */9292-};9393-9494-#define N_RELOCATION_INFO_DECLARED 19595-9696-#endif /* !(__ASSEMBLY__) */9797-9898-#endif /* !(__SPARC64_A_OUT_H__) */11+#include <asm-sparc/a.out.h>