From 55bbcd8748d6ff719fb6eb29b188bfcf624c6f9b Mon Sep 17 00:00:00 2001 From: theraven Date: Fri, 13 Dec 2013 09:13:27 +0000 Subject: [PATCH] Only emit section directives on ELF platforms. --- CMakeLists.txt | 5 ----- block_trampolines.S | 2 +- objc_msgSend.S | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) 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