diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9b763dee3..80d5e3800 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -299,9 +299,9 @@ if( NOT NO_ASM ) if( APPLE ) set( ASM_FLAGS -fmacho -DM_TARGET_MACHO ) else( APPLE ) - set( ASM_FLAGS -felf ) + set( ASM_FLAGS -felf -DM_TARGET_LINUX ) endif( APPLE ) - set( ASM_FLAGS "${ASM_FLAGS}" -DM_TARGET_LINUX -i${CMAKE_CURRENT_SOURCE_DIR}/ ) + set( ASM_FLAGS "${ASM_FLAGS}" -i${CMAKE_CURRENT_SOURCE_DIR}/ ) set( ASM_SOURCE_EXTENSION .asm ) endif( X64 ) else( UNIX ) diff --git a/src/asm_ia32/a.asm b/src/asm_ia32/a.asm index 07b00fe25..d68fba116 100644 --- a/src/asm_ia32/a.asm +++ b/src/asm_ia32/a.asm @@ -100,8 +100,8 @@ setupvlineasm: %endif %ifdef M_TARGET_MACHO -GLOBAL rtext_a_start -rtext_a_start: +GLOBAL _rtext_a_start +_rtext_a_start: %endif ;eax = xscale @@ -334,6 +334,7 @@ setupmvlineasm: mov ecx, dword [esp+4] mov byte [maskmach3a+2], cl mov byte [machmv13+2], cl + mov byte [machmv14+2], cl mov byte [machmv15+2], cl mov byte [machmv16+2], cl @@ -549,6 +550,6 @@ mvcase0: jmp beginmvlineasm4 align 16 %ifdef M_TARGET_MACHO -GLOBAL rtext_a_end -rtext_a_end: +GLOBAL _rtext_a_end +_rtext_a_end: %endif diff --git a/src/asm_ia32/tmap.asm b/src/asm_ia32/tmap.asm index 04b86d09d..e9713131f 100644 --- a/src/asm_ia32/tmap.asm +++ b/src/asm_ia32/tmap.asm @@ -292,8 +292,8 @@ aret: ret %endif %ifdef M_TARGET_MACHO -GLOBAL rtext_tmap_start -rtext_tmap_start: +GLOBAL _rtext_tmap_start +_rtext_tmap_start: %endif rtext_start: @@ -1748,8 +1748,8 @@ ac4nil: pop edi rtext_end: %ifdef M_TARGET_MACHO -GLOBAL rtext_tmap_end -rtext_tmap_end: +GLOBAL _rtext_tmap_end +_rtext_tmap_end: %endif align 16 diff --git a/src/asm_ia32/tmap2.asm b/src/asm_ia32/tmap2.asm index 63eee0044..e1f166878 100644 --- a/src/asm_ia32/tmap2.asm +++ b/src/asm_ia32/tmap2.asm @@ -220,8 +220,8 @@ SetTiltedSpanSize: SECTION .rtext progbits alloc exec write align=64 %else SECTION .text align=64 -GLOBAL rtext_tmap2_start -rtext_tmap2_start: +GLOBAL _rtext_tmap2_start +_rtext_tmap2_start: %endif rtext_start: @@ -635,6 +635,6 @@ fetch10 mov al,[ebp+esi+SPACEFILLER4] rtext_end: %ifdef M_TARGET_MACHO -GLOBAL rtext_tmap2_end -rtext_tmap2_end: +GLOBAL _rtext_tmap2_end +_rtext_tmap2_end: %endif diff --git a/src/asm_ia32/tmap3.asm b/src/asm_ia32/tmap3.asm index 3791b4ff0..3161ff368 100644 --- a/src/asm_ia32/tmap3.asm +++ b/src/asm_ia32/tmap3.asm @@ -82,8 +82,8 @@ setupvlinetallasm: %ifdef M_TARGET_MACHO SECTION .text align=64 -GLOBAL rtext_tmap3_start -rtext_tmap3_start: +GLOBAL _rtext_tmap3_start +_rtext_tmap3_start: %else SECTION .rtext progbits alloc exec write align=64 %endif @@ -339,6 +339,6 @@ shift12: shr ecx,16 ret %ifdef M_TARGET_MACHO -GLOBAL rtext_tmap3_end -rtext_tmap3_end: +GLOBAL _rtext_tmap3_end +_rtext_tmap3_end: %endif