简体   繁体   English

objdump没有在ELF 64位x86-64上工作,

[英]objdump not working on ELF 64-bit x86-64,

I have a 64bits ELF object code from the Tiny C compiler. 我有一个来自Tiny C编译器的64位ELF目标代码。 I can't get gobjdump to show the disassembled code. 我无法让gobjdump显示反汇编的代码。 I'm using OS X 10.10.5. 我正在使用OS X 10.10.5。

$ file hello.o 
hello.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
$ gobjdump -d hello.o
gobjdump: hello.o: File format not recognized

$ greadelf -h hello.o
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          228 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           64 (bytes)
  Number of section headers:         7
  Section header string table index: 6

Extra Information: 额外的信息:

$uname -a
Darwin Nawals-MacBook-Air.local 14.5.0 Darwin Kernel Version 14.5.0: 

Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64

$ gobjdump -i
BFD header file version (GNU Binutils) 2.24
mach-o-x86-64
mach-o-i386
mach-o-le
mach-o-be
mach-o-fat
pef
pef-xlib
sym
srec
symbolsrec
verilog
tekhex
binary
ihex

I don't understand why stack overflow think my question is mostly code - I want to give as much information as possible to help people answer. 我不明白为什么堆栈溢出认为我的问题主要是代码 - 我想提供尽可能多的信息来帮助人们回答。 I didn't think pastebin et al. 我没想到糊蛋白等。 were encouraged here. 在这里受到鼓励。

the available output formats, per the man page are as follows: 可用的输出格式,每个手册页如下:

  -Wl,--oformat,fmt
       Use fmt as output format. The supported output formats are:

       "elf32-i386"
           ELF output format (default)

       "binary"
           Binary image (only for executable output)

       "coff"
           COFF output format (only for executable output for TMS320C67xx
           target)

So, regardless of the online claim that the x86-64 is supported, the latest version does not support x86-64 output for the object file 因此,无论在线声称支持x86-64,最新版本都不支持对象文件的x86-64输出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM