[SOLVED] no information about required shared lib
Posted: Tue Nov 15, 2022 3:47 am
Hey! Referring to previous post viewtopic.php?f=13&t=56576.
My "main" program has no information about what library is required to run properly.
There is no dynamic section in this file.
So, I'm a little stuck for implementing Dynamic Linking.
My "main" program has no information about what library is required to run properly.
There is no dynamic section in this file.
So, I'm a little stuck for implementing Dynamic Linking.
Code: Select all
~/test readelf -a main ✔
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 64 (bytes into file)
Start of section headers: 4976 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 5
Size of section headers: 64 (bytes)
Number of section headers: 14
Section header string table index: 13
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .text PROGBITS 0000000000000000 00001000
000000000000000a 0000000000000000 AX 0 0 16
[ 2] .plt PROGBITS 0000000000000010 00001010
0000000000000020 0000000000000010 AX 0 0 16
[ 3] .dynsym DYNSYM 0000000000001030 00001030
0000000000000030 0000000000000018 A 4 1 8
[ 4] .dynstr STRTAB 0000000000001060 00001060
000000000000001d 0000000000000000 A 0 0 1
[ 5] .hash HASH 0000000000001080 00001080
0000000000000014 0000000000000004 A 3 0 8
[ 6] .gnu.hash GNU_HASH 0000000000001098 00001098
000000000000001c 0000000000000000 A 3 0 8
[ 7] .rela.dyn RELA 00000000000010b8 000010b8
0000000000000018 0000000000000018 A 3 0 8
[ 8] .dynamic DYNAMIC 00000000000020d0 000010d0
0000000000000120 0000000000000010 WA 4 0 8
[ 9] .got.plt PROGBITS 00000000000021f0 000011f0
0000000000000020 0000000000000008 WA 0 0 8
[10] .comment PROGBITS 0000000000000000 00001210
0000000000000015 0000000000000001 MS 0 0 1
[11] .symtab SYMTAB 0000000000000000 00001228
00000000000000a8 0000000000000018 12 5 8
[12] .strtab STRTAB 0000000000000000 000012d0
000000000000003e 0000000000000000 0 0 1
[13] .shstrtab STRTAB 0000000000000000 0000130e
0000000000000060 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
D (mbind), l (large), p (processor specific)
There are no section groups in this file.
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
NULL 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x8
LOAD 0x0000000000001000 0x0000000000000000 0x0000000000000000
0x0000000000000030 0x0000000000000030 R E 0x1000
LOAD 0x0000000000001030 0x0000000000001030 0x0000000000001030
0x00000000000000a0 0x00000000000000a0 R 0x1000
LOAD 0x00000000000010d0 0x00000000000020d0 0x00000000000020d0
0x0000000000000140 0x0000000000000140 RW 0x1000
LOAD 0x0000000000001030 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0x1000
Section to Segment mapping:
Segment Sections...
00
01 .text .plt
02 .dynsym .dynstr .hash .gnu.hash .rela.dyn
03 .dynamic .got.plt
04
There is no dynamic section in this file.
Relocation section '.rela.dyn' at offset 0x10b8 contains 1 entry:
Offset Info Type Sym. Value Sym. Name + Addend
000000002208 000100000007 R_X86_64_JUMP_SLO 0000000000000000 font_char_length + 0
No processor specific unwind information to decode
Symbol table '.dynsym' contains 2 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND font_char_length
Symbol table '.symtab' contains 7 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS main.c
2: 0000000000000000 0 FILE LOCAL DEFAULT ABS
3: 00000000000020d0 0 OBJECT LOCAL DEFAULT 8 _DYNAMIC
4: 00000000000021f0 0 OBJECT LOCAL DEFAULT 9 _GLOBAL_OFFSET_TABLE_
5: 0000000000000000 10 FUNC GLOBAL DEFAULT 1 entry
6: 0000000000000000 0 FUNC GLOBAL DEFAULT UND font_char_length
No version information found in this file.