[x264-devel] arm: Use .section .rodata for non-elf, non-mach platforms as well

Martin Storsjö git at videolan.org
Mon May 22 00:01:58 CEST 2017


x264 | branch: master | Martin Storsjö <martin at martin.st> | Fri Mar 24 11:33:44 2017 +0200| [196d7676c8f40b7c1f8f2f4af64e09ebf4c9816b] | committer: Henrik Gramner

arm: Use .section .rodata for non-elf, non-mach platforms as well

If targeting windows with armasm, gas-preprocessor can rewrite the
.section .rodata into the right construct for that platform.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=196d7676c8f40b7c1f8f2f4af64e09ebf4c9816b
---

 common/arm/asm.S | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/arm/asm.S b/common/arm/asm.S
index 5eb2881f..c46b61b1 100644
--- a/common/arm/asm.S
+++ b/common/arm/asm.S
@@ -54,8 +54,10 @@
 
 #ifdef __MACH__
 #   define MACH
+#   define NONMACH @
 #else
 #   define MACH @
+#   define NONMACH
 #endif
 
 #if HAVE_AS_FUNC
@@ -108,7 +110,7 @@ ELF     .size   \name, . - \name
 .if HAVE_SECTION_DATA_REL_RO && \relocate
         .section        .data.rel.ro
 .else
-ELF     .section        .rodata
+NONMACH .section        .rodata
 MACH    .const_data
 .endif
         .align          \align



More information about the x264-devel mailing list