#1
|
|||
|
|||
How to repack a lib file, any tools for that?
I want to make a dll not dependent on the C Runtime,
normally that is easy enough, just exclude standard libs and don't use any thing that requires imports from clr, or import manually what you can from ntdll.dll and for x64, x86, arm and arm64 this approach works just fine. Howe ever it does not for arm64ec here some imports are missing which are no ware to be found in the ntdll, namely: __chkstk_arm64ec __icall_helper_arm64ec __os_arm64x_dispatch_icall __os_arm64x_dispatch_call_no_redirect __os_arm64x_dispatch_ret these are only to be found in libcmt.lib unpacking the lib (using 7zip) and adding a selection of extracted obj to my dll, namely: chkstk_arm64ec.obj chpev2_support.obj guard_check_arm64ec.obj guard_dispatch.obj icall_helper_arm64ec.obj vcall32_helper.obj made the linking not fail, just spit out the following warming LINK : warning LNK4294: missing EC Side version of load config symbol for ARM64X image but the created dll fails to load I tried including a couple more obj files from the lib but to no avail. Apparently there is some additional data in that lib, so I was thinking the best approach would be to use a copy of the lib with everything removed that I don't need. But I'm lacking a tool that would be able to edit a lib file, any one her knows of such a tool or tool chain that would allow me to achieve my goal? Last edited by DavidXanatos; 03-01-2022 at 22:15. |
|
|