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: 80cd067715
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow
2026-03-30 00:35:07 +02:00
parent e3bcb9ac76
commit e54e117998

View File

@@ -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