From b65fbee1d94f3d3b643f45717970df29d520a6b5 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 23 Dec 2025 19:27:58 +0100
Subject: [PATCH] Add ELF dlnotes
---
src/decoder_flac.c | 9 +++++++++
src/decoder_fluidsynth.c | 9 +++++++++
src/decoder_gme.c | 9 +++++++++
src/decoder_mpg123.c | 9 +++++++++
src/decoder_opus.c | 9 +++++++++
src/decoder_vorbis.c | 9 +++++++++
src/decoder_wavpack.c | 9 +++++++++
src/decoder_xmp.c | 9 +++++++++
8 files changed, 72 insertions(+)
diff --git a/src/decoder_flac.c b/src/decoder_flac.c
index 93a83ec7..159e44a5 100644
--- a/src/decoder_flac.c
+++ b/src/decoder_flac.c
@@ -25,6 +25,15 @@
#include <FLAC/stream_decoder.h>
+#if defined(FLAC_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "flac",
+ "Support for FLAC audio using libFLAC",
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ FLAC_DYNAMIC
+);
+#endif
+
#ifdef FLAC_DYNAMIC
#define MIX_LOADER_DYNAMIC FLAC_DYNAMIC
#endif
diff --git a/src/decoder_fluidsynth.c b/src/decoder_fluidsynth.c
index 48b5fed4..f137a601 100644
--- a/src/decoder_fluidsynth.c
+++ b/src/decoder_fluidsynth.c
@@ -27,6 +27,15 @@
#include <fluidsynth.h>
+#if defined(FLUIDSYNTH_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "midi-fluidsynth",
+ "Support for MIDI audio using FluidSynth",
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ FLUIDSYNTH_DYNAMIC
+);
+#endif
+
#ifdef FLUIDSYNTH_DYNAMIC
#define MIX_LOADER_DYNAMIC FLUIDSYNTH_DYNAMIC
#endif
diff --git a/src/decoder_gme.c b/src/decoder_gme.c
index 065e4f43..f1d4d048 100644
--- a/src/decoder_gme.c
+++ b/src/decoder_gme.c
@@ -25,6 +25,15 @@
#include <gme/gme.h>
+#if defined(FLUIDSYNTH_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "gme",
+ "Support for audio of classic video game consoles using game-music-emu",
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ GME_DYNAMIC
+);
+#endif
+
#ifdef GME_DYNAMIC
#define MIX_LOADER_DYNAMIC GME_DYNAMIC
#endif
diff --git a/src/decoder_mpg123.c b/src/decoder_mpg123.c
index 11e45271..2c612546 100644
--- a/src/decoder_mpg123.c
+++ b/src/decoder_mpg123.c
@@ -23,6 +23,15 @@
#include "SDL_mixer_internal.h"
+#if defined(MPG123_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "mp3",
+ "Support for MP3 audio using mpg123",
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ MPG123_DYNAMIC
+);
+#endif
+
#define MPG123_ENUM_API /* for mpg123_param() */
#include <stdio.h> // SEEK_SET
#include <mpg123.h>
diff --git a/src/decoder_opus.c b/src/decoder_opus.c
index f6c67e2b..f767d0c0 100644
--- a/src/decoder_opus.c
+++ b/src/decoder_opus.c
@@ -27,6 +27,15 @@
#include <opusfile.h>
+#if defined(OPUS_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "opus",
+ "Support for OPUS audio using opusfile",
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ OPUS_DYNAMIC
+);
+#endif
+
#ifdef OPUS_DYNAMIC
#define MIX_LOADER_DYNAMIC OPUS_DYNAMIC
#endif
diff --git a/src/decoder_vorbis.c b/src/decoder_vorbis.c
index 3ad8b12c..35b8b8be 100644
--- a/src/decoder_vorbis.c
+++ b/src/decoder_vorbis.c
@@ -34,6 +34,15 @@
#include <vorbis/vorbisfile.h>
#endif
+#if defined(MPG123_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "vorbis",
+ "Support for VORBIS audio", // vorbisfile or tremor
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ VORBIS_DYNAMIC
+);
+#endif
+
#ifdef VORBIS_DYNAMIC
#define MIX_LOADER_DYNAMIC VORBIS_DYNAMIC
#endif
diff --git a/src/decoder_wavpack.c b/src/decoder_wavpack.c
index f3fd0ace..eb87fd2e 100644
--- a/src/decoder_wavpack.c
+++ b/src/decoder_wavpack.c
@@ -25,6 +25,15 @@
#include "SDL_mixer_internal.h"
+#if defined(WAVPACK_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "wavpack",
+ "Support for WAVPACK audio using WavPack",
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ WAVPACK_DYNAMIC
+);
+#endif
+
#define WAVPACK_DBG 0
// This file supports WavPack music streams
diff --git a/src/decoder_xmp.c b/src/decoder_xmp.c
index d48b3f64..d8939840 100644
--- a/src/decoder_xmp.c
+++ b/src/decoder_xmp.c
@@ -23,6 +23,15 @@
#include "SDL_mixer_internal.h"
+#if defined(XMP_DYNAMIC) && defined(SDL_ELF_NOTE_DLOPEN)
+SDL_ELF_NOTE_DLOPEN(
+ "midi-xmp",
+ "Support for MIDI audio using libxmp",
+ SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
+ XMP_DYNAMIC
+);
+#endif
+
#ifdef LIBXMP_HEADER
#include LIBXMP_HEADER
#else