Home

Awesome

hexagon

IDA processor module for the hexagon (QDSP6v55) processor

This is the processor found in recent qualcomm basebands ( MSM9xxx ) with LTE support, like the apple iPhone5 and Samsung Galaxy s3 ( GT-i9305 ) or Galaxy S5 ( SM-G900F )

Several versions of the programmers reference manual can be found online:

check out https://developer.qualcomm.com/hexagon-processor for updates from qualcomm.

Available disassemblers:

Note: The Hexagon SDK uses LLVM, but with more hexagon instructions than the publicly available llvm code.

Processor Module

This processor module is a wrapper for the objdump code found on sourcery.mentor.com

Binary download

Binaries for OSX, Linux and Windows can be found under releases:

Installation

There are two variants of the hexagon module: one for ida and one for ida64. Copy the hexagon{64}.{dylib,dll,so} file to the procs subdirectory of your IDA installation. This module can probably also be used with the IDA Evaluation version. The IDA Free version can be used to view and change existing hexagon disassemblies, but it can not be used to start from scratch.

Usage

Start IDA, select 'Qualcomm Hexagon DSP v4:QDSP6' from the processor type.

When loading an ELF binary, IDA will tell you 'Undefined or unknown machine type 164.' you should answer 'Yes'. Then IDA well tell you about unknown flag bits, you can ignore that as well. IDA may also tell you the ELF has an illegal entry point.

Compiling

The build uses cmake to generate build files for your platform. The top level Makefile can call cmake in several ways.

You need the IDASDK ( Password protected ).

The gnutools are automatically downloaded.

You need a c++20 compiler, like visualstudio 2019, or any recent gcc or clang.

You can point cmake to the right SDK by setting the environment variable IDASDK to the basepath of the sdk.

On windows, first run the following command, to setup the right visualstudio environment.

vsdevcmd -arch=amd64

The sourcery gnutools

A stripped down version of the sourcery hexagon gnutools is downloaded from my xs4all page. This version does include some patches to silence some compiler warnings, and work around a problem in the original code where occasionally the disassembler would crash. The original archive is quite large ( 140M ) and can be found here. The GPL/LGPL license files are included in the tar file.

Preconfigured bfd.h and config.h files are included in this source archive.

Bugs

Building the gnutools

Note that this is NOT nescesary when using cmake.

Other Hexagon Processor modules

Author

Willem Hengeveld (itsme@gsmk.de)

History

2013-06-10 version 1.0

2016-02-01 version 1.1

2017-12-05 version 1.2 - for idapro v7

2022-02-12 version 1.3 - for IDA v7.7

2023-03-30 version 1.4

2023-10-03 version 1.5

License

Free