Commit 41cf3e3b authored by Martin Storsjö's avatar 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@microsoft.com>.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent ca44fa5d
...@@ -63,6 +63,8 @@ ELF .size \name, . - \name ...@@ -63,6 +63,8 @@ ELF .size \name, . - \name
.else .else
.section .rodata .section .rodata
.endif .endif
#elif defined(_WIN32)
.section .rdata
#elif !defined(__MACH__) #elif !defined(__MACH__)
.section .rodata .section .rodata
#else #else
......
...@@ -125,6 +125,8 @@ ELF .size \name, . - \name ...@@ -125,6 +125,8 @@ ELF .size \name, . - \name
.else .else
.section .rodata .section .rodata
.endif .endif
#elif defined(_WIN32)
.section .rdata
#elif !defined(__MACH__) #elif !defined(__MACH__)
.section .rodata .section .rodata
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment