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 #elif __ppc__ 17 #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; 30 #endif /* __ppc__ */ 31 32 33 /* Symbols in libSystem.dylib in 10.6 and later, 34 * but are in libgcc_s.dylib in earlier versions 35 */ 36 37 NOT_HERE_BEFORE_10_6(__absvdi2) 38 NOT_HERE_BEFORE_10_6(__absvsi2) 39 NOT_HERE_BEFORE_10_6(__absvti2) 40 NOT_HERE_BEFORE_10_6(__addvdi3) 41 NOT_HERE_BEFORE_10_6(__addvsi3) 42 NOT_HERE_BEFORE_10_6(__addvti3) 43 NOT_HERE_BEFORE_10_6(__ashldi3) 44 NOT_HERE_BEFORE_10_6(__ashlti3) 45 NOT_HERE_BEFORE_10_6(__ashrdi3) 46 NOT_HERE_BEFORE_10_6(__ashrti3) 47 NOT_HERE_BEFORE_10_6(__clear_cache) 48 NOT_HERE_BEFORE_10_6(__clzdi2) 49 NOT_HERE_BEFORE_10_6(__clzsi2) 50 NOT_HERE_BEFORE_10_6(__clzti2) 51 NOT_HERE_BEFORE_10_6(__cmpdi2) 52 NOT_HERE_BEFORE_10_6(__cmpti2) 53 NOT_HERE_BEFORE_10_6(__ctzdi2) 54 NOT_HERE_BEFORE_10_6(__ctzsi2) 55 NOT_HERE_BEFORE_10_6(__ctzti2) 56 NOT_HERE_BEFORE_10_6(__divdc3) 57 NOT_HERE_BEFORE_10_6(__divdi3) 58 NOT_HERE_BEFORE_10_6(__divsc3) 59 NOT_HERE_BEFORE_10_6(__divtc3) 60 NOT_HERE_BEFORE_10_6(__divti3) 61 NOT_HERE_BEFORE_10_6(__divxc3) 62 NOT_HERE_BEFORE_10_6(__enable_execute_stack) 63 NOT_HERE_BEFORE_10_6(__ffsdi2) 64 NOT_HERE_BEFORE_10_6(__ffsti2) 65 NOT_HERE_BEFORE_10_6(__fixdfdi) 66 NOT_HERE_BEFORE_10_6(__fixdfti) 67 NOT_HERE_BEFORE_10_6(__fixsfdi) 68 NOT_HERE_BEFORE_10_6(__fixsfti) 69 NOT_HERE_BEFORE_10_6(__fixtfdi) 70 NOT_HERE_BEFORE_10_6(__fixunsdfdi) 71 NOT_HERE_BEFORE_10_6(__fixunsdfsi) 72 NOT_HERE_BEFORE_10_6(__fixunsdfti) 73 NOT_HERE_BEFORE_10_6(__fixunssfdi) 74 NOT_HERE_BEFORE_10_6(__fixunssfsi) 75 NOT_HERE_BEFORE_10_6(__fixunssfti) 76 NOT_HERE_BEFORE_10_6(__fixunstfdi) 77 NOT_HERE_BEFORE_10_6(__fixunsxfdi) 78 NOT_HERE_BEFORE_10_6(__fixunsxfsi) 79 NOT_HERE_BEFORE_10_6(__fixunsxfti) 80 NOT_HERE_BEFORE_10_6(__fixxfdi) 81 NOT_HERE_BEFORE_10_6(__fixxfti) 82 NOT_HERE_BEFORE_10_6(__floatdidf) 83 NOT_HERE_BEFORE_10_6(__floatdisf) 84 NOT_HERE_BEFORE_10_6(__floatditf) 85 NOT_HERE_BEFORE_10_6(__floatdixf) 86 NOT_HERE_BEFORE_10_6(__floattidf) 87 NOT_HERE_BEFORE_10_6(__floattisf) 88 NOT_HERE_BEFORE_10_6(__floattixf) 89 NOT_HERE_BEFORE_10_6(__floatundidf) 90 NOT_HERE_BEFORE_10_6(__floatundisf) 91 NOT_HERE_BEFORE_10_6(__floatunditf) 92 NOT_HERE_BEFORE_10_6(__floatundixf) 93 NOT_HERE_BEFORE_10_6(__floatuntidf) 94 NOT_HERE_BEFORE_10_6(__floatuntisf) 95 NOT_HERE_BEFORE_10_6(__floatuntixf) 96 NOT_HERE_BEFORE_10_6(__gcc_personality_v0) 97 NOT_HERE_BEFORE_10_6(__lshrdi3) 98 NOT_HERE_BEFORE_10_6(__lshrti3) 99 NOT_HERE_BEFORE_10_6(__moddi3) 100 NOT_HERE_BEFORE_10_6(__modti3) 101 NOT_HERE_BEFORE_10_6(__muldc3) 102 NOT_HERE_BEFORE_10_6(__muldi3) 103 NOT_HERE_BEFORE_10_6(__mulsc3) 104 NOT_HERE_BEFORE_10_6(__multc3) 105 NOT_HERE_BEFORE_10_6(__multi3) 106 NOT_HERE_BEFORE_10_6(__mulvdi3) 107 NOT_HERE_BEFORE_10_6(__mulvsi3) 108 NOT_HERE_BEFORE_10_6(__mulvti3) 109 NOT_HERE_BEFORE_10_6(__mulxc3) 110 NOT_HERE_BEFORE_10_6(__negdi2) 111 NOT_HERE_BEFORE_10_6(__negti2) 112 NOT_HERE_BEFORE_10_6(__negvdi2) 113 NOT_HERE_BEFORE_10_6(__negvsi2) 114 NOT_HERE_BEFORE_10_6(__negvti2) 115 NOT_HERE_BEFORE_10_6(__paritydi2) 116 NOT_HERE_BEFORE_10_6(__paritysi2) 117 NOT_HERE_BEFORE_10_6(__parityti2) 118 NOT_HERE_BEFORE_10_6(__popcountdi2) 119 NOT_HERE_BEFORE_10_6(__popcountsi2) 120 NOT_HERE_BEFORE_10_6(__popcountti2) 121 NOT_HERE_BEFORE_10_6(__powidf2) 122 NOT_HERE_BEFORE_10_6(__powisf2) 123 NOT_HERE_BEFORE_10_6(__powitf2) 124 NOT_HERE_BEFORE_10_6(__powixf2) 125 NOT_HERE_BEFORE_10_6(__subvdi3) 126 NOT_HERE_BEFORE_10_6(__subvsi3) 127 NOT_HERE_BEFORE_10_6(__subvti3) 128 NOT_HERE_BEFORE_10_6(__ucmpdi2) 129 NOT_HERE_BEFORE_10_6(__ucmpti2) 130 NOT_HERE_BEFORE_10_6(__udivdi3) 131 NOT_HERE_BEFORE_10_6(__udivmoddi4) 132 NOT_HERE_BEFORE_10_6(__udivmodti4) 133 NOT_HERE_BEFORE_10_6(__udivti3) 134 NOT_HERE_BEFORE_10_6(__umoddi3) 135 NOT_HERE_BEFORE_10_6(__umodti3) 136 137 138 #if __ppc__ 139 NOT_HERE_BEFORE_10_6(__gcc_qadd) 140 NOT_HERE_BEFORE_10_6(__gcc_qdiv) 141 NOT_HERE_BEFORE_10_6(__gcc_qmul) 142 NOT_HERE_BEFORE_10_6(__gcc_qsub) 143 NOT_HERE_BEFORE_10_6(__trampoline_setup) 144 #endif /* __ppc__ */ 145 146 #if __arm__ && __DYNAMIC__ 147 #define NOT_HERE_UNTIL_AFTER_4_3(sym) \ 148 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 163 NOT_HERE_UNTIL_AFTER_4_3(__absvdi2) 164 NOT_HERE_UNTIL_AFTER_4_3(__absvsi2) 165 NOT_HERE_UNTIL_AFTER_4_3(__adddf3) 166 NOT_HERE_UNTIL_AFTER_4_3(__adddf3vfp) 167 NOT_HERE_UNTIL_AFTER_4_3(__addsf3) 168 NOT_HERE_UNTIL_AFTER_4_3(__addsf3vfp) 169 NOT_HERE_UNTIL_AFTER_4_3(__addvdi3) 170 NOT_HERE_UNTIL_AFTER_4_3(__addvsi3) 171 NOT_HERE_UNTIL_AFTER_4_3(__ashldi3) 172 NOT_HERE_UNTIL_AFTER_4_3(__ashrdi3) 173 NOT_HERE_UNTIL_AFTER_4_3(__bswapdi2) 174 NOT_HERE_UNTIL_AFTER_4_3(__bswapsi2) 175 NOT_HERE_UNTIL_AFTER_4_3(__clzdi2) 176 NOT_HERE_UNTIL_AFTER_4_3(__clzsi2) 177 NOT_HERE_UNTIL_AFTER_4_3(__cmpdi2) 178 NOT_HERE_UNTIL_AFTER_4_3(__ctzdi2) 179 NOT_HERE_UNTIL_AFTER_4_3(__ctzsi2) 180 NOT_HERE_UNTIL_AFTER_4_3(__divdc3) 181 NOT_HERE_UNTIL_AFTER_4_3(__divdf3) 182 NOT_HERE_UNTIL_AFTER_4_3(__divdf3vfp) 183 NOT_HERE_UNTIL_AFTER_4_3(__divdi3) 184 NOT_HERE_UNTIL_AFTER_4_3(__divsc3) 185 NOT_HERE_UNTIL_AFTER_4_3(__divsf3) 186 NOT_HERE_UNTIL_AFTER_4_3(__divsf3vfp) 187 NOT_HERE_UNTIL_AFTER_4_3(__divsi3) 188 NOT_HERE_UNTIL_AFTER_4_3(__eqdf2) 189 NOT_HERE_UNTIL_AFTER_4_3(__eqdf2vfp) 190 NOT_HERE_UNTIL_AFTER_4_3(__eqsf2) 191 NOT_HERE_UNTIL_AFTER_4_3(__eqsf2vfp) 192 NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2) 193 NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2vfp) 194 NOT_HERE_UNTIL_AFTER_4_3(__ffsdi2) 195 NOT_HERE_UNTIL_AFTER_4_3(__fixdfdi) 196 NOT_HERE_UNTIL_AFTER_4_3(__fixdfsi) 197 NOT_HERE_UNTIL_AFTER_4_3(__fixdfsivfp) 198 NOT_HERE_UNTIL_AFTER_4_3(__fixsfdi) 199 NOT_HERE_UNTIL_AFTER_4_3(__fixsfsi) 200 NOT_HERE_UNTIL_AFTER_4_3(__fixsfsivfp) 201 NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfdi) 202 NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsi) 203 NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsivfp) 204 NOT_HERE_UNTIL_AFTER_4_3(__fixunssfdi) 205 NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsi) 206 NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsivfp) 207 NOT_HERE_UNTIL_AFTER_4_3(__floatdidf) 208 NOT_HERE_UNTIL_AFTER_4_3(__floatdisf) 209 NOT_HERE_UNTIL_AFTER_4_3(__floatsidf) 210 NOT_HERE_UNTIL_AFTER_4_3(__floatsidfvfp) 211 NOT_HERE_UNTIL_AFTER_4_3(__floatsisf) 212 NOT_HERE_UNTIL_AFTER_4_3(__floatsisfvfp) 213 NOT_HERE_UNTIL_AFTER_4_3(__floatundidf) 214 NOT_HERE_UNTIL_AFTER_4_3(__floatundisf) 215 NOT_HERE_UNTIL_AFTER_4_3(__floatunsidf) 216 NOT_HERE_UNTIL_AFTER_4_3(__floatunsisf) 217 NOT_HERE_UNTIL_AFTER_4_3(__floatunssidfvfp) 218 NOT_HERE_UNTIL_AFTER_4_3(__floatunssisfvfp) 219 NOT_HERE_UNTIL_AFTER_4_3(__gedf2) 220 NOT_HERE_UNTIL_AFTER_4_3(__gedf2vfp) 221 NOT_HERE_UNTIL_AFTER_4_3(__gesf2) 222 NOT_HERE_UNTIL_AFTER_4_3(__gesf2vfp) 223 NOT_HERE_UNTIL_AFTER_4_3(__gtdf2) 224 NOT_HERE_UNTIL_AFTER_4_3(__gtdf2vfp) 225 NOT_HERE_UNTIL_AFTER_4_3(__gtsf2) 226 NOT_HERE_UNTIL_AFTER_4_3(__gtsf2vfp) 227 NOT_HERE_UNTIL_AFTER_4_3(__ledf2) 228 NOT_HERE_UNTIL_AFTER_4_3(__ledf2vfp) 229 NOT_HERE_UNTIL_AFTER_4_3(__lesf2) 230 NOT_HERE_UNTIL_AFTER_4_3(__lesf2vfp) 231 NOT_HERE_UNTIL_AFTER_4_3(__lshrdi3) 232 NOT_HERE_UNTIL_AFTER_4_3(__ltdf2) 233 NOT_HERE_UNTIL_AFTER_4_3(__ltdf2vfp) 234 NOT_HERE_UNTIL_AFTER_4_3(__ltsf2) 235 NOT_HERE_UNTIL_AFTER_4_3(__ltsf2vfp) 236 NOT_HERE_UNTIL_AFTER_4_3(__moddi3) 237 NOT_HERE_UNTIL_AFTER_4_3(__modsi3) 238 NOT_HERE_UNTIL_AFTER_4_3(__muldc3) 239 NOT_HERE_UNTIL_AFTER_4_3(__muldf3) 240 NOT_HERE_UNTIL_AFTER_4_3(__muldf3vfp) 241 NOT_HERE_UNTIL_AFTER_4_3(__muldi3) 242 NOT_HERE_UNTIL_AFTER_4_3(__mulsc3) 243 NOT_HERE_UNTIL_AFTER_4_3(__mulsf3) 244 NOT_HERE_UNTIL_AFTER_4_3(__mulsf3vfp) 245 NOT_HERE_UNTIL_AFTER_4_3(__mulvdi3) 246 NOT_HERE_UNTIL_AFTER_4_3(__mulvsi3) 247 NOT_HERE_UNTIL_AFTER_4_3(__nedf2) 248 NOT_HERE_UNTIL_AFTER_4_3(__nedf2vfp) 249 NOT_HERE_UNTIL_AFTER_4_3(__negdi2) 250 NOT_HERE_UNTIL_AFTER_4_3(__negvdi2) 251 NOT_HERE_UNTIL_AFTER_4_3(__negvsi2) 252 NOT_HERE_UNTIL_AFTER_4_3(__nesf2) 253 NOT_HERE_UNTIL_AFTER_4_3(__nesf2vfp) 254 NOT_HERE_UNTIL_AFTER_4_3(__paritydi2) 255 NOT_HERE_UNTIL_AFTER_4_3(__paritysi2) 256 NOT_HERE_UNTIL_AFTER_4_3(__popcountdi2) 257 NOT_HERE_UNTIL_AFTER_4_3(__popcountsi2) 258 NOT_HERE_UNTIL_AFTER_4_3(__powidf2) 259 NOT_HERE_UNTIL_AFTER_4_3(__powisf2) 260 NOT_HERE_UNTIL_AFTER_4_3(__subdf3) 261 NOT_HERE_UNTIL_AFTER_4_3(__subdf3vfp) 262 NOT_HERE_UNTIL_AFTER_4_3(__subsf3) 263 NOT_HERE_UNTIL_AFTER_4_3(__subsf3vfp) 264 NOT_HERE_UNTIL_AFTER_4_3(__subvdi3) 265 NOT_HERE_UNTIL_AFTER_4_3(__subvsi3) 266 NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2) 267 NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2vfp) 268 NOT_HERE_UNTIL_AFTER_4_3(__ucmpdi2) 269 NOT_HERE_UNTIL_AFTER_4_3(__udivdi3) 270 NOT_HERE_UNTIL_AFTER_4_3(__udivmoddi4) 271 NOT_HERE_UNTIL_AFTER_4_3(__udivsi3) 272 NOT_HERE_UNTIL_AFTER_4_3(__umoddi3) 273 NOT_HERE_UNTIL_AFTER_4_3(__umodsi3) 274 NOT_HERE_UNTIL_AFTER_4_3(__unorddf2) 275 NOT_HERE_UNTIL_AFTER_4_3(__unorddf2vfp) 276 NOT_HERE_UNTIL_AFTER_4_3(__unordsf2) 277 NOT_HERE_UNTIL_AFTER_4_3(__unordsf2vfp) 278 279 NOT_HERE_UNTIL_AFTER_4_3(__divmodsi4) 280 NOT_HERE_UNTIL_AFTER_4_3(__udivmodsi4) 281 #endif // __arm__ && __DYNAMIC__ 282 283 284 285 286 287 #else /* !__APPLE__ */ 288 289 extern int avoid_empty_file; 290 291 #endif /* !__APPLE__*/ 292