diff mbox

[FFmpeg-devel,2/5] x86inc: Use .rdata instead of .rodata on Windows

Message ID 20180118230615.16966-3-henrik@gramner.com
State Accepted
Commit 9e4b3675f226238ae132cada2bb82bcb00110aa6
Headers show

Commit Message

Henrik Gramner Jan. 18, 2018, 11:06 p.m. UTC
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.
 libavutil/x86/x86inc.asm | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox


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
         SECTION .rodata align=%1