0

Let's say I want to find any libraries that use AVX, or the VZEROALL instruction? How could I go about doing that?

I don't care if the AVX was hand written or compiled, I'll look that up later. I'm wanting to see some example code of AVX instructions (and x86-extensions) in use. Is there an instruction grep? Radare has /c op, but I cant find anything with this.

find /usr/lib -type f -name '*ssl*.so' -exec radare2 {} -qc "/c VZEROALL" \;

Is there anything I can use to check Radare? Or scan executable sections in ELFs for a specific instruction?

Not this isn't really programming question. It's more like a binary-grep for instruction question.

  • You can use a normal text-based grep if you have a disassembler – Fox Oct 27 '18 at 0:56
1

Radare2 accepts assembly commands in lower case only. The following should work (albeit is not guaranteed to return any results):

find /usr/lib -type f -name '*ssl*.so' -exec radare2 {} -qc "/c vzeroall" \;

It's also possible to look up assembly commands using objdump. In that case your example would look like this:

find /usr/lib -type f -name '*ssl*.so' -exec bash -c 'objdump -d "$0" | grep -iq vzeroall' {} \; -print

One advantage of this approach would be the ability to specify the desired assembly instructions as ordinary regular expressions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.