[FFmpeg-cvslog] x86inc: Use .rdata instead of .rodata on Windows

Henrik Gramner git at videolan.org
Sat Jan 20 20:30:16 EET 2018


ffmpeg | branch: master | Henrik Gramner <henrik at gramner.com> | Tue Aug 15 16:11:32 2017 +0200| [9e4b3675f226238ae132cada2bb82bcb00110aa6] | committer: Henrik Gramner

x86inc: Use .rdata instead of .rodata on Windows

The standard section for read-only data on Windows is .rdata. Nasm will
flag non-standard sections as executable by default which isn't ideal.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e4b3675f226238ae132cada2bb82bcb00110aa6
---

 libavutil/x86/x86inc.asm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index 3b43dbc2e0..57cd4d80de 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -90,6 +90,10 @@
         SECTION .text
     %elifidn __OUTPUT_FORMAT__,coff
         SECTION .text
+    %elifidn __OUTPUT_FORMAT__,win32
+        SECTION .rdata align=%1
+    %elif WIN64
+        SECTION .rdata align=%1
     %else
         SECTION .rodata align=%1
     %endif



More information about the ffmpeg-cvslog mailing list