Introduce ARM version for the target architecture in order to determine if blx instruction can be used or not. Availability of blx instruction allows for more scenarii supported in R_ARM_CALL relocation. It should also be useful when introducing support for the R_ARM_THM_CALL relocation.
Showing the changes to tcc.h (1 of 2 files). Show all
Unified · Split
| @@ -105,6 +105,14 @@ · 104 unmodified lines | |||
| 105 | #define TCC_TARGET_I386 | 105 | #define TCC_TARGET_I386 |
| 106 | #endif | 106 | #endif |
| 107 | 107 | ||
| 108 | #if defined (TCC_TARGET_ARM) && !defined(TCC_ARM_VERSION) | ||
| 109 | #ifdef TCC_ARM_HARDFLOAT | ||
| 110 | #define TCC_ARM_VERSION 7 | ||
| 111 | #else | ||
| 112 | #define TCC_ARM_VERSION 4 | ||
| 113 | #endif | ||
| 114 | #endif | ||
| 115 | |||
| 108 | #if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \ | 116 | #if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \ |
| 109 | !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64) | 117 | !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64) |
| 110 | #define CONFIG_TCC_BCHECK /* enable bound checking code */ | 118 | #define CONFIG_TCC_BCHECK /* enable bound checking code */ |