From 5b68925f3afe996fc23712f683bc35c696103ee4 Mon Sep 17 00:00:00 2001 From: Zebin Wu Date: Fri, 22 Dec 2023 23:48:02 +0800 Subject: [PATCH] esp32: add linker fragment file --- platform/esp/cmake/platform.cmake | 4 ++ platform/esp/linker.lf | 109 ++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 platform/esp/linker.lf diff --git a/platform/esp/cmake/platform.cmake b/platform/esp/cmake/platform.cmake index 3e7dcf8..8d0e73e 100644 --- a/platform/esp/cmake/platform.cmake +++ b/platform/esp/cmake/platform.cmake @@ -21,6 +21,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(BRIDGE_EMBEDFS_ROOT bridge_embedfs_root) include($ENV{IDF_PATH}/tools/cmake/idf.cmake) +include($ENV{IDF_PATH}/tools/cmake/ldgen.cmake) include(${CMAKE_CURRENT_LIST_DIR}/extension.cmake) if(NOT $ENV{IDF_VERSION} STREQUAL ${REQUIRED_IDF_VERSION}) @@ -72,3 +73,6 @@ spiffs_create_partition_image(storage ${STORAGE_DIR} FLASH_IN_PROJECT ) + +# Add linker fragment file +__ldgen_add_fragment_files(${CMAKE_CURRENT_LIST_DIR}/../linker.lf) diff --git a/platform/esp/linker.lf b/platform/esp/linker.lf new file mode 100644 index 0000000..dd097e8 --- /dev/null +++ b/platform/esp/linker.lf @@ -0,0 +1,109 @@ +[mapping:lua] +archive: liblua.a +entries: + lapi:index2value (noflash_text) + lgc:reallymarkobject (noflash_text) + lgc:getgclist (noflash_text) + ltable:luaH_realasize (noflash_text) + ltable:mainpositionTV (noflash_text) + ltable:equalkey (noflash_text) + lapi:lua_type (noflash_text) + lapi:lua_settop (noflash_text) + lapi:gettable (noflash_text) + lundump:loadByte (noflash_text) + ltable:findindex (noflash_text) + ltable:luaH_next (noflash_text) + lapi:lua_next (noflash_text) + lgc:singlestep (noflash_text) + lgc:linkgclist_ (noflash_text) + lgc:propagatemark (noflash_text) + lvm:luaV_equalobj (noflash_text) + ltable:getgeneric (noflash_text) + lapi:lua_rawequal (noflash_text) + ltable:luaH_getshortstr (noflash_text) + lundump:loadUnsigned (noflash_text) + lmem:luaM_free_ (noflash_text) + lstring:luaS_newlstr (noflash_text) + lmem:luaM_malloc_ (noflash_text) + lstring:luaS_hash (noflash_text) + lstring:internshrstr (noflash_text) + lgc:clearkey (noflash_text) + ltable:luaH_finishset (noflash_text) + lgc:genlink (noflash_text) + ltable:luaH_newkey (noflash_text) + lundump:loadInt (noflash_text) + lgc:freeobj (noflash_text) + lgc:luaC_newobj (noflash_text) + ltable:luaH_get (noflash_text) + lundump:loadBlock (noflash_text) + lzio:luaZ_read (noflash_text) + lundump:loadSize (noflash_text) + lundump:loadStringN (noflash_text) + lapi:lua_tolstring (noflash_text) + ldo:prepCallInfo (noflash_text) + ltable:luaH_set (noflash_text) + ldo:luaD_poscall (noflash_text) + ldo:moveresults (noflash_text) + ldo:luaD_precall (noflash_text) + lstring:createstrobj (noflash_text) + ldo:precallC (noflash_text) + lstring:luaS_remove (noflash_text) + lstring:luaS_new (noflash_text) + lapi:lua_pushlstring (noflash_text) + lstrlib:singlematch (noflash_text) + lundump:loadString (noflash_text) + lapi:lua_pushnil (noflash_text) + lstrlib:match (noflash_text) + ltable:getfreepos (noflash_text) + lvm:luaV_finishset (noflash_text) + ltable:luaH_getstr (noflash_text) + ltable:freehash (noflash_text) + ltable:setnodevector (noflash_text) + lstrlib:classend (noflash_text) + ltable:setlimittosize (noflash_text) + lapi:lua_pushvalue (noflash_text) + ltable:mainpositionfromnode (noflash_text) + lauxlib:luaL_checklstring (noflash_text) + lapi:lua_tointegerx (noflash_text) + lstrlib:reprepstate (noflash_text) + lapi:auxgetstr (noflash_text) + lapi:lua_getfield (noflash_text) + lauxlib:luaL_addlstring (noflash_text) + lmem:luaM_realloc_ (noflash_text) + lapi:aux_rawset (noflash_text) + ltable:exchangehashpart (noflash_text) + ltable:luaH_resize (noflash_text) + lobject:luaO_ceillog2 (noflash_text) + lauxlib:luaL_checkinteger (noflash_text) + lvm:luaV_finishget (noflash_text) + lapi:lua_rawset (noflash_text) + lapi:index2stack (noflash_text) + lapi:lua_rotate (noflash_text) + lapi:getbuff (noflash_text) + lapi:lua_pushinteger (noflash_text) + lgc:sweeplist (noflash_text) + lapi:lua_gettop (noflash_text) + lobject:addstr2buff (noflash_text) + lapi:lua_pushlightuserdata (noflash_text) + lauxlib:luaL_addstring (noflash_text) + lauxlib:luaL_buffinit (noflash_text) + ltm:luaT_gettmbyobj (noflash_text) + lapi:lua_getmetatable (noflash_text) + lstrlib:match_class (noflash_text) + lauxlib:luaL_addvalue (noflash_text) + lapi:lua_checkstack (noflash_text) + lapi:lua_toboolean (noflash_text) + ltable:luaH_free (noflash_text) + ltable:luaH_new (noflash_text) + lapi:lua_touserdata (noflash_text) + lgc:sweepstep (noflash_text) + ldo:luaD_callnoyield (noflash_text) + lauxlib:luaL_pushresult (noflash_text) + lapi:lua_pushstring (noflash_text) + lapi:lua_callk (noflash_text) + lauxlib:luaL_checkstack (noflash_text) + lstrlib:matchbracketclass (noflash_text) + lauxlib:luaL_checkudata (noflash_text) + lauxlib:luaL_testudata (noflash_text) + ltable:luaH_getint (noflash_text) + lapi:lua_isstring (noflash_text)