bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/28818] New: objdump: disassembling raw binaries for x86-64


From: nekotekina at gmail dot com
Subject: [Bug binutils/28818] New: objdump: disassembling raw binaries for x86-64 truncates addresses
Date: Tue, 25 Jan 2022 01:19:03 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28818

            Bug ID: 28818
           Summary: objdump: disassembling raw binaries for x86-64
                    truncates addresses
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: nekotekina at gmail dot com
  Target Milestone: ---

Hello, I needed to disassemble some code dumped in raw binary format. Resulting
output contains strange truncations of the addresses.

Command example:
objdump --adjust-vma=0x7fff12312300 -D -Mintel,x86-64 -b binary -m i386
<object>

Output example:
Disassembly of section .data:

12312300 <.data>:
12312300:       48 8b a7 e8 09 00 00    mov    rsp,QWORD PTR [rdi+0x9e8]
12312307:       48 83 ec 08             sub    rsp,0x8
1231230b:       c3                      ret  

The address is truncated to 32 bit.

If I specify --adjust-vma=0xffffffff, the output is even more strange:

ffffffff <.data>:
ffff:   48 8b a7 e8 09 00 00    mov    rsp,QWORD PTR [rdi+0x9e8]
   6:   48 83 ec 08             sub    rsp,0x8
   a:   c3                      ret  

Now it's truncated to 16 bits before wraparound?
It doesn't make much sense. The arch is clearly 64 bit.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]