summaryrefslogtreecommitdiff
path: root/xmake/modules/utils/binary/readsyms.lua
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 /xmake/modules/utils/binary/readsyms.lua
parent9bcc8fdd4eecb665ea98a38e3fa03b889663922a (diff)
improve readsyms
Diffstat (limited to 'xmake/modules/utils/binary/readsyms.lua')
-rw-r--r--xmake/modules/utils/binary/readsyms.lua16
1 files changed, 8 insertions, 8 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)