From 2c497bc57fc27af645afbf3de2e4e6068ea853dc Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 19 Dec 2025 22:55:22 +0800 Subject: add rpath list in binutils --- xmake/modules/utils/binary/rpath.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xmake/modules') diff --git a/xmake/modules/utils/binary/rpath.lua b/xmake/modules/utils/binary/rpath.lua index 271ef8939..6152d4d14 100644 --- a/xmake/modules/utils/binary/rpath.lua +++ b/xmake/modules/utils/binary/rpath.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("core.base.binutils") import("lib.detect.find_tool") function _replace_rpath_vars(rpath, opt) @@ -34,6 +35,10 @@ function _replace_rpath_vars(rpath, opt) return rpath end +function _get_rpath_list_by_binutils(binaryfile, opt) + return binutils.rpath_list(binaryfile) +end + function _get_rpath_list_by_objdump(binaryfile, opt) local list local plat = opt.plat or os.host() @@ -296,7 +301,8 @@ function list(binaryfile, opt) local ops = { _get_rpath_list_by_objdump, _get_rpath_list_by_readelf, - _get_rpath_list_by_patchelf + _get_rpath_list_by_patchelf, + _get_rpath_list_by_binutils } if is_host("macosx") then table.insert(ops, 1, _get_rpath_list_by_otool) -- cgit v1.3.1