Thanks Carl. Martin made a better fix when porting this to libav which uses 
.rdata as section name instead of .rodata with explicit read-only property. 
.rdata is read-only in COFF by default. I updated my patch accordingly, thanks 
Martin.

Yes, this applies to 32-bit arm for Windows, the new patch includes this 
update. This also affects Windows x86/x64, but this has already been handled as 
below macro from FFmpeg\libavutil\x86\x86inc.asm.

%macro SECTION_RODATA 0-1 16
    %ifidn __OUTPUT_FORMAT__,aout
        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
%endmacro

-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of Carl Eugen 
Hoyos
Sent: Friday, January 11, 2019 5:07 AM
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Mark .rodata section as read only in COFF 
object file

2019-01-10 21:14 GMT+01:00, Tom Tan <tom....@microsoft.com>:
> .rodata directive from GAS assembly produces .rodata as read/write for 
> COFF object file by default (object file format for Windows), but read 
> only for ELF. This change marks it as read only explicitly for COFF.
>
> The issue happens when building Chromium for Windows ARM64, with FFmpeg.

Does this issue only apply to arm64 or also 32bit arm?

Carl Eugen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Attachment: 0001-Switch-.rodata-section-name-to-.rdata-for-COFF-objec.patch
Description: 0001-Switch-.rodata-section-name-to-.rdata-for-COFF-objec.patch

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to