This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Starting with Arm assembly to obtain machine code

I am trying to take an ARM LEGv8 assembly code to input into an assembler to obtain the machine code.  I have been searching for tutorials on this for using Eclispe, but I have not. Even successful.  I have only found tutorials on starring with the C code and obtaining the assembly and machine code.  Can you offer some help?

Parents
  • As long as you can produce an executable (ELF, COFF (.exe), ...) for a specific architecture, you can extract the machine code from that file.

    If you produce an ELF executable file (the standard executable file format on Unix and Linux systems), you can use objcopy on the file to extract the machine code from it, like this :

    export CROSS_COMPILE=armv8-linux-gnueabi-
    ${CROSS_COMPILE}objcopy /path/to/executable/file output -O binary

    With that command, the output file will contain the machine code of the executable file.

    That said, I cannot find an architecture manual about LEGv8 and, even if some people call it a subset of ARMv8, I can't relate the generated machine code described in some projects to the one defined in the ARMv8-A or M manuals.

Reply
  • As long as you can produce an executable (ELF, COFF (.exe), ...) for a specific architecture, you can extract the machine code from that file.

    If you produce an ELF executable file (the standard executable file format on Unix and Linux systems), you can use objcopy on the file to extract the machine code from it, like this :

    export CROSS_COMPILE=armv8-linux-gnueabi-
    ${CROSS_COMPILE}objcopy /path/to/executable/file output -O binary

    With that command, the output file will contain the machine code of the executable file.

    That said, I cannot find an architecture manual about LEGv8 and, even if some people call it a subset of ARMv8, I can't relate the generated machine code described in some projects to the one defined in the ARMv8-A or M manuals.

Children
No data