diff options
| author | ruki <[email protected]> | 2025-12-11 23:01:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-12 09:00:43 +0800 |
| commit | c8d424baeb7b93e2a1e900b271bcc09144fdce94 (patch) | |
| tree | 6e506e2e9d264376b33258e97bf3f9e4440a80bf /xmake/modules/utils/binary/bin2obj.lua | |
| parent | 1c5e66f354ca526214845fa190f7d18a4960d89b (diff) | |
improve binutils and add cli modules
Diffstat (limited to 'xmake/modules/utils/binary/bin2obj.lua')
| -rw-r--r-- | xmake/modules/utils/binary/bin2obj.lua | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/xmake/modules/utils/binary/bin2obj.lua b/xmake/modules/utils/binary/bin2obj.lua index 95e705ca6..13ff633e1 100644 --- a/xmake/modules/utils/binary/bin2obj.lua +++ b/xmake/modules/utils/binary/bin2obj.lua @@ -19,22 +19,9 @@ -- -- imports -import("core.base.option") import("core.base.binutils") -local options = { - {'i', "binarypath", "kv", nil, "Set the binary file path."}, - {'o', "outputpath", "kv", nil, "Set the output object file path."}, - {'f', "format", "kv", nil, "Set the object file format (coff, elf, macho)."}, - {nil, "symbol_prefix", "kv", nil, "Set the symbol prefix (default: _binary_)."}, - {'a', "arch", "kv", nil, "Set the target architecture."}, - {'p', "plat", "kv", nil, "Set the target platform (macosx, iphoneos, etc.)."}, - {nil, "target_minver", "kv", nil, "Set the target minimum version (e.g., 10.0, 18.2)."}, - {nil, "xcode_sdkver", "kv", nil, "Set the Xcode SDK version (e.g., 10.0, 18.2)."}, - {nil, "zeroend", "k", nil, "Append a null terminator ('\\0') at the end of data."} -} - -function _do_bin2obj(binarypath, outputpath, opt) +function main(binarypath, outputpath, opt) -- init source directory and options opt = opt or {} binarypath = path.absolute(binarypath) @@ -66,15 +53,3 @@ function _do_bin2obj(binarypath, outputpath, opt) cprint("${bright}%s generated!", outputpath) end -function main(...) - - -- parse arguments - local argv = {...} - local opt = option.parse(argv, options, "Convert binary file to object file for direct linking." - , "" - , "Usage: xmake l utils.binary.bin2obj [options]") - - -- do bin2obj - _do_bin2obj(opt.binarypath, opt.outputpath, opt) -end - |
