Skip to content

Commit e54e117

Browse files
committed
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: 80cd067 Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
1 parent e3bcb9a commit e54e117

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libavutil/x86/x86util.asm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,9 +1028,11 @@
10281028
; on such files. Emit a dummy byte in a COMDAT section to work around this.
10291029
; The linker will discard it since __x86util_notref is not referenced anywhere.
10301030
%ifidn __OUTPUT_FORMAT__,win64
1031-
section .text$1 comdat=2:__x86util_notref
1031+
section .text
1032+
section .text$__x86util_notref comdat=2:__x86util_notref
10321033
db 0
10331034
%elifidn __OUTPUT_FORMAT__,win32
1034-
section .text$1 comdat=2:__x86util_notref
1035+
section .text
1036+
section .text$__x86util_notref comdat=2:__x86util_notref
10351037
db 0
10361038
%endif

0 commit comments

Comments
 (0)