1 /* ===-- apple_versioning.c - Adds versioning symbols for ld ---------------=== 2 * 3 * The LLVM Compiler Infrastructure 4 * 5 * This file is dual licensed under the MIT and the University of Illinois Open 6 * Source Licenses. See LICENSE.TXT for details. 7 * 8 * ===----------------------------------------------------------------------=== 9 */ 10 11 12 13 #if __APPLE__ 14 #if __arm__ 15 #define NOT_HERE_BEFORE_10_6(sym) 16 #define NOT_HERE_IN_10_8_AND_EARLIER(sym) 17 #elif __ppc__ 18 #define NOT_HERE_BEFORE_10_6(sym) \ 19 extern const char sym##_tmp3 __asm("$ld$hide$os10.3$_" #sym ); \ 20 __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \ 21 extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \ 22 __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \ 23 extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \ 24 __attribute__((visibility("default"))) const char sym##_tmp5 = 0; 25 #else 26 #define NOT_HERE_BEFORE_10_6(sym) \ 27 extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \ 28 __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \ 29 extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \ 30 __attribute__((visibility("default"))) const char sym##_tmp5 = 0; 31 #define NOT_HERE_IN_10_8_AND_EARLIER(sym) \ 32 extern const char sym##_tmp8 __asm("$ld$hide$os10.8$_" #sym ); \ 33 __attribute__((visibility("default"))) const char sym##_tmp8 = 0; \ 34 extern const char sym##_tmp7 __asm("$ld$hide$os10.7$_" #sym ); \ 35 __attribute__((visibility("default"))) const char sym##_tmp7 = 0; \ 36 extern const char sym##_tmp6 __asm("$ld$hide$os10.6$_" #sym ); \ 37 __attribute__((visibility("default"))) const char sym##_tmp6 = 0; 38 #endif /* __ppc__ */ 39 40 41 /* Symbols in libSystem.dylib in 10.6 and later, 42 * but are in libgcc_s.dylib in earlier versions 43 */ 44 45 NOT_HERE_BEFORE_10_6(__absvdi2) 46 NOT_HERE_BEFORE_10_6(__absvsi2) 47 NOT_HERE_BEFORE_10_6(__absvti2) 48 NOT_HERE_BEFORE_10_6(__addvdi3) 49 NOT_HERE_BEFORE_10_6(__addvsi3) 50 NOT_HERE_BEFORE_10_6(__addvti3) 51 NOT_HERE_BEFORE_10_6(__ashldi3) 52 NOT_HERE_BEFORE_10_6(__ashlti3) 53 NOT_HERE_BEFORE_10_6(__ashrdi3) 54 NOT_HERE_BEFORE_10_6(__ashrti3) 55 NOT_HERE_BEFORE_10_6(__clear_cache) 56 NOT_HERE_BEFORE_10_6(__clzdi2) 57 NOT_HERE_BEFORE_10_6(__clzsi2) 58 NOT_HERE_BEFORE_10_6(__clzti2) 59 NOT_HERE_BEFORE_10_6(__cmpdi2) 60 NOT_HERE_BEFORE_10_6(__cmpti2) 61 NOT_HERE_BEFORE_10_6(__ctzdi2) 62 NOT_HERE_BEFORE_10_6(__ctzsi2) 63 NOT_HERE_BEFORE_10_6(__ctzti2) 64 NOT_HERE_BEFORE_10_6(__divdc3) 65 NOT_HERE_BEFORE_10_6(__divdi3) 66 NOT_HERE_BEFORE_10_6(__divsc3) 67 NOT_HERE_BEFORE_10_6(__divtc3) 68 NOT_HERE_BEFORE_10_6(__divti3) 69 NOT_HERE_BEFORE_10_6(__divxc3) 70 NOT_HERE_BEFORE_10_6(__enable_execute_stack) 71 NOT_HERE_BEFORE_10_6(__ffsdi2) 72 NOT_HERE_BEFORE_10_6(__ffsti2) 73 NOT_HERE_BEFORE_10_6(__fixdfdi) 74 NOT_HERE_BEFORE_10_6(__fixdfti) 75 NOT_HERE_BEFORE_10_6(__fixsfdi) 76 NOT_HERE_BEFORE_10_6(__fixsfti) 77 NOT_HERE_BEFORE_10_6(__fixtfdi) 78 NOT_HERE_BEFORE_10_6(__fixunsdfdi) 79 NOT_HERE_BEFORE_10_6(__fixunsdfsi) 80 NOT_HERE_BEFORE_10_6(__fixunsdfti) 81 NOT_HERE_BEFORE_10_6(__fixunssfdi) 82 NOT_HERE_BEFORE_10_6(__fixunssfsi) 83 NOT_HERE_BEFORE_10_6(__fixunssfti) 84 NOT_HERE_BEFORE_10_6(__fixunstfdi) 85 NOT_HERE_BEFORE_10_6(__fixunsxfdi) 86 NOT_HERE_BEFORE_10_6(__fixunsxfsi) 87 NOT_HERE_BEFORE_10_6(__fixunsxfti) 88 NOT_HERE_BEFORE_10_6(__fixxfdi) 89 NOT_HERE_BEFORE_10_6(__fixxfti) 90 NOT_HERE_BEFORE_10_6(__floatdidf) 91 NOT_HERE_BEFORE_10_6(__floatdisf) 92 NOT_HERE_BEFORE_10_6(__floatditf) 93 NOT_HERE_BEFORE_10_6(__floatdixf) 94 NOT_HERE_BEFORE_10_6(__floattidf) 95 NOT_HERE_BEFORE_10_6(__floattisf) 96 NOT_HERE_BEFORE_10_6(__floattixf) 97 NOT_HERE_BEFORE_10_6(__floatundidf) 98 NOT_HERE_BEFORE_10_6(__floatundisf) 99 NOT_HERE_BEFORE_10_6(__floatunditf) 100 NOT_HERE_BEFORE_10_6(__floatundixf) 101 NOT_HERE_BEFORE_10_6(__floatuntidf) 102 NOT_HERE_BEFORE_10_6(__floatuntisf) 103 NOT_HERE_BEFORE_10_6(__floatuntixf) 104 NOT_HERE_BEFORE_10_6(__gcc_personality_v0) 105 NOT_HERE_BEFORE_10_6(__lshrdi3) 106 NOT_HERE_BEFORE_10_6(__lshrti3) 107 NOT_HERE_BEFORE_10_6(__moddi3) 108 NOT_HERE_BEFORE_10_6(__modti3) 109 NOT_HERE_BEFORE_10_6(__muldc3) 110 NOT_HERE_BEFORE_10_6(__muldi3) 111 NOT_HERE_BEFORE_10_6(__mulsc3) 112 NOT_HERE_BEFORE_10_6(__multc3) 113 NOT_HERE_BEFORE_10_6(__multi3) 114 NOT_HERE_BEFORE_10_6(__mulvdi3) 115 NOT_HERE_BEFORE_10_6(__mulvsi3) 116 NOT_HERE_BEFORE_10_6(__mulvti3) 117 NOT_HERE_BEFORE_10_6(__mulxc3) 118 NOT_HERE_BEFORE_10_6(__negdi2) 119 NOT_HERE_BEFORE_10_6(__negti2) 120 NOT_HERE_BEFORE_10_6(__negvdi2) 121 NOT_HERE_BEFORE_10_6(__negvsi2) 122 NOT_HERE_BEFORE_10_6(__negvti2) 123 NOT_HERE_BEFORE_10_6(__paritydi2) 124 NOT_HERE_BEFORE_10_6(__paritysi2) 125 NOT_HERE_BEFORE_10_6(__parityti2) 126 NOT_HERE_BEFORE_10_6(__popcountdi2) 127 NOT_HERE_BEFORE_10_6(__popcountsi2) 128 NOT_HERE_BEFORE_10_6(__popcountti2) 129 NOT_HERE_BEFORE_10_6(__powidf2) 130 NOT_HERE_BEFORE_10_6(__powisf2) 131 NOT_HERE_BEFORE_10_6(__powitf2) 132 NOT_HERE_BEFORE_10_6(__powixf2) 133 NOT_HERE_BEFORE_10_6(__subvdi3) 134 NOT_HERE_BEFORE_10_6(__subvsi3) 135 NOT_HERE_BEFORE_10_6(__subvti3) 136 NOT_HERE_BEFORE_10_6(__ucmpdi2) 137 NOT_HERE_BEFORE_10_6(__ucmpti2) 138 NOT_HERE_BEFORE_10_6(__udivdi3) 139 NOT_HERE_BEFORE_10_6(__udivmoddi4) 140 NOT_HERE_BEFORE_10_6(__udivmodti4) 141 NOT_HERE_BEFORE_10_6(__udivti3) 142 NOT_HERE_BEFORE_10_6(__umoddi3) 143 NOT_HERE_BEFORE_10_6(__umodti3) 144 145 146 #if __ppc__ 147 NOT_HERE_BEFORE_10_6(__gcc_qadd) 148 NOT_HERE_BEFORE_10_6(__gcc_qdiv) 149 NOT_HERE_BEFORE_10_6(__gcc_qmul) 150 NOT_HERE_BEFORE_10_6(__gcc_qsub) 151 NOT_HERE_BEFORE_10_6(__trampoline_setup) 152 #endif /* __ppc__ */ 153 154 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange) 155 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_1) 156 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_2) 157 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_4) 158 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_8) 159 160 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_exchange) 161 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_exchange_1) 162 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_exchange_2) 163 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_exchange_4) 164 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_exchange_8) 165 166 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_add_1) 167 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_add_2) 168 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_add_4) 169 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_add_8) 170 171 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_and_1) 172 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_and_2) 173 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_and_4) 174 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_and_8) 175 176 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_or_1) 177 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_or_2) 178 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_or_4) 179 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_or_8) 180 181 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_sub_1) 182 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_sub_2) 183 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_sub_4) 184 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_sub_8) 185 186 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_xor_1) 187 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_xor_2) 188 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_xor_4) 189 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_fetch_xor_8) 190 191 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load) 192 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_1) 193 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_2) 194 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_4) 195 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_8) 196 197 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_store) 198 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_store_1) 199 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_store_2) 200 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_store_4) 201 NOT_HERE_IN_10_8_AND_EARLIER(__atomic_store_8) 202 203 204 #if __arm__ && __DYNAMIC__ 205 #define NOT_HERE_UNTIL_AFTER_4_3(sym) \ 206 extern const char sym##_tmp1 __asm("$ld$hide$os3.0$_" #sym ); \ 207 __attribute__((visibility("default"))) const char sym##_tmp1 = 0; \ 208 extern const char sym##_tmp2 __asm("$ld$hide$os3.1$_" #sym ); \ 209 __attribute__((visibility("default"))) const char sym##_tmp2 = 0; \ 210 extern const char sym##_tmp3 __asm("$ld$hide$os3.2$_" #sym ); \ 211 __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \ 212 extern const char sym##_tmp4 __asm("$ld$hide$os4.0$_" #sym ); \ 213 __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \ 214 extern const char sym##_tmp5 __asm("$ld$hide$os4.1$_" #sym ); \ 215 __attribute__((visibility("default"))) const char sym##_tmp5 = 0; \ 216 extern const char sym##_tmp6 __asm("$ld$hide$os4.2$_" #sym ); \ 217 __attribute__((visibility("default"))) const char sym##_tmp6 = 0; \ 218 extern const char sym##_tmp7 __asm("$ld$hide$os4.3$_" #sym ); \ 219 __attribute__((visibility("default"))) const char sym##_tmp7 = 0; 220 221 NOT_HERE_UNTIL_AFTER_4_3(__absvdi2) 222 NOT_HERE_UNTIL_AFTER_4_3(__absvsi2) 223 NOT_HERE_UNTIL_AFTER_4_3(__adddf3) 224 NOT_HERE_UNTIL_AFTER_4_3(__adddf3vfp) 225 NOT_HERE_UNTIL_AFTER_4_3(__addsf3) 226 NOT_HERE_UNTIL_AFTER_4_3(__addsf3vfp) 227 NOT_HERE_UNTIL_AFTER_4_3(__addvdi3) 228 NOT_HERE_UNTIL_AFTER_4_3(__addvsi3) 229 NOT_HERE_UNTIL_AFTER_4_3(__ashldi3) 230 NOT_HERE_UNTIL_AFTER_4_3(__ashrdi3) 231 NOT_HERE_UNTIL_AFTER_4_3(__bswapdi2) 232 NOT_HERE_UNTIL_AFTER_4_3(__bswapsi2) 233 NOT_HERE_UNTIL_AFTER_4_3(__clzdi2) 234 NOT_HERE_UNTIL_AFTER_4_3(__clzsi2) 235 NOT_HERE_UNTIL_AFTER_4_3(__cmpdi2) 236 NOT_HERE_UNTIL_AFTER_4_3(__ctzdi2) 237 NOT_HERE_UNTIL_AFTER_4_3(__ctzsi2) 238 NOT_HERE_UNTIL_AFTER_4_3(__divdc3) 239 NOT_HERE_UNTIL_AFTER_4_3(__divdf3) 240 NOT_HERE_UNTIL_AFTER_4_3(__divdf3vfp) 241 NOT_HERE_UNTIL_AFTER_4_3(__divdi3) 242 NOT_HERE_UNTIL_AFTER_4_3(__divsc3) 243 NOT_HERE_UNTIL_AFTER_4_3(__divsf3) 244 NOT_HERE_UNTIL_AFTER_4_3(__divsf3vfp) 245 NOT_HERE_UNTIL_AFTER_4_3(__divsi3) 246 NOT_HERE_UNTIL_AFTER_4_3(__eqdf2) 247 NOT_HERE_UNTIL_AFTER_4_3(__eqdf2vfp) 248 NOT_HERE_UNTIL_AFTER_4_3(__eqsf2) 249 NOT_HERE_UNTIL_AFTER_4_3(__eqsf2vfp) 250 NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2) 251 NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2vfp) 252 NOT_HERE_UNTIL_AFTER_4_3(__ffsdi2) 253 NOT_HERE_UNTIL_AFTER_4_3(__fixdfdi) 254 NOT_HERE_UNTIL_AFTER_4_3(__fixdfsi) 255 NOT_HERE_UNTIL_AFTER_4_3(__fixdfsivfp) 256 NOT_HERE_UNTIL_AFTER_4_3(__fixsfdi) 257 NOT_HERE_UNTIL_AFTER_4_3(__fixsfsi) 258 NOT_HERE_UNTIL_AFTER_4_3(__fixsfsivfp) 259 NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfdi) 260 NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsi) 261 NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsivfp) 262 NOT_HERE_UNTIL_AFTER_4_3(__fixunssfdi) 263 NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsi) 264 NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsivfp) 265 NOT_HERE_UNTIL_AFTER_4_3(__floatdidf) 266 NOT_HERE_UNTIL_AFTER_4_3(__floatdisf) 267 NOT_HERE_UNTIL_AFTER_4_3(__floatsidf) 268 NOT_HERE_UNTIL_AFTER_4_3(__floatsidfvfp) 269 NOT_HERE_UNTIL_AFTER_4_3(__floatsisf) 270 NOT_HERE_UNTIL_AFTER_4_3(__floatsisfvfp) 271 NOT_HERE_UNTIL_AFTER_4_3(__floatundidf) 272 NOT_HERE_UNTIL_AFTER_4_3(__floatundisf) 273 NOT_HERE_UNTIL_AFTER_4_3(__floatunsidf) 274 NOT_HERE_UNTIL_AFTER_4_3(__floatunsisf) 275 NOT_HERE_UNTIL_AFTER_4_3(__floatunssidfvfp) 276 NOT_HERE_UNTIL_AFTER_4_3(__floatunssisfvfp) 277 NOT_HERE_UNTIL_AFTER_4_3(__gedf2) 278 NOT_HERE_UNTIL_AFTER_4_3(__gedf2vfp) 279 NOT_HERE_UNTIL_AFTER_4_3(__gesf2) 280 NOT_HERE_UNTIL_AFTER_4_3(__gesf2vfp) 281 NOT_HERE_UNTIL_AFTER_4_3(__gtdf2) 282 NOT_HERE_UNTIL_AFTER_4_3(__gtdf2vfp) 283 NOT_HERE_UNTIL_AFTER_4_3(__gtsf2) 284 NOT_HERE_UNTIL_AFTER_4_3(__gtsf2vfp) 285 NOT_HERE_UNTIL_AFTER_4_3(__ledf2) 286 NOT_HERE_UNTIL_AFTER_4_3(__ledf2vfp) 287 NOT_HERE_UNTIL_AFTER_4_3(__lesf2) 288 NOT_HERE_UNTIL_AFTER_4_3(__lesf2vfp) 289 NOT_HERE_UNTIL_AFTER_4_3(__lshrdi3) 290 NOT_HERE_UNTIL_AFTER_4_3(__ltdf2) 291 NOT_HERE_UNTIL_AFTER_4_3(__ltdf2vfp) 292 NOT_HERE_UNTIL_AFTER_4_3(__ltsf2) 293 NOT_HERE_UNTIL_AFTER_4_3(__ltsf2vfp) 294 NOT_HERE_UNTIL_AFTER_4_3(__moddi3) 295 NOT_HERE_UNTIL_AFTER_4_3(__modsi3) 296 NOT_HERE_UNTIL_AFTER_4_3(__muldc3) 297 NOT_HERE_UNTIL_AFTER_4_3(__muldf3) 298 NOT_HERE_UNTIL_AFTER_4_3(__muldf3vfp) 299 NOT_HERE_UNTIL_AFTER_4_3(__muldi3) 300 NOT_HERE_UNTIL_AFTER_4_3(__mulsc3) 301 NOT_HERE_UNTIL_AFTER_4_3(__mulsf3) 302 NOT_HERE_UNTIL_AFTER_4_3(__mulsf3vfp) 303 NOT_HERE_UNTIL_AFTER_4_3(__mulvdi3) 304 NOT_HERE_UNTIL_AFTER_4_3(__mulvsi3) 305 NOT_HERE_UNTIL_AFTER_4_3(__nedf2) 306 NOT_HERE_UNTIL_AFTER_4_3(__nedf2vfp) 307 NOT_HERE_UNTIL_AFTER_4_3(__negdi2) 308 NOT_HERE_UNTIL_AFTER_4_3(__negvdi2) 309 NOT_HERE_UNTIL_AFTER_4_3(__negvsi2) 310 NOT_HERE_UNTIL_AFTER_4_3(__nesf2) 311 NOT_HERE_UNTIL_AFTER_4_3(__nesf2vfp) 312 NOT_HERE_UNTIL_AFTER_4_3(__paritydi2) 313 NOT_HERE_UNTIL_AFTER_4_3(__paritysi2) 314 NOT_HERE_UNTIL_AFTER_4_3(__popcountdi2) 315 NOT_HERE_UNTIL_AFTER_4_3(__popcountsi2) 316 NOT_HERE_UNTIL_AFTER_4_3(__powidf2) 317 NOT_HERE_UNTIL_AFTER_4_3(__powisf2) 318 NOT_HERE_UNTIL_AFTER_4_3(__subdf3) 319 NOT_HERE_UNTIL_AFTER_4_3(__subdf3vfp) 320 NOT_HERE_UNTIL_AFTER_4_3(__subsf3) 321 NOT_HERE_UNTIL_AFTER_4_3(__subsf3vfp) 322 NOT_HERE_UNTIL_AFTER_4_3(__subvdi3) 323 NOT_HERE_UNTIL_AFTER_4_3(__subvsi3) 324 NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2) 325 NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2vfp) 326 NOT_HERE_UNTIL_AFTER_4_3(__ucmpdi2) 327 NOT_HERE_UNTIL_AFTER_4_3(__udivdi3) 328 NOT_HERE_UNTIL_AFTER_4_3(__udivmoddi4) 329 NOT_HERE_UNTIL_AFTER_4_3(__udivsi3) 330 NOT_HERE_UNTIL_AFTER_4_3(__umoddi3) 331 NOT_HERE_UNTIL_AFTER_4_3(__umodsi3) 332 NOT_HERE_UNTIL_AFTER_4_3(__unorddf2) 333 NOT_HERE_UNTIL_AFTER_4_3(__unorddf2vfp) 334 NOT_HERE_UNTIL_AFTER_4_3(__unordsf2) 335 NOT_HERE_UNTIL_AFTER_4_3(__unordsf2vfp) 336 337 NOT_HERE_UNTIL_AFTER_4_3(__divmodsi4) 338 NOT_HERE_UNTIL_AFTER_4_3(__udivmodsi4) 339 #endif // __arm__ && __DYNAMIC__ 340 341 342 343 344 345 #else /* !__APPLE__ */ 346 347 extern int avoid_empty_file; 348 349 #endif /* !__APPLE__*/ 350