Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7719563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:26:51+00:00 2026-06-01T03:26:51+00:00

Similarly to How do I disassemble raw x86 code? , but then for the

  • 0

Similarly to How do I disassemble raw x86 code?, but then for the MIPS architecture: how do I disassemble raw MIPS code with objdump? I want to check the instructions in a vmlinux image, but to do so I now have to:

: > x.c
mipsel-linux-gnu-gcc -c -o x.o x.c
mipsel-linux-gnu-objcopy --add-section raw=vmlinux x.o
mipsel-linux-gnu-objcopy --remove-section .comment x.o
mipsel-linux-gnu-objdump -D x.o | less

Is there an easier way to do it? I’ve tried the below to no avail:

mipsel-linux-gnu-objdump -b elf32-tradlittlemips -mmips -Mgpr-names=O32,cp0-names=mips1,cp0-names=mips1,hwr-names=mips1,reg-names=mips1 -D vmlinux | less

It just spits out:

mipsel-linux-gnu-objdump: vmlinux: File format not recognized

If it helps, here is the output of some commands:

$ file x.o
x.o: ELF 32-bit LSB relocatable, MIPS, MIPS-I version 1 (SYSV), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped
$ mipsel-linux-gnu-objdump -p x.o

x.o:     file format elf32-tradlittlemips
private flags = 1006: [abi=O32] [mips1] [not 32bitmode] [PIC] [CPIC]

The target is an AR7 CPU.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:26:52+00:00Added an answer on June 1, 2026 at 3:26 am

    Hmm, it seems easier than that. -b elf32-tradlittlemips does not work because the file is not an ELF executable, but binary. So, the correct option to be used is -b binary. The other option, -mmips makes objdump recognize the file as binary for MIPS. Since the target machine is little endian, I also had to add -EL to make the output match the output for x.o.

    -mmips only includes the basic instruction set. The AR7 has a MIPS32 processor which has more instructions than just mips. To decode these newer MIPS32 instructions, use -mmips:isa32. A list of available ISAs can be listed with objdump -i -m.

    The final command becomes:

    mipsel-linux-gnu-objdump -b binary -mmips:isa32 -EL -D vmlinux
    

    This would show registers like $3 instead of their names. To adjust that, I used the next additional options which are mentioned in mipsel-linux-gnu-objdump --help:

    -Mgpr-names=32,cp0-names=mips32,cp0-names=mips32,hwr-names=mips32,reg-names=mips32
    

    I chose for mips32 after reading:

    • http://www.linux-mips.org/wiki/AR7
    • http://www.linux-mips.org/wiki/Instruction_Set_Architecture
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there is a similarly titled question already on SO but I want
I want to display a file tree similarly to java2s.com 'Create a lazy file
I want to develop a multi-server clustered framework that will work similarly to the
I want open a path to vim from Screen's copy-mode by Ctrl-A f similarly
I have checked similarly named questions, but they don't answer this use case. Basically,
When writing an htmlhelper extension if I want to support the similarly structured ctors
In other words, does it work similarly to development mode but caches the classes
I am autofilling second textbox based on first textbox in auto.jsp, similarly i want
Similarly to How to use MsTest in Continuous Integration without VS? , I want
I want to open-source my notes similarly as at DjangoBook . I have not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.