| 1 | /* Intel ix86 running OS/2 or DOS */ | 
|---|
| 2 |  | 
|---|
| 3 | #ifndef __I386EMX__H__ | 
|---|
| 4 | #define __I386EMX__H__ | 
|---|
| 5 |  | 
|---|
| 6 | #define EMX | 
|---|
| 7 |  | 
|---|
| 8 | #define HOST_PAGE_SIZE          0x1000 | 
|---|
| 9 | #define HOST_SEGMENT_SIZE       0x10000 | 
|---|
| 10 | #define HOST_TEXT_START_ADDR    0x10000 | 
|---|
| 11 | #define HOST_STACK_END_ADDR     0x80000000 | 
|---|
| 12 |  | 
|---|
| 13 | #ifndef TEXT_START_ADDR /* bird: does this need to be BFD wide? */ | 
|---|
| 14 | #define TEXT_START_ADDR         0x10000 | 
|---|
| 15 | #endif | 
|---|
| 16 |  | 
|---|
| 17 | #define NO_CORE_COMMAND | 
|---|
| 18 |  | 
|---|
| 19 | #if 0 /* moved to i386aoutemx.c */ | 
|---|
| 20 |  | 
|---|
| 21 | #define DEFAULT_ARCH            bfd_arch_i386 | 
|---|
| 22 |  | 
|---|
| 23 | #define TARGET_PAGE_SIZE        0x1000 | 
|---|
| 24 | #define TARGET_SEGMENT_SIZE     0x10000 | 
|---|
| 25 | #define TARGET_STACK_END_ADDR   0x80000000 | 
|---|
| 26 |  | 
|---|
| 27 | #define ZMAGIC_DISK_BLOCK_SIZE  1024 | 
|---|
| 28 | #define BYTES_IN_WORD           4 | 
|---|
| 29 |  | 
|---|
| 30 | #define MY(OP)                  CONCAT2(i386aout_emx_,OP) | 
|---|
| 31 | #define TARGETNAME              "a.out-emx" | 
|---|
| 32 | #define NO_WRITE_HEADER_KLUDGE  1 | 
|---|
| 33 |  | 
|---|
| 34 | #define N_HEADER_IN_TEXT(x) 0 | 
|---|
| 35 |  | 
|---|
| 36 | #define N_TXTOFF(x)     \ | 
|---|
| 37 | (N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : /* object file or NMAGIC */\ | 
|---|
| 38 | N_SHARED_LIB(x) ? 0 : \ | 
|---|
| 39 | N_HEADER_IN_TEXT(x) ?      \ | 
|---|
| 40 | EXEC_BYTES_SIZE :                   /* no padding */\ | 
|---|
| 41 | 0x400 + (x).a_hdrofs \ | 
|---|
| 42 | ) | 
|---|
| 43 |  | 
|---|
| 44 | #define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x)) | 
|---|
| 45 |  | 
|---|
| 46 | #endif /* moved to i386aoutemx.c */ | 
|---|
| 47 |  | 
|---|
| 48 | /* a.out executables emx-specific header */ | 
|---|
| 49 | struct exec                     /* bird: should this be BFD wide or only for the emx target? */ | 
|---|
| 50 | { | 
|---|
| 51 | unsigned long a_info;         /* Use macros N_MAGIC, etc for access */ | 
|---|
| 52 | unsigned a_text;              /* length of text, in bytes */ | 
|---|
| 53 | unsigned a_data;              /* length of data, in bytes */ | 
|---|
| 54 | unsigned a_bss;               /* length of uninitialized data area for file, in bytes */ | 
|---|
| 55 | unsigned a_syms;              /* length of symbol table data in file, in bytes */ | 
|---|
| 56 | unsigned a_entry;             /* start address */ | 
|---|
| 57 | unsigned a_trsize;            /* length of relocation info for text, in bytes */ | 
|---|
| 58 | unsigned a_drsize;            /* length of relocation info for data, in bytes */ | 
|---|
| 59 | }; | 
|---|
| 60 |  | 
|---|
| 61 | /* bird: should this be BFD wide or only for the emx target? */ | 
|---|
| 62 | #define IS_STAB(flags) (((flags) & N_STAB) \ | 
|---|
| 63 | && (flags) != (N_IMP1|N_EXT) && (flags) != (N_IMP2|N_EXT) \ | 
|---|
| 64 | && ((flags) & ~N_EXT) != N_EXP) | 
|---|
| 65 |  | 
|---|
| 66 | #endif /* __I386EMX__H__ */ | 
|---|