diff --git a/src/boot.cpp b/src/boot.cpp index a6be292ab7..81437450af 100644 --- a/src/boot.cpp +++ b/src/boot.cpp @@ -24,15 +24,12 @@ extern "C" void __cxa_pure_virtual(void) { abort(); } #endif // not _MSC_VER -#ifdef BOOT_IMAGE - #if (defined __MINGW32__) || (defined _MSC_VER) # ifdef __MINGW32__ # define EXPORT __declspec(dllexport) __attribute__ ((externally_visible)) # else // not __MINGW32__ # define EXPORT __declspec(dllexport) # endif // not __MINGW32__ -# define SYMBOL(x) binary_bootimage_bin_##x #else // not (defined __MINGW32__) || (defined _MSC_VER) # ifdef __APPLE__ # define EXPORT __attribute__ ((visibility("default"))) @@ -40,9 +37,16 @@ extern "C" void __cxa_pure_virtual(void) { abort(); } # define EXPORT __attribute__ ((visibility("default"))) \ __attribute__ ((externally_visible)) # endif // not __APPLE__ -# define SYMBOL(x) _binary_bootimage_bin_##x #endif // not (defined __MINGW32__) || (defined _MSC_VER) +#ifdef BOOT_IMAGE + +#if (defined __MINGW32__) || (defined _MSC_VER) +# define SYMBOL(x) binary_bootimage_bin_##x +#else +# define SYMBOL(x) _binary_bootimage_bin_##x +#endif + extern "C" { extern const uint8_t SYMBOL(start)[]; @@ -62,10 +66,8 @@ extern "C" { #ifdef BOOT_CLASSPATH #if (defined __MINGW32__) || (defined _MSC_VER) -# define EXPORT __declspec(dllexport) __attribute__ ((externally_visible)) # define SYMBOL(x) binary_classpath_jar_##x #else -# define EXPORT __attribute__ ((visibility("default"))) __attribute__ ((externally_visible)) # define SYMBOL(x) _binary_classpath_jar_##x #endif