[FFmpeg-cvslog] arm: Create proper .rdata sections for COFF

Martin Storsjö git at videolan.org
Wed Feb 20 19:49:48 EET 2019


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Jan 11 15:23:16 2019 +0200| [41cf3e3b1ca375962951fde1b90a03b16197d205] | committer: Martin Storsjö

arm: Create proper .rdata sections for COFF

As .rodata isn't one of the default created sections for COFF, it was
created as a read-write data section. By using the default .rdata
section name for COFF, it automatically becomes a read-only data section.
The existing ".section .rodata" works as intended for ELF though.

This is based on an original patch and diagnose by Tom Tan
<Tom.Tan at microsoft.com>.

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavutil/aarch64/asm.S | 2 ++
 libavutil/arm/asm.S     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S
index 15b55d57d2..bf5c1b7ee1 100644
--- a/libavutil/aarch64/asm.S
+++ b/libavutil/aarch64/asm.S
@@ -63,6 +63,8 @@ ELF     .size   \name, . - \name
 .else
         .section        .rodata
 .endif
+#elif defined(_WIN32)
+        .section        .rdata
 #elif !defined(__MACH__)
         .section        .rodata
 #else
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index 62ce493180..9842d03bc0 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -125,6 +125,8 @@ ELF     .size   \name, . - \name
 .else
         .section        .rodata
 .endif
+#elif defined(_WIN32)
+        .section        .rdata
 #elif !defined(__MACH__)
         .section        .rodata
 #else



More information about the ffmpeg-cvslog mailing list