From 333af0b66dfe73fabb2c900bce00ba2d50bfe622 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 9 Dec 2025 00:33:18 +0800 Subject: fix readsyms for macho --- xmake/modules/utils/binary/readsyms.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xmake/modules/utils/binary') 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 "" -- cgit v1.3.1