From: Luca Boccassi Date: Fri, 17 Jul 2026 18:14:01 +0000 (+0100) Subject: lib/dl-utils: fix build on alpha X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=f96c68ccc6f6bbbd7cca2db6da5d53d489173be1;p=thirdparty%2Futil-linux.git lib/dl-utils: fix build on alpha Import change from systemd's sd-dlopen to fix build on alpha as ".set" is overridden to mean something else, but on hppa ".equ" is also overridden. Signed-off-by: Luca Boccassi --- diff --git a/include/dl-utils.h b/include/dl-utils.h index 2dc7277d7..8799d85c0 100644 --- a/include/dl-utils.h +++ b/include/dl-utils.h @@ -55,10 +55,16 @@ extern int ul_dlopen_symbols(const char *libname, int flags, # define _UL_ELF_NOTE_DLOPEN_SECTION_FLAGS "aGR" #endif +#if defined(__hppa__) || defined(__hppa64__) +# define _UL_ELF_NOTE_DLOPEN_GUARD ".set" +#else +# define _UL_ELF_NOTE_DLOPEN_GUARD ".equ" +#endif + #define _UL_ELF_NOTE_DLOPEN(json) \ __asm__ ( \ ".ifndef \"ul_dlopen:" json "\"\n" \ - ".set \"ul_dlopen:" json "\", 1\n" \ + _UL_ELF_NOTE_DLOPEN_GUARD " \"ul_dlopen:" json "\", 1\n" \ ".pushsection .note.dlopen, \"" _UL_ELF_NOTE_DLOPEN_SECTION_FLAGS "\", %note, \"ul_dlopen:" json "\", comdat\n" \ ".balign 4\n" \ ".long 884f - 883f\n" \