diff options
| author | ruki <[email protected]> | 2025-12-09 00:33:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-09 00:33:18 +0800 |
| commit | 333af0b66dfe73fabb2c900bce00ba2d50bfe622 (patch) | |
| tree | b8e348021f5a4fff963d8d5de320e109339102ae /xmake/modules/utils/binary/readsyms.lua | |
| parent | acd4bfbcf3b73349f6b56197f3c0f27f204cc135 (diff) | |
fix readsyms for macho
Diffstat (limited to 'xmake/modules/utils/binary/readsyms.lua')
| -rw-r--r-- | xmake/modules/utils/binary/readsyms.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/modules/utils/binary/readsyms.lua b/xmake/modules/utils/binary/readsyms.lua index 899b43f71..103b13891 100644 --- a/xmake/modules/utils/binary/readsyms.lua +++ b/xmake/modules/utils/binary/readsyms.lua @@ -82,14 +82,12 @@ function dump(binaryfile) -- print header print("") print("Symbols:") - local header_format = string.format(" %%-%ds %%-%ds %%-%ds %%-%ds %%-%ds %%s", - value_width, type_width, bind_width, section_width, size_width) + local header_format = " %-" .. value_width .. "s %-" .. type_width .. "s %-" .. bind_width .. "s %-" .. section_width .. "s %-" .. size_width .. "s %s" print(string.format(header_format, "VALUE", "TYPE", "BIND", "SECTION", "SIZE", "NAME")) print(string.rep("-", 80)) -- print symbols - local format_str = string.format(" %%-%ds %%-%ds %%-%ds %%-%ds %%-%ds %%s", - value_width, type_width, bind_width, section_width, size_width) + local format_str = " %-" .. value_width .. "s %-" .. type_width .. "s %-" .. bind_width .. "s %-" .. section_width .. "s %-" .. size_width .. "s %s" for i, sym in ipairs(symbols) do local value_str = sym.value and string.format("0x%x", sym.value) or "" |
