Objdump(1) — linux man page

Причины ошибок в файле HEXDUMP1.EXE

Проблемы HEXDUMP1.EXE могут быть отнесены к поврежденным или отсутствующим файлам, содержащим ошибки записям реестра, связанным с HEXDUMP1.EXE, или к вирусам / вредоносному ПО.

Более конкретно, данные ошибки HEXDUMP1.EXE могут быть вызваны следующими причинами:

  • Поврежденные ключи реестра Windows, связанные с HEXDUMP1.EXE / Maresware Investigative Software.
  • Вирус или вредоносное ПО, которые повредили файл HEXDUMP1.EXE или связанные с Maresware Investigative Software программные файлы.
  • Другая программа злонамеренно или по ошибке удалила файлы, связанные с HEXDUMP1.EXE.
  • Другая программа находится в конфликте с Maresware Investigative Software и его общими файлами ссылок.
  • Поврежденная загрузка или неполная установка программного обеспечения Maresware Investigative Software.

COLOPHON top

       This page is part of the binutils (a collection of tools for working
       with executable binaries) project.  Information about the project can
       be found at ⟨http://www.gnu.org/software/binutils/⟩.  If you have a
       bug report for this manual page, see
       ⟨http://sourceware.org/bugzilla/enter_bug.cgi?product=binutils⟩.
       This page was obtained from the tarball binutils-2.35.tar.gz fetched
       from ⟨https://ftp.gnu.org/gnu/binutils/⟩ on 2020-08-13.  If you dis‐
       cover any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page, or
       you have corrections or improvements to the information in this
       COLOPHON (which is not part of the original manual page), send a mail
       to man-pages@man7.org

binutils-2.35                    2020-07-24                       OBJDUMP(1)

Pages that refer to this page:
ld(1), 
nm(1), 
objcopy(1), 
readelf(1), 
size(1), 
strings(1), 
dl_iterate_phdr(3), 
edata(3), 
end(3), 
etext(3), 
deb-symbols(5), 
elf(5), 
BPF(8), 
tc-bpf(8)

SYNOPSIS top

       objdump [-a|--archive-headers]
               [-b bfdname|--target=bfdname]
               [-C|--demangle[=style] ]
               [-d|--disassemble[=symbol]]
               [-D|--disassemble-all]
               [-z|--disassemble-zeroes]
               [-EB|-EL|--endian={big | little }]
               [-f|--file-headers]
               [-F|--file-offsets]
               [--file-start-context]
               [-g|--debugging]
               [-e|--debugging-tags]
               [-h|--section-headers|--headers]
               [-i|--info]
               [-j section|--section=section]
               [-l|--line-numbers]
               [-S|--source]
               [--source-comment[=text]]
               [-m machine|--architecture=machine]
               [-M options|--disassembler-options=options]
               [-p|--private-headers]
               [-P options|--private=options]
               [-r|--reloc]
               [-R|--dynamic-reloc]
               [-s|--full-contents]
               |
                --dwarf]
               [--ctf=section]
               [-G|--stabs]
               [-t|--syms]
               [-T|--dynamic-syms]
               [-x|--all-headers]
               [-w|--wide]
               [--start-address=address]
               [--stop-address=address]
               [--no-addresses]
               [--prefix-addresses]
               show-raw-insn]
               [--adjust-vma=offset]
               [--dwarf-depth=n]
               [--dwarf-start=n]
               [--ctf-parent=section]
               [--no-recurse-limit|--recurse-limit]
               [--special-syms]
               [--prefix=prefix]
               [--prefix-strip=level]
               [--insn-width=width]
               
               [-V|--version]
               [-H|--help]
               objfile...

Canonical hex + ASCII display

The original file is the string followed by a new line.

>hexdump -C mexico-utf8.txt
000000  4f 6c c3 a1 20 6d 75 6e 64 6f 20 4d c3 a9 78 69  Ol.. mundo M..xi
000010  63 6f 20 3c 26 3e 0d 0a                          co <&>..

Do for multiple files. Here are 3 different variants of encodings and line endings.

