Categorises and filters assembly in a way that's understood by Compiler Explorer.
Possible filters as command line parameters:
-binarychanges to the Binary mode filtering that's based on the assembly output from GNU Objdump-unused_labelstry to filter out functions that aren't strongly used-directivesfilter out .directives-comment_onlyfilter out comments-whitespace-library_functionstry to filter out functions that belong in other libraries that are used (filtering is based on filepaths)-dont_mask_filenamesalways output the filename if available
Other parameters:
-pltAlso leaves out labels that End with@plt(without this, only labels that Start with.pltare left out)-nocompatLeaves some experimental extra information-stdinReads assembly from STDIN instead of from a given file-outputtextInstead of writing to JSON, output the filtered assemblys
Feeding an objdump via stdin into asm-parser:
objdump --d a.out -l --insn-width=16 | asm-parser -stdin -binary
You'll need:
- conan 1.59.0 - install this in your preferred way, e.g.
pip install conan==1.59.0or equivalent gcc12 or similar (or hack your settings to support your compiler)
Then you can
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=<path/to/compiler/if/needed>
$ make -j$(nproc)
$ make test