ovl_offset: use elf symbols instead of refmap

add a plugin_ram_end symbol to plugin.lds and rewrite ovl_offset.pl
to read plugin_ram_end and plugin_load_end_addr from the elf via nm.
this removes all dependence on the linker map file format, which
differs between gnu ld and lld.

Change-Id: I66e623d9a2b44eb84ae7035155c84d8afe46df23
This commit is contained in:
mojyack 2026-04-21 13:31:43 +09:00
parent 018994e8c7
commit e62ac0d2c6
11 changed files with 39 additions and 32 deletions

View file

@ -66,7 +66,7 @@ $(LUA_BUILDDIR)/lua.refmap: $(LUA_OBJ) $(TLSFLIB)
$(LUA_OUTLDS): $(PLUGIN_LDS) $(LUA_BUILDDIR)/lua.refmap
$(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \
$(TOOLSDIR)/ovl_offset.pl $(LUA_BUILDDIR)/lua.refmap))
$(TOOLSDIR)/ovl_offset.pl $(LUA_BUILDDIR)/lua.refelf))
$(LUA_BUILDDIR)/lua.ovl: $(LUA_OBJ) $(TLSFLIB) $(LUA_OUTLDS)
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \