Record dynamic dependencies in .note.dlopen elf section

This commit is contained in:
Anonymous Maarten authored and GitHub committed 2025-08-27 16:11:39 +00:00
1 parent 152ba829a1
commit 0a6b80717c
26 files changed
+435 -36

No files matched your search

+9 -2
View File
@@ -53,6 +53,13 @@ struct SDL_PrivateAudioData
#define LIB_AAUDIO_SO "libaaudio.so"
SDL_ELF_NOTE_DLOPEN(
"audio-aaudio",
"Support for audio through AAudio",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
LIB_AAUDIO_SO
);
typedef struct AAUDIO_Data
{
SDL_SharedObject *handle;
@@ -313,8 +320,8 @@ static bool BuildAAudioStream(SDL_AudioDevice *device)
ctx.AAudioStreamBuilder_setFormat(builder, format);
ctx.AAudioStreamBuilder_setSampleRate(builder, device->spec.freq);
ctx.AAudioStreamBuilder_setChannelCount(builder, device->spec.channels);
// If no specific buffer size has been requested, the device will pick the optimal
// If no specific buffer size has been requested, the device will pick the optimal
if(SDL_GetHint(SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES)) {
ctx.AAudioStreamBuilder_setBufferCapacityInFrames(builder, 2 * device->sample_frames); // AAudio requires that the buffer capacity is at least
ctx.AAudioStreamBuilder_setFramesPerDataCallback(builder, device->sample_frames); // twice the size of the data callback buffer size
+7
View File
@@ -207,6 +207,13 @@ static bool load_alsa_syms(void)
#ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
SDL_ELF_NOTE_DLOPEN(
"audio-libalsa",
"Support for audio through libalsa",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
SDL_AUDIO_DRIVER_ALSA_DYNAMIC
);
static void UnloadALSALibrary(void)
{
if (alsa_handle) {
+7
View File
@@ -50,6 +50,13 @@ static bool load_jack_syms(void);
#ifdef SDL_AUDIO_DRIVER_JACK_DYNAMIC
SDL_ELF_NOTE_DLOPEN(
"audio-libjack",
"Support for audio through libjack",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
SDL_AUDIO_DRIVER_JACK_DYNAMIC
);
static const char *jack_library = SDL_AUDIO_DRIVER_JACK_DYNAMIC;
static SDL_SharedObject *jack_handle = NULL;
+7
View File
@@ -93,6 +93,13 @@ static int (*PIPEWIRE_pw_properties_setf)(struct pw_properties *, const char *,
#ifdef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
SDL_ELF_NOTE_DLOPEN(
"audio-libpipewire",
"Support for audio through libpipewire",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
);
static const char *pipewire_library = SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC;
static SDL_SharedObject *pipewire_handle = NULL;
+7
View File
@@ -133,6 +133,13 @@ static bool load_pulseaudio_syms(void);
#ifdef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
SDL_ELF_NOTE_DLOPEN(
"audio-libpulseaudio",
"Support for audio through libpulseaudio",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
);
static const char *pulseaudio_library = SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC;
static SDL_SharedObject *pulseaudio_handle = NULL;
+7
View File
@@ -108,6 +108,13 @@ static bool load_sndio_syms(void)
#ifdef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
SDL_ELF_NOTE_DLOPEN(
"audio-libsndio",
"Support for audio through libsndio",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
);
static void UnloadSNDIOLibrary(void)
{
if (sndio_handle) {