Почему objdump не отображает никаких записей для раздела .got двоичного файла ELF?

Como @jason -solución harris. Pero más simple y comienza solo marcado para inicio automático.

for i in $(virsh list --name --autostart); do virsh start $i; done

UPD:Lo probé en libvirt 3.2.0 (CentOS 7.4.1708)

1
20.06.2019, 11:39
1 ответ

Записи GOT, используемые PLT, сохраняются в секции .got.plt. Отображение идет от PLT к GOT, и я не думаю, что есть способ заставить objdumpвыполнить обратное отображение, поэтому лучшее, что вы можете сделать, это что-то вроде

$ objdump -d -s -j.plt -j.got.plt sysinfo

sysinfo:     file format elf64-x86-64

Contents of section.plt:
 400420 ff35e20b 2000ff25 e40b2000 0f1f4000 .5....%.....@.
 400430 ff25e20b 20006800 000000e9 e0ffffff .%...h.........
 400440 ff25da0b 20006801 000000e9 d0ffffff .%...h.........
Contents of section.got.plt:
 601000 200e6000 00000000 00000000 00000000  .`.............
 601010 00000000 00000000 36044000 00000000 ........6.@.....
 601020 46044000 00000000                    F.@.....        

Disassembly of section.plt:

0000000000400420 <.plt>:
  400420:   ff 35 e2 0b 20 00       pushq  0x200be2(%rip)        # 601008 <_GLOBAL_OFFSET_TABLE_+0x8>
  400426:   ff 25 e4 0b 20 00       jmpq   *0x200be4(%rip)        # 601010 <_GLOBAL_OFFSET_TABLE_+0x10>
  40042c:   0f 1f 40 00             nopl   0x0(%rax)

0000000000400430 <printf@plt>:
  400430:   ff 25 e2 0b 20 00       jmpq   *0x200be2(%rip)        # 601018 <printf@GLIBC_2.2.5>
  400436:   68 00 00 00 00          pushq  $0x0
  40043b:   e9 e0 ff ff ff          jmpq   400420 <.plt>

0000000000400440 <sysinfo@plt>:
  400440:   ff 25 da 0b 20 00       jmpq   *0x200bda(%rip)        # 601020 <sysinfo@GLIBC_2.2.5>
  400446:   68 01 00 00 00          pushq  $0x1
  40044b:   e9 d0 ff ff ff          jmpq   400420 <.plt>

Disassembly of section.got.plt:

0000000000601000 <_GLOBAL_OFFSET_TABLE_>:
  601000:   20 0e 60 00 00 00 00 00 00 00 00 00 00 00 00 00     .`.............
   ...
  601018:   36 04 40 00 00 00 00 00 46 04 40 00 00 00 00 00     6.@.....F.@.....
1
27.01.2020, 23:41

Теги

Похожие вопросы