>for %f in (mexico*.txt) do @echo %f & hexdump -C %f
mexico-latin1.txt
000000  4f 6c e1 20 6d 75 6e 64 6f 20 4d e9 78 69 63 6f  Ol. mundo M.xico
000010  20 3c 26 3e 0d 0a                                 <&>..
mexico-utf8-bom-unix.txt
000000  ef bb bf 4f 6c c3 a1 20 6d 75 6e 64 6f 20 4d c3  ...Ol.. mundo M.
000010  a9 78 69 63 6f 20 3c 26 3e 0a                    .xico <&>.
mexico-utf8.txt
000000  4f 6c c3 a1 20 6d 75 6e 64 6f 20 4d c3 a9 78 69  Ol.. mundo M..xi
000010  63 6f 20 3c 26 3e 0d 0a                          co <&>..

In a batch file, replace with .

Note:

  • The letter á (U+00E1) is encoded as in Latin-1 but as the two bytes in UTF-8.
  • The «Unix (LF)» new line is the single byte but is represented by two bytes in a «Windows (CR LF)» file.
  • The UTF-8 Byte Order Mark (BOM) in the second example consists of the three bytes .

GNU Binutils

The GNU Binutils are a collection of binary tools. The main
ones are:

  • ld — the GNU linker.
  • as — the GNU assembler.

But they also include:

  • addr2line — Converts addresses into filenames and
    line numbers.
  • ar — A utility for creating, modifying and
    extracting from archives.
  • c++filt — Filter to demangle encoded C++
    symbols.
  • dlltool — Creates files for building and using DLLs.
  • gold — A new, faster, ELF only linker, still in beta test.
  • gprof — Displays profiling information.
  • nlmconv — Converts object code into an NLM.
  • nm — Lists symbols from object files.
  • objcopy — Copies and translates object files.
  • objdump — Displays information from object
    files.
  • ranlib — Generates an index to the contents of an
    archive.
  • readelf — Displays information from any ELF format
    object file.
  • size — Lists the section sizes of an object or
    archive file.
  • strings — Lists printable strings from files.
  • strip — Discards symbols.
  • windmc — A Windows compatible message compiler.
  • windres — A compiler for Windows resource
    files.

Most of these programs use BFD, the Binary File
Descriptor library, to do low-level manipulation. Many of them
also use the opcodes library to assemble and disassemble
machine instructions.

The binutils have been ported to most major Unix variants as
well as Wintel systems, and their main reason for existence is to
give the GNU
system (and
GNU/Linux) the facility to compile and link programs.

Obtaining binutils

The latest release of GNU binutils is 2.35. The various NEWS files
(binutils,
gas, and
ld)
have details of what has changed in this release.

See the
page for information on obtaining releases of GNU binutils and
other GNU software. The current release can be downloaded from
https://ftp.gnu.org/gnu/binutils
or, preferably, from a nearby mirror through the generic URL https://ftpmirror.gnu.org/binutils.

If you plan to do active work on GNU binutils, you can access
the development source tree by anonymous git:

Alternatively, you can use
the gitweb interface, or the source snapshots, available as
bzipped tar files via anonymous FTP from
ftp://sourceware.org/pub/binutils/snapshots.

Mailing lists

There are three binutils mailing lists:

bug-binutils@gnu.org
(archives)
For reporting bugs.
binutils@sourceware.org
(archives)
For discussing binutils issues.
binutils-cvs (archives)
A read-only mailing list containing the notes from checkins
to the binutils git repository. (This list has an odd name for
historical reasons.)

You can use this form to subscribe to the
or
mailing lists:

To subscribe to the mailing
list, see
the bug-binutils info page.

You may wish to browse the old mail archives of the
gas2 and
bfd
mailing lists. These were the discussion lists for binutils until
May 1999. Please do not send mail to them any longer.

Documentation

The
documentation for binutils 2.35 is available.

A guide to porting the binutils to a new target has been
contributed.

Formats

A format string contains any number of format units, separated by whitespace. A format unit contains up to three items: an iteration count, a byte count, and a format.

The iteration count is an optional positive integer, which defaults to one. Each format is applied to iteration count times. The byte count is an optional positive integer. If specified it defines the number of bytes to be interpreted by each iteration of the format.

If an iteration count or a byte count is specified, a single slash must be placed after the iteration count and before the byte count to disambiguate them. Any whitespace before or after the slash is ignored.

The format is required and must be surrounded by double-quote marks. It is interpreted as an fprintf-style format string, with the following exceptions:

  • An asterisk may not be used as a field width or precision.
  • A byte count or field precision is required for each s conversion character—unlike the fprintf default, which prints the entire string if the precision is unspecified.
  • The conversion characters h, l, n, p, and q are not supported.
  • The single-character escape sequences described in the C standard are supported:
    • <null>: \0
    • <alert character>: \a
    • <backspace>: \b
    • <form-feed>: \f
    • <newline>: \n
    • <carriage return>: \r
    • <tab>: \t
    • <vertical tab>: \v

