Files
FFmpeg/libavutil
Kacper Michajłow 80cd067715 avutil/x86util: don't produce empty object files on win{32,64}
In cases when preprocesor would remove all code, nasm would produce
empty object files. This is technically not wrong, but often cause
issues with various tooling:

* NASM fails to emit CodeView debug info when there is no code [1]
* Older VS2022 builds hangs on empty files [2]
* GNU binutils `strip` errors when there is no sections [3]
error: the input file '.o' has no sections

Workaround those issues by adding dummy byte in COMDAT section,
which is then dropped by linker, as the `__x86util_notref` symbol is not
referenced from C. [4] IMAGE_COMDAT_SELECT_ANY (2) is used to allow
multiple symbol definition.

This is limited to win{32,64} as this is the target where issues were
observed.

[1] https://github.com/netwide-assembler/nasm/issues/216
[2] https://developercommunity.visualstudio.com/t/MSVC-Hangs-when-compiling-ffmpeg-When-l/10233953
[3] https://trac.ffmpeg.org/ticket/6711
[4] https://www.nasm.us/docs/3.01/nasm09.html#section-9.6.1

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-29 23:00:06 +02:00
..
2025-08-03 13:48:47 +02:00
2021-04-27 10:43:13 -03:00
2024-07-21 17:02:12 +02:00
2025-05-07 15:35:47 +02:00
2024-03-04 17:45:00 +01:00
2025-08-03 13:48:47 +02:00
2026-03-02 11:55:30 +01:00
2023-11-18 19:55:42 +01:00
2024-03-15 12:51:15 +01:00
2025-09-02 17:05:50 +02:00
2026-03-07 00:54:49 +00:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2026-01-18 03:33:04 +00:00
2025-08-03 13:48:47 +02:00
2025-12-23 03:39:16 +00:00
2025-08-03 13:48:47 +02:00
2024-06-01 18:05:58 +03:00
2025-08-03 13:48:47 +02:00
2021-07-21 16:35:27 +02:00
2023-09-07 00:42:10 +02:00
2021-07-22 14:34:31 +02:00
2023-09-07 00:42:10 +02:00
2023-09-07 00:42:10 +02:00
2021-07-22 14:34:31 +02:00
2025-08-03 13:48:47 +02:00
2024-03-31 00:08:43 +01:00
2025-09-02 17:05:50 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2021-07-22 14:34:31 +02:00
2024-01-16 01:34:57 +01:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2025-08-03 13:48:47 +02:00
2021-07-22 14:34:31 +02:00
2022-10-17 09:51:47 +02:00
2023-09-07 00:42:10 +02:00
2025-08-03 13:48:47 +02:00
2023-08-08 09:46:11 +02:00
2025-08-03 13:48:47 +02:00