summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-09 22:58:49 +0800
committerruki <[email protected]>2025-12-09 22:58:49 +0800
commit06561a0bf8a82d2d6bed52daee8bbd3963f797b4 (patch)
tree8bccd1dc18e01293dbc6adf0fb4f17874c5348ad
parent9bcc8fdd4eecb665ea98a38e3fa03b889663922a (diff)
improve readsyms
-rw-r--r--xmake/modules/utils/binary/readsyms.lua16
-rw-r--r--xmake/modules/utils/run_script.lua2
2 files changed, 9 insertions, 9 deletions
diff --git a/xmake/modules/utils/binary/readsyms.lua b/xmake/modules/utils/binary/readsyms.lua
index e5954e92a..0641d79e9 100644
--- a/xmake/modules/utils/binary/readsyms.lua
+++ b/xmake/modules/utils/binary/readsyms.lua
@@ -83,19 +83,19 @@ end
-- read symbols from object file(s) (auto-detect format: ELF, COFF, Mach-O)
--
--- @param binaryfile the object file path or table of object files (required)
--- @return the symbols table (all symbols from all files if table is provided)
-function main(binaryfile)
- assert(binaryfile, "usage: xmake l utils.binary.readsyms <binaryfile> or readsyms(binaryfiles)")
+-- @param binaryfiles the object file path or table of object files (required)
+-- @return the symbols table (all symbols from all files if table is provided)
+function main(binaryfiles)
+ assert(binaryfiles, "usage: xmake l utils.binary.readsyms <binaryfile> or readsyms(binaryfiles)")
local all_symbols = {}
- if type(binaryfile) == "string" then
+ if type(binaryfiles) == "string" then
-- single file
- return _get_symbols(binaryfile)
+ return _get_symbols(binaryfiles)
else
-- multiple files
- for _, objectfile in ipairs(binaryfile) do
- local symbols = _get_symbols(objectfile)
+ for _, binaryfile in ipairs(binaryfiles) do
+ local symbols = _get_symbols(binaryfile)
if symbols then
for _, sym in ipairs(symbols) do
table.insert(all_symbols, sym)
diff --git a/xmake/modules/utils/run_script.lua b/xmake/modules/utils/run_script.lua
index 82fa8cb0d..e6f8469f6 100644
--- a/xmake/modules/utils/run_script.lua
+++ b/xmake/modules/utils/run_script.lua
@@ -198,7 +198,7 @@ function main(script, opt)
table.insert(argv, arg)
end
local thread_opt = {
- curdir = curdir,
+ curdir = opt.curdir,
command = opt.command,
deserialize = opt.deserialize,
arguments = argv,