Hexdump also supports additional conversion strings. Consult the manpage for hexdump for specific usage notes.

Подробности, подробности . . .

Даже простая программа «Hello World», доходя до состояния объектного файла, содержит огромный массив подробностей. Программа nm хороша для вывода списка символов, а также их типов и значений, однако для более подробного изучения содержимого упомянутых выше разделов необходимы более мощные инструменты.

Два из таких инструментов – это программы objdump и readelf. Введя следующую команду, вы увидите ассемблерный листинг каждого из разделов объектного файла, содержащего исполняемый код. Удивительно, не правда ли, как много кода фактически генерирует компилятор для такой маленькой программки?

objdump -d a.out

Результат работы этой команды вы можете увидеть в Листинге 3. Каждый раздел исполняемого кода срабатывает в случае, когда необходимо выполнение определенного события. Это может быть, например, инициализация библиотек или вход в саму программу.

Для программиста, очарованного низкоуровневыми подробностями программирования, это превосходный инструмент для изучения выходной информации компиляторов и ассемблеров. Подробная информация вроде той, что представлена в этом коде, очень много говорит о природе процессора, на котором работает система. Изучая эту информацию вместе с технологической документацией, предоставленной производителем процессора, вы можете получить очень ценные знания о том, как всё работает, благодаря пониманию выходной информации работающих программ.

Программа readelf также может вывести содержимое объектного файла с подобной же прозрачностью. Вы можете убедиться в этом, введя следующую команду:

readelf -all a.out

Эта команда формирует данные, показанные в Листинге 4 . В заголовке ELF представлена краткая информация обо всех разделах файла

Прежде чем перечислять содержимое этих заголовков, обратите внимание, сколько их. Эта информация может быть полезна при изучении больших объектных файлов

Как можно видеть из этого листинга, в простом файле a.out программы «Hello World» содержится огромный объем полезных подробностей — информация о версии, гистограммы, несколько таблиц различных типов символов и т.п. Уже нескольких представленных здесь инструментов достаточно, чтобы провести массу времени, узнавая новую информацию об исполняемых файлах путем изучения объектных файлов.

В дополнение ко всем этим разделам компилятор может поместить в объектный файл отладочную информацию, и она также будет отражена здесь. Введите следующую команду и уделите немного времени изучению того, что скажет вам ваш компилятор (как будто вы выполняете отладку):

readelf --debug-dump a.out | less

Результат работы этой команды вы можете увидеть в Листинге 5. Отладчики, например, GDB, умеют считывать эту информацию. При работе в отладчике вы можете использовать инструменты, отображающие при дизассемблировании кода более осмысленные метки (например), чем значения адресов.

Synopsis

objdump [-a|—archive-headers] [-b bfdname|—target=bfdname] [-C|—demangle[=style] ]
[-d|—disassemble] [-D|—disassemble-all] [-z|—disassemble-zeroes] [-EB|-EL|—endian={big |
little }] [-f|—file-headers] [-F|—file-offsets] [—file-start-context] [-g|—debugging]
[-e|—debugging-tags] [-h|—section-headers|—headers] [-i|—info] [-j
section|—section=section] [-l|—line-numbers] [-S|—source] [-m
machine|—architecture=machine] [-M options|—disassembler-options=options]
[-p|—private-headers] [-r|—reloc] [-R|—dynamic-reloc] [-s|—full-contents] |
—dwarf] [-G|—stabs]
[-t|—syms] [-T|—dynamic-syms] [-x|—all-headers] [-w|—wide] [—start-address=address]
[—stop-address=address] [—prefix-addresses] show-raw-insn] [—adjust-vma=offset] [—special-syms]
[—prefix=prefix] [—prefix-strip=level] [—insn-width=width] [-V|—version] [-H|—help]
objfile

EXAMPLES

Example-1:

To Compress A File Using «gzip»:

$ gzip test.sh

output:

$ lstest.sh

$ gzip test.sh

$ lstest.sh.gz

Example-2:

To Decompress A File Using The «gzip» Command:

$ gzip -d test.sh.gz

output:

$ lstest.sh.gz

$ gzip -d test.sh.gz

$ lstest.sh

Example-3:

Force A File To Be Compressed:

