Changeset 96043 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- Aug 4, 2022 10:08:07 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/iprt.h
r93115 r96043 64 64 #endif 65 65 66 /** @def RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL 67 * Creates symbol alias and export a RT_NOCRT symbol. 68 * 69 * For targets using ELF this macro generates weak symbol aliases, for the other 70 * object formats the makefile scans source files for this macro and produces 71 * separate object files with the aliases. 72 * 73 * @param a_Name The CRT function or variable name. 74 * 75 * @todo Does not support ELF targets using underscore prefixed symbols. 76 */ 77 #if defined(__ELF__) && defined(RT_WITH_NOCRT_ALIASES) && !defined(RT_WITHOUT_NOCRT_ALIASES) 78 # ifdef RT_WITH_NOCRT_UNDERSCORE_ALIASES 79 # define RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL(a_Name) RT_EXPORT_SYMBOL(a_Name) \ 80 __asm__(".weak " #a_Name "\n\t" \ 81 ".set " #a_Name "," RT_NOCRT_STR(a_Name) "\n\t" \ 82 ".weak _" #a_Name "\n\t" \ 83 ".set _" #a_Name "," RT_NOCRT_STR(a_Name) "\n\t") 84 # else 85 # define RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL(a_Name) RT_EXPORT_SYMBOL(a_Name) \ 86 __asm__(".weak " #a_Name "\n\t" \ 87 ".set " #a_Name "," RT_NOCRT_STR(a_Name) "\n\t") 88 # endif 89 #else 90 # define RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL(a_Name) RT_EXPORT_SYMBOL(a_Name) 91 #endif 92 93 /** @def RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL_WITHOUT_UNDERSCORE 94 * Variant of RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL that omits the 95 * underscore-prefixed variant of the symbol. 96 * 97 * @param a_Name The CRT function or variable name. 98 */ 99 #if defined(__ELF__) && defined(RT_WITH_NOCRT_ALIASES) && !defined(RT_WITHOUT_NOCRT_ALIASES) 100 # define RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL_WITHOUT_UNDERSCORE(a_Name) RT_EXPORT_SYMBOL(a_Name) \ 101 __asm__(".weak " #a_Name "\n\t" \ 102 ".set " #a_Name "," RT_NOCRT_STR(a_Name) "\n\t") 103 #else 104 # define RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL_WITHOUT_UNDERSCORE(a_Name) RT_EXPORT_SYMBOL(a_Name) 105 #endif 106 66 107 67 108 /** @def RT_MORE_STRICT
Note:
See TracChangeset
for help on using the changeset viewer.