title: Inspect and get binary from ELF file on MAC
body: <p>I have a ELF file and I want to get a <code>hex</code> or <code>bin</code> file of my code from it. In the terminal, if a do a <code>file main</code>, which is my file, it shows:</p>
  <pre><code>main: ELF 32-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, not stripped
  </code></pre>
  <p>As I learned, <code>objdump</code> on MAC is not working and with <code>otool -l main</code> I get the following error:</p>
  <pre><code>llvm-objdump: 'main': Object is not a Mach-O file type.
  </code></pre>
  <p>The ELF file was created using the command:</p>
  <pre><code>riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed-gcc --specs=nosys.specs main.c -o main
  </code></pre>
  <p>So is there a way to do it?</p>
  <p>Thanks a lot</p>