This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 7d57621b83 avutil/x86/x86util: tone down NASM workaround and use info 
section
7d57621b83 is described below

commit 7d57621b832a68c7b150fb2aab1c02e14c82144d
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Mon Mar 30 19:38:10 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Mon Mar 30 19:46:53 2026 +0200

    avutil/x86/x86util: tone down NASM workaround and use info section
    
    The use of code section (.text) was forced by the unreleased NASM
    3.02rc3 which made the issue worse, but preventing assambling anything
    without code section, including when only data was present.
    
    This works fine for the most part, but using code (.text) section with
    IMAGE_COMDAT_SELECT_ANY causes issues with lib.exe after stripping such
    object:
    fatal error LNK1143: invalid or corrupt file: no symbol for COMDAT section 
0x2
    
    Esentially it makes our workaround not work in all cases, and while
    string could be disabled like it already is for MSVC/ICL builds, it used
    to work so let's preserve that state.
    
    This make it not compatible with NASM 3.02rc3 when CV debug info is
    generated, but hopefully the upstream fix will be merged before release,
    to avoid this regression:
    https://github.com/netwide-assembler/nasm/pull/221
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavutil/x86/x86util.asm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

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

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

Reply via email to