|
From: John R.
|
> Section Headers: > [Nr] Name Type Addr Off Size ES Flg Lk Inf Al > [...] > [24] .plt NOBITS 00025618 0155f0 000918 00 WAX 0 0 4 > > Offset(0x0155f0) + Size(0x000918) = 0x15f08 = 89864, whilst the file > size is only 88900. In a .so, Segment placement (ElfXX_Phdr.p_type==PT_LOAD) is performed first (including ".bss expansion" when .p_filesz < .p_memsz) before Section interpretation. > Also it's a bit strange that there are a four of sections that start > at the same offset: > > [23] .sbss NOBITS 000255f0 0155f0 000028 00 WA 0 0 8 > [24] .plt NOBITS 00025618 0155f0 000918 00 WAX 0 0 4 > [25] .bss NOBITS 00025f30 0155f0 000000 00 WA 0 0 1 > [26] .gnu_debuglink PROGBITS 00000000 0155f0 000018 00 0 0 4 > > Any ideas? In the list above, .sbss .plt .bss are all NOBITS, are beyond .p_filesz and within .p_memsz, and have no content that needs to appear literally in the .so because their content is all bytes are zero. This saves space in the filesystem, and I/O time at runtime, at the cost of complexity. -- |