diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 7b259cae6e..da41e2e5ef 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -1025,14 +1025,12 @@ ; NASM panics when emitting CodeView debug info for an empty translation unit. ; GNU binutils `strip` and some other tools such as older MSVC linker also fail -; 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. +; on such files. Emit a dummy byte in a section with IMAGE_SCN_LNK_REMOVE flag +; to work around these issues. Sections like that are dropped by the linker. %ifidn __OUTPUT_FORMAT__,win64 - section .text - section .text$__x86util_notref comdat=2:__x86util_notref + section .x86util info db 0 %elifidn __OUTPUT_FORMAT__,win32 - section .text - section .text$__x86util_notref comdat=2:__x86util_notref + section .x86util info db 0 %endif