$ gzip -f filenatest.sh

output:

$ lstest.sh

$ gzip -f test.sh

$ lstest.sh.gz

Example-4:

To Keep The Uncompressed File:

$ gzip -k filename

output:

$ lstest.sh

$ gzip -k test.sh

$ lstest.sh  test.sh.gz

Example-5:

Compress Every File In A Folder And Subfolders:

$ gzip -r /tmp

output:

$ ls /tmp/abc  xyz

$ gzip -r /tmp/

$ ls /tmp/abc.gz  xyz.gz

Example-6:

To Test The Validity Of A Compressed File:

$ gzip -t test.sh.gz

output:

no output on screen if compressed file is valid.

Example-7:

To Change The Compression Level:

To get minimum compression at the fastest speed:

$ gzip -1 test.sh

To get maximum compression at the slowest speed:

$ gzip -9 test.sh

output:

test.sh.gz

Print

Samples

A sample partial hex dump of a program, as produced by the Unix program :

 00105e0 e6b0 343b 9c74 0804 e7bc 0804 e7d5 0804
 00105f0 e7e4 0804 e6b0 0804 e7f0 0804 e7ff 0804
 0010600 e80b 0804 e81a 0804 e6b0 0804 e6b0 0804

The above example, however, represents an ambiguous form of hex dump, as the byte order may be uncertain. Such hex dumps are good only in the context of a well-known byte order standard or when values are intentionally given in their full form (and may result in variable number of bytes), such as:

 00105e0 e6 b008 04e79e08 04e7bc 08 04 e7 d50804

When an explicit byte sequence is required (e.g. for hex dump of machine code programs or ROM content) a byte-by-byte representation is favoured, commonly organized in 16-byte rows with an optional divider between 8-byte groups:

 00105e0 e6 b0 08 04 e7 9e 08 04-e7 bc 08 04 e7 d5 08 04
 00105f0 e7 e4 08 04 e6 b0 08 04-e7 f0 08 04 e7 ff 08 04
 0010600 e8 0b 08 04 e8 1a 08 04-e6 b0 08 04 e6 b0 08 04

Rarely, a condensed form is also used, without whitespace characters between values:

 00105e0 e6b00804e79e0804e7bc0804e7d50804
 00105f0 e7e40804e6b00804e7f00804e7ff0804
 0010600 e80b0804e81a0804e6b00804e6b00804

A Unix default display of those same bytes as two-byte words on a modern x86 (little-endian) computer would usually look like this:

 00105e0 b0e6 0408 9ee7 0408 bce7 0408 d5e7 0408
 00105f0 e4e7 0408 b0e6 0408 f0e7 0408 ffe7 0408
 0010600 0be8 0408 1ae8 0408 b0e6 0408 b0e6 0408

Often an additional column shows the corresponding ASCII text translation (e.g. or ):

0000 57 69 6B 69 70 65 64 69 61 2C 20 74 68 65 20 66  Wikipedia, the f
0010 72 65 65 20 65 6E 63 79 63 6C 6F 70 65 64 69 61  ree encyclopedia
0020 20 74 68 61 74 20 61 6E 79 6F 6E 65 20 63 61 6E   that anyone can
0030 20 65 64 69 74 00 00 00 00 00 00 00 00 00 00 00   edit...........

Synopsis

objdump [-a|—archive-headers] [-b bfdname|—target=bfdname] [-C|—demangle[=style] ]
[-d|—disassemble] [-D|—disassemble-all] [-z|—disassemble-zeroes] [-EB|-EL|—endian={big |
little }] [-f|—file-headers] [-F|—file-offsets] [—file-start-context] [-g|—debugging]
[-e|—debugging-tags] [-h|—section-headers|—headers] [-i|—info] [-j
section|—section=section] [-l|—line-numbers] [-S|—source] [-m
machine|—architecture=machine] [-M options|—disassembler-options=options]
[-p|—private-headers] [-P options|—private=options] [-r|—reloc] [-R|—dynamic-reloc]
[-s|—full-contents] |
—dwarf]
[-G|—stabs] [-t|—syms] [-T|—dynamic-syms] [-x|—all-headers] [-w|—wide]
[—start-address=address] [—stop-address=address] [—prefix-addresses] show-raw-insn]
[—adjust-vma=offset] [—special-syms] [—prefix=prefix] [—prefix-strip=level]
[—insn-width=width] [-V|—version] [-H|—help] objfile

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector