summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-09 22:40:15 +0800
committerruki <[email protected]>2025-12-09 22:40:15 +0800
commit4840a395c687cb90c0821f7ce9b075eaa9160465 (patch)
tree705cbaf44141b1ad033133b58a1f1ed7b26db5c4
parent841d121decc17e2fe5eb6c7930e4ca4d805b28fd (diff)
continue to improve export_all
-rw-r--r--xmake/rules/utils/symbols/export_all/export_all.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua
index 039c190cc..8c93fc555 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -163,8 +163,9 @@ function _get_allsymbols_by_readsyms(target, opt)
local sourcefile = sourcefiles_map[objectfile]
for _, sym in ipairs(symbols) do
if sym.name and sym.type then
- -- only export defined symbols (not undefined 'U')
- if sym.type ~= "U" then
+ -- only export function symbols (T/t) for DLL exports
+ -- skip data (D/d), bss (B/b), other sections (S/s), and undefined (U) symbols
+ if sym.type == "T" or sym.type == "t" then
local symbol = sym.name
-- we need ignore DllMain, https://github.com/xmake-io/xmake/issues/3992
if target:is_arch("x86") and symbol:startswith("_") and not symbol:startswith("__") and not symbol:startswith("_DllMain@") then