I know libc.so is executeable because:
- libc.so has a entry point function.
- There is .interp section in libc.so.
And I refered many documents, .interp section is considered to be necessary for an executable so. When I use call libonload.so, I can execute libonload.so, but readelf shows no .interp section. I don't know how it works. I run libonload.so, the result is:
[root@localhost onload-7.1.1.75]# /usr/lib64/libonload.so Onload 7.1.1.75 Copyright 2019-2021 Xilinx, 2006-2019 Solarflare Communications, 2002-2005 Level 5 Networks Built: Mar 4 2024 15:49:30 (release) Build profile header: readelf -l /usr/lib64/libonload.so:
[root@localhost onload-7.1.1.75]# readelf -l /usr/lib64/libonload.so Elf file type is DYN (Shared object file) Entry point 0xa2e0 There are 8 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x00000000000a5ff0 0x00000000000a5ff0 R E 200000 LOAD 0x00000000000a6818 0x00000000002a6818 0x00000000002a6818 0x0000000000002770 0x0000000000003060 RW 200000 DYNAMIC 0x00000000000a6d90 0x00000000002a6d90 0x00000000002a6d90 0x00000000000001f0 0x00000000000001f0 RW 8 NOTE 0x0000000000000200 0x0000000000000200 0x0000000000000200 0x0000000000000024 0x0000000000000024 R 4 TLS 0x00000000000a6818 0x00000000002a6818 0x00000000002a6818 0x0000000000000000 0x0000000000000bec R 8 GNU_EH_FRAME 0x0000000000094684 0x0000000000094684 0x0000000000094684 0x000000000000245c 0x000000000000245c R 4 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 10 GNU_RELRO 0x00000000000a6818 0x00000000002a6818 0x00000000002a6818 0x00000000000007e8 0x00000000000007e8 R 1 Section to Segment mapping: Segment Sections... 00 .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .plt .text .rodata .eh_frame_hdr .eh_frame 01 .init_array .data.rel.ro .dynamic .got .got.plt .data .bss 02 .dynamic 03 .note.gnu.build-id 04 .tbss 05 .eh_frame_hdr 06 07 .init_array .data.rel.ro .dynamic .got Btw, libonload.so is a driver for SolarFlare Nic.Source code can be got at https://github.com/Xilinx-CNS/onload
Источник: https://stackoverflow.com/questions/780 ... executable
Мобильная версия