blob: e838d726fbb67d5addc0943329105f1608beb750 [file] [log] [blame]
Edward O'Callaghan37a6a452009-08-07 20:30:09 +00001/* ===-- apple_versioning.c - Adds versioning symbols for ld ---------------===
2 *
3 * The LLVM Compiler Infrastructure
4 *
Howard Hinnant9ad441f2010-11-16 22:13:33 +00005 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
Edward O'Callaghan37a6a452009-08-07 20:30:09 +00007 *
8 * ===----------------------------------------------------------------------===
9 */
Daniel Dunbarb3a69012009-06-26 16:47:03 +000010
11
12
13#if __APPLE__
Nick Kledzik92a6cf52009-09-18 00:09:05 +000014 #if __arm__
15 #define NOT_HERE_BEFORE_10_6(sym)
16 #elif __ppc__
Daniel Dunbarb3a69012009-06-26 16:47:03 +000017 #define NOT_HERE_BEFORE_10_6(sym) \
18 extern const char sym##_tmp3 __asm("$ld$hide$os10.3$_" #sym ); \
19 __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \
20 extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \
21 __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
22 extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \
23 __attribute__((visibility("default"))) const char sym##_tmp5 = 0;
24 #else
25 #define NOT_HERE_BEFORE_10_6(sym) \
26 extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \
27 __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
28 extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \
29 __attribute__((visibility("default"))) const char sym##_tmp5 = 0;
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +000030 #endif /* __ppc__ */
Daniel Dunbarb3a69012009-06-26 16:47:03 +000031
32
Edward O'Callaghan37a6a452009-08-07 20:30:09 +000033/* Symbols in libSystem.dylib in 10.6 and later,
34 * but are in libgcc_s.dylib in earlier versions
35 */
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +000036
Daniel Dunbarb3a69012009-06-26 16:47:03 +000037NOT_HERE_BEFORE_10_6(__absvdi2)
38NOT_HERE_BEFORE_10_6(__absvsi2)
39NOT_HERE_BEFORE_10_6(__absvti2)
40NOT_HERE_BEFORE_10_6(__addvdi3)
41NOT_HERE_BEFORE_10_6(__addvsi3)
42NOT_HERE_BEFORE_10_6(__addvti3)
43NOT_HERE_BEFORE_10_6(__ashldi3)
44NOT_HERE_BEFORE_10_6(__ashlti3)
45NOT_HERE_BEFORE_10_6(__ashrdi3)
46NOT_HERE_BEFORE_10_6(__ashrti3)
47NOT_HERE_BEFORE_10_6(__clear_cache)
48NOT_HERE_BEFORE_10_6(__clzdi2)
49NOT_HERE_BEFORE_10_6(__clzsi2)
50NOT_HERE_BEFORE_10_6(__clzti2)
51NOT_HERE_BEFORE_10_6(__cmpdi2)
52NOT_HERE_BEFORE_10_6(__cmpti2)
53NOT_HERE_BEFORE_10_6(__ctzdi2)
54NOT_HERE_BEFORE_10_6(__ctzsi2)
55NOT_HERE_BEFORE_10_6(__ctzti2)
56NOT_HERE_BEFORE_10_6(__divdc3)
57NOT_HERE_BEFORE_10_6(__divdi3)
58NOT_HERE_BEFORE_10_6(__divsc3)
59NOT_HERE_BEFORE_10_6(__divtc3)
60NOT_HERE_BEFORE_10_6(__divti3)
61NOT_HERE_BEFORE_10_6(__divxc3)
62NOT_HERE_BEFORE_10_6(__enable_execute_stack)
63NOT_HERE_BEFORE_10_6(__ffsdi2)
64NOT_HERE_BEFORE_10_6(__ffsti2)
65NOT_HERE_BEFORE_10_6(__fixdfdi)
66NOT_HERE_BEFORE_10_6(__fixdfti)
67NOT_HERE_BEFORE_10_6(__fixsfdi)
68NOT_HERE_BEFORE_10_6(__fixsfti)
69NOT_HERE_BEFORE_10_6(__fixtfdi)
70NOT_HERE_BEFORE_10_6(__fixunsdfdi)
71NOT_HERE_BEFORE_10_6(__fixunsdfsi)
72NOT_HERE_BEFORE_10_6(__fixunsdfti)
73NOT_HERE_BEFORE_10_6(__fixunssfdi)
74NOT_HERE_BEFORE_10_6(__fixunssfsi)
75NOT_HERE_BEFORE_10_6(__fixunssfti)
76NOT_HERE_BEFORE_10_6(__fixunstfdi)
77NOT_HERE_BEFORE_10_6(__fixunsxfdi)
78NOT_HERE_BEFORE_10_6(__fixunsxfsi)
79NOT_HERE_BEFORE_10_6(__fixunsxfti)
80NOT_HERE_BEFORE_10_6(__fixxfdi)
81NOT_HERE_BEFORE_10_6(__fixxfti)
82NOT_HERE_BEFORE_10_6(__floatdidf)
83NOT_HERE_BEFORE_10_6(__floatdisf)
84NOT_HERE_BEFORE_10_6(__floatditf)
85NOT_HERE_BEFORE_10_6(__floatdixf)
86NOT_HERE_BEFORE_10_6(__floattidf)
87NOT_HERE_BEFORE_10_6(__floattisf)
88NOT_HERE_BEFORE_10_6(__floattixf)
89NOT_HERE_BEFORE_10_6(__floatundidf)
90NOT_HERE_BEFORE_10_6(__floatundisf)
91NOT_HERE_BEFORE_10_6(__floatunditf)
92NOT_HERE_BEFORE_10_6(__floatundixf)
93NOT_HERE_BEFORE_10_6(__floatuntidf)
94NOT_HERE_BEFORE_10_6(__floatuntisf)
95NOT_HERE_BEFORE_10_6(__floatuntixf)
96NOT_HERE_BEFORE_10_6(__gcc_personality_v0)
97NOT_HERE_BEFORE_10_6(__lshrdi3)
98NOT_HERE_BEFORE_10_6(__lshrti3)
99NOT_HERE_BEFORE_10_6(__moddi3)
100NOT_HERE_BEFORE_10_6(__modti3)
101NOT_HERE_BEFORE_10_6(__muldc3)
102NOT_HERE_BEFORE_10_6(__muldi3)
103NOT_HERE_BEFORE_10_6(__mulsc3)
104NOT_HERE_BEFORE_10_6(__multc3)
105NOT_HERE_BEFORE_10_6(__multi3)
106NOT_HERE_BEFORE_10_6(__mulvdi3)
107NOT_HERE_BEFORE_10_6(__mulvsi3)
108NOT_HERE_BEFORE_10_6(__mulvti3)
109NOT_HERE_BEFORE_10_6(__mulxc3)
110NOT_HERE_BEFORE_10_6(__negdi2)
111NOT_HERE_BEFORE_10_6(__negti2)
112NOT_HERE_BEFORE_10_6(__negvdi2)
113NOT_HERE_BEFORE_10_6(__negvsi2)
114NOT_HERE_BEFORE_10_6(__negvti2)
115NOT_HERE_BEFORE_10_6(__paritydi2)
116NOT_HERE_BEFORE_10_6(__paritysi2)
117NOT_HERE_BEFORE_10_6(__parityti2)
118NOT_HERE_BEFORE_10_6(__popcountdi2)
119NOT_HERE_BEFORE_10_6(__popcountsi2)
120NOT_HERE_BEFORE_10_6(__popcountti2)
121NOT_HERE_BEFORE_10_6(__powidf2)
122NOT_HERE_BEFORE_10_6(__powisf2)
123NOT_HERE_BEFORE_10_6(__powitf2)
124NOT_HERE_BEFORE_10_6(__powixf2)
125NOT_HERE_BEFORE_10_6(__subvdi3)
126NOT_HERE_BEFORE_10_6(__subvsi3)
127NOT_HERE_BEFORE_10_6(__subvti3)
128NOT_HERE_BEFORE_10_6(__ucmpdi2)
129NOT_HERE_BEFORE_10_6(__ucmpti2)
130NOT_HERE_BEFORE_10_6(__udivdi3)
131NOT_HERE_BEFORE_10_6(__udivmoddi4)
132NOT_HERE_BEFORE_10_6(__udivmodti4)
133NOT_HERE_BEFORE_10_6(__udivti3)
134NOT_HERE_BEFORE_10_6(__umoddi3)
135NOT_HERE_BEFORE_10_6(__umodti3)
136
137
138#if __ppc__
139NOT_HERE_BEFORE_10_6(__gcc_qadd)
140NOT_HERE_BEFORE_10_6(__gcc_qdiv)
141NOT_HERE_BEFORE_10_6(__gcc_qmul)
142NOT_HERE_BEFORE_10_6(__gcc_qsub)
143NOT_HERE_BEFORE_10_6(__trampoline_setup)
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +0000144#endif /* __ppc__ */
Daniel Dunbarb3a69012009-06-26 16:47:03 +0000145
Nick Kledzik4a3467b2011-04-14 00:40:20 +0000146#if __arm__ && __DYNAMIC__
Nick Kledzik7e9cd712011-04-12 21:22:48 +0000147 #define NOT_HERE_UNTIL_AFTER_4_3(sym) \
Nick Kledzikbb301ce2011-04-12 21:11:47 +0000148 extern const char sym##_tmp1 __asm("$ld$hide$os3.0$_" #sym ); \
149 __attribute__((visibility("default"))) const char sym##_tmp1 = 0; \
150 extern const char sym##_tmp2 __asm("$ld$hide$os3.1$_" #sym ); \
151 __attribute__((visibility("default"))) const char sym##_tmp2 = 0; \
152 extern const char sym##_tmp3 __asm("$ld$hide$os3.2$_" #sym ); \
153 __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \
154 extern const char sym##_tmp4 __asm("$ld$hide$os4.0$_" #sym ); \
155 __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
156 extern const char sym##_tmp5 __asm("$ld$hide$os4.1$_" #sym ); \
157 __attribute__((visibility("default"))) const char sym##_tmp5 = 0; \
158 extern const char sym##_tmp6 __asm("$ld$hide$os4.2$_" #sym ); \
159 __attribute__((visibility("default"))) const char sym##_tmp6 = 0; \
160 extern const char sym##_tmp7 __asm("$ld$hide$os4.3$_" #sym ); \
161 __attribute__((visibility("default"))) const char sym##_tmp7 = 0;
162
Nick Kledzik7e9cd712011-04-12 21:22:48 +0000163NOT_HERE_UNTIL_AFTER_4_3(__absvdi2)
164NOT_HERE_UNTIL_AFTER_4_3(__absvsi2)
165NOT_HERE_UNTIL_AFTER_4_3(__adddf3)
166NOT_HERE_UNTIL_AFTER_4_3(__adddf3vfp)
167NOT_HERE_UNTIL_AFTER_4_3(__addsf3)
168NOT_HERE_UNTIL_AFTER_4_3(__addsf3vfp)
169NOT_HERE_UNTIL_AFTER_4_3(__addvdi3)
170NOT_HERE_UNTIL_AFTER_4_3(__addvsi3)
171NOT_HERE_UNTIL_AFTER_4_3(__ashldi3)
172NOT_HERE_UNTIL_AFTER_4_3(__ashrdi3)
173NOT_HERE_UNTIL_AFTER_4_3(__bswapdi2)
174NOT_HERE_UNTIL_AFTER_4_3(__bswapsi2)
175NOT_HERE_UNTIL_AFTER_4_3(__clzdi2)
176NOT_HERE_UNTIL_AFTER_4_3(__clzsi2)
177NOT_HERE_UNTIL_AFTER_4_3(__cmpdi2)
178NOT_HERE_UNTIL_AFTER_4_3(__ctzdi2)
179NOT_HERE_UNTIL_AFTER_4_3(__ctzsi2)
180NOT_HERE_UNTIL_AFTER_4_3(__divdc3)
181NOT_HERE_UNTIL_AFTER_4_3(__divdf3)
182NOT_HERE_UNTIL_AFTER_4_3(__divdf3vfp)
183NOT_HERE_UNTIL_AFTER_4_3(__divdi3)
184NOT_HERE_UNTIL_AFTER_4_3(__divsc3)
185NOT_HERE_UNTIL_AFTER_4_3(__divsf3)
186NOT_HERE_UNTIL_AFTER_4_3(__divsf3vfp)
187NOT_HERE_UNTIL_AFTER_4_3(__divsi3)
188NOT_HERE_UNTIL_AFTER_4_3(__eqdf2)
189NOT_HERE_UNTIL_AFTER_4_3(__eqdf2vfp)
190NOT_HERE_UNTIL_AFTER_4_3(__eqsf2)
191NOT_HERE_UNTIL_AFTER_4_3(__eqsf2vfp)
192NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2)
193NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2vfp)
194NOT_HERE_UNTIL_AFTER_4_3(__ffsdi2)
195NOT_HERE_UNTIL_AFTER_4_3(__fixdfdi)
196NOT_HERE_UNTIL_AFTER_4_3(__fixdfsi)
197NOT_HERE_UNTIL_AFTER_4_3(__fixdfsivfp)
198NOT_HERE_UNTIL_AFTER_4_3(__fixsfdi)
199NOT_HERE_UNTIL_AFTER_4_3(__fixsfsi)
200NOT_HERE_UNTIL_AFTER_4_3(__fixsfsivfp)
201NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfdi)
202NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsi)
203NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsivfp)
204NOT_HERE_UNTIL_AFTER_4_3(__fixunssfdi)
205NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsi)
206NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsivfp)
207NOT_HERE_UNTIL_AFTER_4_3(__floatdidf)
208NOT_HERE_UNTIL_AFTER_4_3(__floatdisf)
209NOT_HERE_UNTIL_AFTER_4_3(__floatsidf)
210NOT_HERE_UNTIL_AFTER_4_3(__floatsidfvfp)
211NOT_HERE_UNTIL_AFTER_4_3(__floatsisf)
212NOT_HERE_UNTIL_AFTER_4_3(__floatsisfvfp)
213NOT_HERE_UNTIL_AFTER_4_3(__floatundidf)
214NOT_HERE_UNTIL_AFTER_4_3(__floatundisf)
215NOT_HERE_UNTIL_AFTER_4_3(__floatunsidf)
216NOT_HERE_UNTIL_AFTER_4_3(__floatunsisf)
217NOT_HERE_UNTIL_AFTER_4_3(__floatunssidfvfp)
218NOT_HERE_UNTIL_AFTER_4_3(__floatunssisfvfp)
219NOT_HERE_UNTIL_AFTER_4_3(__gedf2)
220NOT_HERE_UNTIL_AFTER_4_3(__gedf2vfp)
221NOT_HERE_UNTIL_AFTER_4_3(__gesf2)
222NOT_HERE_UNTIL_AFTER_4_3(__gesf2vfp)
223NOT_HERE_UNTIL_AFTER_4_3(__gtdf2)
224NOT_HERE_UNTIL_AFTER_4_3(__gtdf2vfp)
225NOT_HERE_UNTIL_AFTER_4_3(__gtsf2)
226NOT_HERE_UNTIL_AFTER_4_3(__gtsf2vfp)
227NOT_HERE_UNTIL_AFTER_4_3(__ledf2)
228NOT_HERE_UNTIL_AFTER_4_3(__ledf2vfp)
229NOT_HERE_UNTIL_AFTER_4_3(__lesf2)
230NOT_HERE_UNTIL_AFTER_4_3(__lesf2vfp)
231NOT_HERE_UNTIL_AFTER_4_3(__lshrdi3)
232NOT_HERE_UNTIL_AFTER_4_3(__ltdf2)
233NOT_HERE_UNTIL_AFTER_4_3(__ltdf2vfp)
234NOT_HERE_UNTIL_AFTER_4_3(__ltsf2)
235NOT_HERE_UNTIL_AFTER_4_3(__ltsf2vfp)
236NOT_HERE_UNTIL_AFTER_4_3(__moddi3)
237NOT_HERE_UNTIL_AFTER_4_3(__modsi3)
238NOT_HERE_UNTIL_AFTER_4_3(__muldc3)
239NOT_HERE_UNTIL_AFTER_4_3(__muldf3)
240NOT_HERE_UNTIL_AFTER_4_3(__muldf3vfp)
241NOT_HERE_UNTIL_AFTER_4_3(__muldi3)
242NOT_HERE_UNTIL_AFTER_4_3(__mulsc3)
243NOT_HERE_UNTIL_AFTER_4_3(__mulsf3)
244NOT_HERE_UNTIL_AFTER_4_3(__mulsf3vfp)
245NOT_HERE_UNTIL_AFTER_4_3(__mulvdi3)
246NOT_HERE_UNTIL_AFTER_4_3(__mulvsi3)
247NOT_HERE_UNTIL_AFTER_4_3(__nedf2)
248NOT_HERE_UNTIL_AFTER_4_3(__nedf2vfp)
249NOT_HERE_UNTIL_AFTER_4_3(__negdi2)
250NOT_HERE_UNTIL_AFTER_4_3(__negvdi2)
251NOT_HERE_UNTIL_AFTER_4_3(__negvsi2)
252NOT_HERE_UNTIL_AFTER_4_3(__nesf2)
253NOT_HERE_UNTIL_AFTER_4_3(__nesf2vfp)
254NOT_HERE_UNTIL_AFTER_4_3(__paritydi2)
255NOT_HERE_UNTIL_AFTER_4_3(__paritysi2)
256NOT_HERE_UNTIL_AFTER_4_3(__popcountdi2)
257NOT_HERE_UNTIL_AFTER_4_3(__popcountsi2)
258NOT_HERE_UNTIL_AFTER_4_3(__powidf2)
259NOT_HERE_UNTIL_AFTER_4_3(__powisf2)
260NOT_HERE_UNTIL_AFTER_4_3(__subdf3)
261NOT_HERE_UNTIL_AFTER_4_3(__subdf3vfp)
262NOT_HERE_UNTIL_AFTER_4_3(__subsf3)
263NOT_HERE_UNTIL_AFTER_4_3(__subsf3vfp)
264NOT_HERE_UNTIL_AFTER_4_3(__subvdi3)
265NOT_HERE_UNTIL_AFTER_4_3(__subvsi3)
266NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2)
267NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2vfp)
268NOT_HERE_UNTIL_AFTER_4_3(__ucmpdi2)
269NOT_HERE_UNTIL_AFTER_4_3(__udivdi3)
270NOT_HERE_UNTIL_AFTER_4_3(__udivmoddi4)
271NOT_HERE_UNTIL_AFTER_4_3(__udivsi3)
272NOT_HERE_UNTIL_AFTER_4_3(__umoddi3)
273NOT_HERE_UNTIL_AFTER_4_3(__umodsi3)
274NOT_HERE_UNTIL_AFTER_4_3(__unorddf2)
275NOT_HERE_UNTIL_AFTER_4_3(__unorddf2vfp)
276NOT_HERE_UNTIL_AFTER_4_3(__unordsf2)
277NOT_HERE_UNTIL_AFTER_4_3(__unordsf2vfp)
Nick Kledzikbb301ce2011-04-12 21:11:47 +0000278
Nick Kledzik7e9cd712011-04-12 21:22:48 +0000279NOT_HERE_UNTIL_AFTER_4_3(__divmodsi4)
280NOT_HERE_UNTIL_AFTER_4_3(__udivmodsi4)
Nick Kledzik4a3467b2011-04-14 00:40:20 +0000281#endif // __arm__ && __DYNAMIC__
Nick Kledzikbb301ce2011-04-12 21:11:47 +0000282
283
284
285
286
Shantonu Senb4c3b6f2009-09-22 00:49:12 +0000287#else /* !__APPLE__ */
Daniel Dunbarb3a69012009-06-26 16:47:03 +0000288
Shantonu Senb4c3b6f2009-09-22 00:49:12 +0000289extern int avoid_empty_file;
290
291#endif /* !__APPLE__*/