From b4e85f760b6b77d276747c9beb6191bfb864e0c2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 24 Feb 2024 17:57:13 -0700 Subject: [PATCH] loader/efi: Use unique linker set for lua After the linker set cleanup in ldscripts, there's now only one place we need to know the linkerset name, so go ahead and change the lua interpreter augmentation linker set to be uniquely named. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D44062 --- stand/efi/loader/Makefile | 2 +- stand/liblua/lutils.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 2031400814e..bb95b648064 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -117,7 +117,7 @@ ${LOADER}.efi: ${PROG} ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ - -j set_Xficl_compile_set \ + -j set_Xficl_compile_set -j set_Xlua_compile_set \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a diff --git a/stand/liblua/lutils.h b/stand/liblua/lutils.h index 522abfd3d0d..ea715096df0 100644 --- a/stand/liblua/lutils.h +++ b/stand/liblua/lutils.h @@ -34,8 +34,9 @@ int luaopen_pager(lua_State *); #include typedef void lua_init_md_t(lua_State *); +#define _LUA_COMPIE_SET Xlua_compile_set #define LUA_COMPILE_SET(func) \ - DATA_SET(Xficl_compile_set, func) /* XXX linker set know by ldscrips */ + DATA_SET(_LUA_COMPILE_SET, func) #define LUA_FOREACH_SET(s) \ - SET_FOREACH((s), Xficl_compile_set) -SET_DECLARE(Xficl_compile_set, lua_init_md_t); + SET_FOREACH((s), _LUA_COMPILE_SET) +SET_DECLARE(_LUA_COMPILE_SET, lua_init_md_t); -- 2.45.0