shstrtable 在哪个段?

In which segment is shstrtable?

我正在处理 elf64 文件,我想知道两件事,第一是 shstrtable 存储在哪个段中,因为没有出现审查 readelf -l。另一个问题(来自第一个问题)是否有可能部分不在段内?

我还注意到某些段之间有一些 'gaps'。这些缝隙里面是什么?

我正在使用以下示例,即 hello_world.c:

readelf -lW hello                                          

El tipo del fichero elf es DYN (Fichero objeto compartido)
Entry point 0x1040
There are 11 program headers, starting at offset 64

Encabezados de Programa:
  Tipo           Desplaz  DirVirt            DirFísica          TamFich  TamMem   Opt Alin
  PHDR           0x000040 0x0000000000000040 0x0000000000000040 0x000268 0x000268 R   0x8
  INTERP         0x0002a8 0x00000000000002a8 0x00000000000002a8 0x00001c 0x00001c R   0x1
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
  LOAD           0x000000 0x0000000000000000 0x0000000000000000 0x000560 0x000560 R   0x1000
  LOAD           0x001000 0x0000000000001000 0x0000000000001000 0x0001e5 0x0001e5 R E 0x1000
  LOAD           0x002000 0x0000000000002000 0x0000000000002000 0x000118 0x000118 R   0x1000
  LOAD           0x002de8 0x0000000000003de8 0x0000000000003de8 0x000248 0x000250 RW  0x1000
  DYNAMIC        0x002df8 0x0000000000003df8 0x0000000000003df8 0x0001e0 0x0001e0 RW  0x8
  NOTE           0x0002c4 0x00000000000002c4 0x00000000000002c4 0x000044 0x000044 R   0x4
  GNU_EH_FRAME   0x00200c 0x000000000000200c 0x000000000000200c 0x000034 0x000034 R   0x4
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW  0x10
  GNU_RELRO      0x002de8 0x0000000000003de8 0x0000000000003de8 0x000218 0x000218 R   0x1

 mapeo de Sección a Segmento:
  Segmento Secciones...
   00     
   01     .interp 
   02     .interp .note.gnu.build-id .note.ABI-tag .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 
   03     .init .plt .text .fini 
   04     .rodata .eh_frame_hdr .eh_frame 
   05     .init_array .fini_array .dynamic .got .got.plt .data .bss 
   06     .dynamic 
   07     .note.gnu.build-id .note.ABI-tag 
   08     .eh_frame_hdr 
   09     
   10     .init_array .fini_array .dynamic .got 

in which segment the shstrtable is stored, because reviewing readelf -l doesn't appear.

它没有出现在任何片段中。

And the other question (coming from the first one) is it possible for a section not be inside a segment?

Yes.

Also i noticed some 'gaps' between some segments. What is inside those gaps?

没有。段告诉内核或运行时加载程序如何 mmap 将磁盘上的二进制文件放入内存。由于 mmap 在整个页面上操作(此处为 4096 字节),0x5600xFFF 之间的内存内容将是“文件中偏移量 0x5600xFFF,但程序不应访问它并且内容实际上未定义。另请参阅此