Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
359 | serge | 1 | /**************************************************************************** |
2 | * |
||
3 | * Open Watcom Project |
||
4 | * |
||
5 | * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. |
||
6 | * |
||
7 | * ======================================================================== |
||
8 | * |
||
9 | * This file contains Original Code and/or Modifications of Original |
||
10 | * Code as defined in and that are subject to the Sybase Open Watcom |
||
11 | * Public License version 1.0 (the 'License'). You may not use this file |
||
12 | * except in compliance with the License. BY USING THIS FILE YOU AGREE TO |
||
13 | * ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is |
||
14 | * provided with the Original Code and Modifications, and is also |
||
15 | * available at www.sybase.com/developer/opensource. |
||
16 | * |
||
17 | * The Original Code and all software distributed under the License are |
||
18 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
||
19 | * EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM |
||
20 | * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
||
21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR |
||
22 | * NON-INFRINGEMENT. Please see the License for the specific language |
||
23 | * governing rights and limitations under the License. |
||
24 | * |
||
25 | * ======================================================================== |
||
26 | * |
||
27 | * Description: Establish common stuff for a target environment for |
||
28 | * language-related processors. |
||
29 | * |
||
30 | ****************************************************************************/ |
||
31 | |||
32 | |||
33 | #ifndef __LANGENV_H__ |
||
34 | #define __LANGENV_H__ |
||
35 | |||
36 | // This file uses __TGT_SYS to figure out the required target. |
||
37 | // |
||
38 | // langenvd.h contains the possible values. |
||
39 | // |
||
40 | // __TGT_SYS_X86 is the default |
||
41 | // |
||
42 | |||
43 | #include "langenvd.h" |
||
44 | |||
45 | #ifndef __TGT_SYS |
||
46 | #define __TGT_SYS __TGT_SYS_X86 |
||
47 | #endif |
||
48 | |||
49 | #if __TGT_SYS == __TGT_SYS_X86 |
||
50 | |||
51 | #define TS_SEG_CODE "_TEXT" |
||
52 | #define TS_SEG_CONST "CONST" |
||
53 | #define TS_SEG_CONST2 "CONST2" |
||
54 | #define TS_SEG_DATA "_DATA" |
||
55 | #define TS_SEG_TIB "TIB" |
||
56 | #define TS_SEG_TI "TI" |
||
57 | #define TS_SEG_TIE "TIE" |
||
58 | #define TS_SEG_XIB "XIB" |
||
59 | #define TS_SEG_XI "XI" |
||
60 | #define TS_SEG_XIE "XIE" |
||
61 | #define TS_SEG_YIB "YIB" |
||
62 | #define TS_SEG_YI "YI" |
||
63 | #define TS_SEG_YIE "YIE" |
||
64 | #define TS_SEG_YC "YC" |
||
65 | #define TS_SEG_BSS "_BSS" |
||
66 | #define TS_SEG_STACK "STACK" |
||
67 | #define TS_SEG_DEPENDS "not used" |
||
68 | #define TS_SEG_TLSB ".tls" |
||
69 | #define TS_SEG_TLS ".tls$" |
||
70 | #define TS_SEG_TLSE ".tls$ZZZ" |
||
71 | #define TS_SEG_TLS_CLASS "TLS" |
||
72 | |||
73 | #define TS_MAX_OBJNAME 256 |
||
74 | #define TS_DATA_MANGLE "_*" |
||
75 | #define TS_CODE_MANGLE "*_" |
||
76 | |||
77 | #elif __TGT_SYS == __TGT_SYS_AXP_NT || __TGT_SYS == __TGT_SYS_PPC_NT || __TGT_SYS == __TGT_SYS_MIPS |
||
78 | |||
79 | #define TS_SEG_CODE ".text" |
||
80 | #define TS_SEG_CONST ".const" |
||
81 | #define TS_SEG_CONST2 ".const2" |
||
82 | #define TS_SEG_DATA ".data" |
||
83 | #define TS_SEG_TIB ".rtl$tib" |
||
84 | #define TS_SEG_TI ".rtl$tid" |
||
85 | #define TS_SEG_TIE ".rtl$tie" |
||
86 | #define TS_SEG_XIB ".rtl$xib" |
||
87 | #define TS_SEG_XI ".rtl$xid" |
||
88 | #define TS_SEG_XIE ".rtl$xie" |
||
89 | #define TS_SEG_YIB ".rtl$yib" |
||
90 | #define TS_SEG_YI ".rtl$yid" |
||
91 | #define TS_SEG_YIE ".rtl$yie" |
||
92 | #define TS_SEG_YC ".rtl$yc" |
||
93 | #define TS_SEG_BSS ".bss" |
||
94 | #define TS_SEG_STACK ".stack" |
||
95 | #define TS_SEG_DEPENDS ".depend" |
||
96 | #define TS_SEG_TLSB ".tls" |
||
97 | #define TS_SEG_TLS ".tls$" |
||
98 | #define TS_SEG_TLSE ".tls$ZZZ" |
||
99 | #define TS_SEG_TLS_CLASS NULL |
||
100 | |||
101 | #define TS_MAX_OBJNAME 1024 |
||
102 | #define TS_DATA_MANGLE "*" |
||
103 | #define TS_CODE_MANGLE "*" |
||
104 | |||
105 | #else |
||
106 | |||
107 | #error Invalid target system |
||
108 | |||
109 | #endif |
||
110 | |||
111 | #undef __TGT_SYS |
||
112 | |||
113 | #endif |