intelxed / xed

The X86 Encoder Decoder (XED), is a software library for encoding and decoding X86 (IA32 and Intel64) instructions
https://intelxed.github.io/
Apache License 2.0
1.38k stars 146 forks source link

How to make the xed.lib file size MUCH smaller ? #296

Open Victor6799 opened 1 year ago

Victor6799 commented 1 year ago

Right now as it stands this file sits at nearly 16MB. All that I would like to accomplish is to decode (disassemble) binary code on the fly 1-15 bytes at a time. Is it possible to statically link the xed.lib file with my project and still have the overall size no larger than 1-2MB ?

marjevan commented 1 year ago

Please check:

  1. https://github.com/intelxed/xed#binary-size
  2. https://intelxed.github.io/build-manual/index.html#SHARED
Victor6799 commented 1 year ago

Thanks again @marjevan. I need to statically link the xed.lib file for windows into my KMDF device driver project. Where can I find any documentation on how to strip the binaries or make just the decoder no encoder ? Thank you.

marjevan commented 1 year ago

Hi, You can use the "--no-encoder" build knob. Please note the latest External Release v2023.06.07 improves decoder code size.