From e54e1179985145a2e0a5be9ee9000384ee58b7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 30 Mar 2026 00:35:07 +0200 Subject: [PATCH] avutil/x86/x86util: define .text section additionally to COMDAT one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Kacper Michajłow --- 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