diff mbox

[FFmpeg-devel] Fix gas-preprocessor to translate .rdata sections for armasm and armasm64

Message ID 1N17UW-1i8BAW3Dic-012UYJ@mail.gmx.com
State New
Headers show

Commit Message

Lukas Fellechner Oct. 1, 2019, 6:37 p.m. UTC
Compiling FFmpeg with gas-preprocessor.pl and armasm or armasm64 fails since FFmpeg 4.2.

New .rdata sections have been added in ARM NEON assembly code (e.g. libavutil/aarch64/asm.S).
This fix allows gas-preprocessor to translate those sections to armasm compatible code.

Gas-preprocessor is maintained in https://github.com/FFmpeg/gas-preprocessor

---
 gas-preprocessor.pl | 1 +
 1 file changed, 1 insertion(+)

Comments

Martin Storsjö Oct. 2, 2019, 8:56 a.m. UTC | #1
> On Oct 1, 2019, at 21:37, Lukas Fellechner <lukas.fellechner@gmx.net> wrote:
> 
> Compiling FFmpeg with gas-preprocessor.pl and armasm or armasm64 fails since FFmpeg 4.2.
> 
> New .rdata sections have been added in ARM NEON assembly code (e.g. libavutil/aarch64/asm.S).
> This fix allows gas-preprocessor to translate those sections to armasm compatible code.
> 
> Gas-preprocessor is maintained in https://github.com/FFmpeg/gas-preprocessor
> 
> ---
> gas-preprocessor.pl | 1 +
> 1 file changed, 1 insertion(+)

A fix for this issue, and a lot of other fixes as well not present in the repo referenced above, exist at https://git.libav.org/?p=gas-preprocessor.git;a=summary.

// Martin
Lukas Fellechner Oct. 3, 2019, 11:20 a.m. UTC | #2
> > Compiling FFmpeg with gas-preprocessor.pl and armasm or armasm64 fails since FFmpeg 4.2.
> > 
> > New .rdata sections have been added in ARM NEON assembly code (e.g. libavutil/aarch64/asm.S).
> > This fix allows gas-preprocessor to translate those sections to armasm compatible code.
> > 
> > Gas-preprocessor is maintained in https://github.com/FFmpeg/gas-preprocessor
> > 
> > ---
> > gas-preprocessor.pl | 1 +
> > 1 file changed, 1 insertion(+)
> 
> A fix for this issue, and a lot of other fixes as well not present in the repo referenced above, exist at https://git.libav.org/?p=gas-preprocessor.git;a=summary.
> 
> // Martin

Thank you, indeed the updated preprocessor fixes the build for me. 
Maybe the changes form libav should be merged into the FFmpeg repository then?

Lukas
Michael Niedermayer Oct. 3, 2019, 7:51 p.m. UTC | #3
On Thu, Oct 03, 2019 at 01:20:25PM +0200, Lukas Fellechner wrote:
> > > Compiling FFmpeg with gas-preprocessor.pl and armasm or armasm64 fails since FFmpeg 4.2.
> > > 
> > > New .rdata sections have been added in ARM NEON assembly code (e.g. libavutil/aarch64/asm.S).
> > > This fix allows gas-preprocessor to translate those sections to armasm compatible code.
> > > 
> > > Gas-preprocessor is maintained in https://github.com/FFmpeg/gas-preprocessor
> > > 
> > > ---
> > > gas-preprocessor.pl | 1 +
> > > 1 file changed, 1 insertion(+)
> > 
> > A fix for this issue, and a lot of other fixes as well not present in the repo referenced above, exist at https://git.libav.org/?p=gas-preprocessor.git;a=summary.
> > 
> > // Martin
> 
> Thank you, indeed the updated preprocessor fixes the build for me. 
> Maybe the changes form libav should be merged into the FFmpeg repository then?

I already merged them before martin replied when i saw your patch 
i just didnt reply because of migraine ...

Thx

[...]
Lukas Fellechner Oct. 4, 2019, 11:48 a.m. UTC | #4
> > > > Compiling FFmpeg with gas-preprocessor.pl and armasm or armasm64 fails since FFmpeg 4.2.
> > > > 
> > > > New .rdata sections have been added in ARM NEON assembly code (e.g. libavutil/aarch64/asm.S).
> > > > This fix allows gas-preprocessor to translate those sections to armasm compatible code.
> > > > 
> > > > Gas-preprocessor is maintained in https://github.com/FFmpeg/gas-preprocessor
> > > > 
> > > > ---
> > > > gas-preprocessor.pl | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > 
> > > A fix for this issue, and a lot of other fixes as well not present in the repo referenced above, exist at https://git.libav.org/?p=gas-preprocessor.git;a=summary.
> > > 
> > > // Martin
> >
> > Thank you, indeed the updated preprocessor fixes the build for me. 
> > Maybe the changes form libav should be merged into the FFmpeg repository then?
>
> I already merged them before martin replied when i saw your patch 
> i just didnt reply because of migraine ...
> 
> Thx
> 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thank you Michael, I just compiled successfully with gas-preprocessor from the FFmpeg git repo.

All the best!

Lukas
diff mbox

Patch

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 743ce45..5d1d50d 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -1132,6 +1132,7 @@  sub handle_serialized_line {
         # The alignment in AREA is the power of two, just as .align in gas
         $line =~ s/\.text/AREA |.text|, CODE, READONLY, ALIGN=4, CODEALIGN/;
         $line =~ s/(\s*)(.*)\.rodata/$1AREA |.rodata|, DATA, READONLY, ALIGN=5/;
+        $line =~ s/(\s*)(.*)\.rdata/$1AREA |.rdata|, DATA, READONLY, ALIGN=5/;
         $line =~ s/\.data/AREA |.data|, DATA, ALIGN=5/;
     }
     if ($as_type eq "armasm" and $arch eq "arm") {