PR #22656 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22656
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22656.patch

This is needed to cover the case when assembled source doesn't have
.text section. NASM documentation suggest to add $ suffix to section
name for COMDAT in .text, but this actually requires the main .text
section to exist also. And use less generic suffix for our dummy
sub-section.

Third time's the charm.

Fixes: 80cd0677158b7ea4394d8e1594c7a1c984184f5b


From c5e8216b20dbd3ac0da1373acf890711109922c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Mon, 30 Mar 2026 00:35:07 +0200
Subject: [PATCH] avutil/x86/x86util: define .text section additionally to
 COMDAT one

This is needed to cover the case when assembled source doesn't have
.text section. NASM documentation suggest to add $ suffix to section
name for COMDAT in .text, but this actually requires the main .text
section to exist also. And use less generic suffix for our dummy
sub-section.

Third time's the charm.

Fixes: 80cd0677158b7ea4394d8e1594c7a1c984184f5b
---
 libavutil/x86/x86util.asm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index bb60493c09..7b259cae6e 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -1028,9 +1028,11 @@
 ; on such files. Emit a dummy byte in a COMDAT section to work around this.
 ; The linker will discard it since __x86util_notref is not referenced anywhere.
 %ifidn __OUTPUT_FORMAT__,win64
-    section .text$1 comdat=2:__x86util_notref
+    section .text
+    section .text$__x86util_notref comdat=2:__x86util_notref
         db 0
 %elifidn __OUTPUT_FORMAT__,win32
-    section .text$1 comdat=2:__x86util_notref
+    section .text
+    section .text$__x86util_notref comdat=2:__x86util_notref
         db 0
 %endif
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to