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

(cherry picked from commit b4e85f760b6b77d276747c9beb6191bfb864e0c2)
This commit is contained in:
Warner Losh 2024-02-24 17:57:13 -07:00
parent 6cad882b7e
commit 88ec6ce7d1
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -34,8 +34,9 @@ int luaopen_pager(lua_State *);
#include <sys/linker_set.h>
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);