diff --git a/CMakeLists.txt b/CMakeLists.txt index eeaa4ae..b19e422 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,11 +277,6 @@ if (LIBDISPATCH) target_link_libraries(objc ${LIBDISPATCH}) endif () -# Enable .type and .section assembly directives on platforms other than OS X -if (NOT APPLE) - add_definitions(-DHAS_SECTION_DIRECTIVE=1) -endif () - # Make weak symbols work on OS X if (APPLE) set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS diff --git a/block_trampolines.S b/block_trampolines.S index 2955787..e3ed411 100644 --- a/block_trampolines.S +++ b/block_trampolines.S @@ -109,6 +109,6 @@ CDECL(__objc_block_trampoline_end): CDECL(__objc_block_trampoline_sret): CDECL(__objc_block_trampoline_end_sret): #endif -#if HAS_SECTION_DIRECTIVE +#ifdef __ELF__ .section .note.GNU-stack,"",%progbits #endif diff --git a/objc_msgSend.S b/objc_msgSend.S index 3cdf15f..ed82718 100644 --- a/objc_msgSend.S +++ b/objc_msgSend.S @@ -10,6 +10,6 @@ #else #warning objc_msgSend() not implemented for your architecture #endif -#if HAS_SECTION_DIRECTIVE +#ifdef __ELF__ .section .note.GNU-stack,"",%progbits #endif