Unwind info isn't showing up? #1

Open
opened 2025-11-08 20:40:21 +00:00 by geemili · 0 comments
Owner

I'm a little confused because libc.so and libvulkan.so both have .eh_frame:

❯ readelf --headers /usr/lib/libvulkan.so.1
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:                              DYN (Shared object 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:          524232 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         10
  Size of section headers:           64 (bytes)
  Number of section headers:         26
  Section header string table index: 24
There are 26 section headers, starting at offset 0x7ffc8:

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .note.gnu.build-id NOTE           0000000000000270 000270 000024 00   A  0   0  4
  [ 2] .dynsym           DYNSYM          0000000000000298 000298 001ef0 18   A  4   1  8
  [ 3] .gnu.hash         GNU_HASH        0000000000002188 002188 000758 00   A  2   0  8
  [ 4] .dynstr           STRTAB          00000000000028e0 0028e0 001c26 00   A  0   0  1
  [ 5] .rela.dyn         RELA            0000000000004508 004508 001668 18   A  2   0  8
  [ 6] .relr.dyn         RELR            0000000000005b70 005b70 000088 08   A  0   0  8
  [ 7] .rela.plt         RELA            0000000000005bf8 005bf8 000558 18  AI  2  20  8
  [ 8] .rodata           PROGBITS        0000000000006150 006150 021944 00 AMS  0   0 16
  [ 9] .eh_frame_hdr     PROGBITS        0000000000027a94 027a94 001f1c 00   A  0   0  4
  [10] .eh_frame         PROGBITS        00000000000299b0 0299b0 0080e4 00   A  0   0  8
  [11] .text             PROGBITS        0000000000032aa0 031aa0 04b8ff 00  AX  0   0 16
  [12] .init             PROGBITS        000000000007e39f 07d39f 000003 00  AX  0   0  1
  [13] .fini             PROGBITS        000000000007e3a2 07d3a2 000003 00  AX  0   0  1
  [14] .plt              PROGBITS        000000000007e3b0 07d3b0 0003a0 00  AX  0   0 16
  [15] .init_array       INIT_ARRAY      000000000007f750 07d750 000010 00  WA  0   0  8
  [16] .fini_array       FINI_ARRAY      000000000007f760 07d760 000010 00  WA  0   0  8
  [17] .data.rel.ro      PROGBITS        000000000007f770 07d770 001c20 00  WA  0   0 16
  [18] .dynamic          DYNAMIC         0000000000081390 07f390 0001a0 10  WA  4   0  8
  [19] .got              PROGBITS        0000000000081530 07f530 000770 00  WA  0   0  8
  [20] .got.plt          PROGBITS        0000000000081ca0 07fca0 0001e0 00  WA  0   0  8
  [21] .relro_padding    NOBITS          0000000000081e80 07fe80 000180 00  WA  0   0  1
  [22] .data             PROGBITS        0000000000082e80 07fe80 00003b 00  WA  0   0  8
  [23] .bss              NOBITS          0000000000082ec0 07febb 000168 00  WA  0   0  8
  [24] .shstrtab         STRTAB          0000000000000000 07febb 0000ed 00      0   0  1
  [25] .gnu_debuglink    PROGBITS        0000000000000000 07ffa8 00001c 00      0   0  4
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),
  R (retain), l (large), p (processor specific)

Elf file type is DYN (Shared object file)
Entry point 0x0
There are 10 program headers, starting at offset 64

Program Headers:
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz   Flg Align
  PHDR           0x000040 0x0000000000000040 0x0000000000000040 0x000230 0x000230 R   0x8
  LOAD           0x000000 0x0000000000000000 0x0000000000000000 0x031a94 0x031a94 R   0x1000
  LOAD           0x031aa0 0x0000000000032aa0 0x0000000000032aa0 0x04bcb0 0x04bcb0 R E 0x1000
  LOAD           0x07d750 0x000000000007f750 0x000000000007f750 0x002730 0x0028b0 RW  0x1000
  LOAD           0x07fe80 0x0000000000082e80 0x0000000000082e80 0x00003b 0x0001a8 RW  0x1000
  DYNAMIC        0x07f390 0x0000000000081390 0x0000000000081390 0x0001a0 0x0001a0 RW  0x8
  GNU_RELRO      0x07d750 0x000000000007f750 0x000000000007f750 0x002730 0x0028b0 R   0x1
  GNU_EH_FRAME   0x027a94 0x0000000000027a94 0x0000000000027a94 0x001f1c 0x001f1c R   0x4
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW  0x0
  NOTE           0x000270 0x0000000000000270 0x0000000000000270 0x000024 0x000024 R   0x4

 Section to Segment mapping:
  Segment Sections...
   00     
   01     .note.gnu.build-id .dynsym .gnu.hash .dynstr .rela.dyn .relr.dyn .rela.plt .rodata .eh_frame_hdr .eh_frame 
   02     .text .init .fini .plt 
   03     .init_array .fini_array .data.rel.ro .dynamic .got .got.plt .relro_padding 
   04     .data .bss 
   05     .dynamic 
   06     .init_array .fini_array .data.rel.ro .dynamic .got .got.plt .relro_padding 
   07     .eh_frame_hdr 
   08     
   09     .note.gnu.build-id 
   None   .shstrtab .gnu_debuglink 
❯ readelf --headers /usr/lib/libc.so
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:                              DYN (Shared object file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0xC6878
  Start of program headers:          64 (bytes into file)
  Start of section headers:          847880 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         10
  Size of section headers:           64 (bytes)
  Number of section headers:         23
  Section header string table index: 21
There are 23 section headers, starting at offset 0xcf008:

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .note.gnu.build-id NOTE           0000000000000270 000270 000024 00   A  0   0  4
  [ 2] .dynsym           DYNSYM          0000000000000298 000298 009ab0 18   A  5   1  8
  [ 3] .gnu.hash         GNU_HASH        0000000000009d48 009d48 003044 00   A  2   0  8
  [ 4] .hash             HASH            000000000000cd8c 00cd8c 003398 04   A  2   0  4
  [ 5] .dynstr           STRTAB          0000000000010124 010124 00432e 00   A  0   0  1
  [ 6] .rela.dyn         RELA            0000000000014458 014458 000180 18   A  2   0  8
  [ 7] .relr.dyn         RELR            00000000000145d8 0145d8 0000a8 08   A  0   0  8
  [ 8] .rela.plt         RELA            0000000000014680 014680 000090 18  AI  2  17  8
  [ 9] .rodata           PROGBITS        0000000000014740 014740 03681d 00 AMS  0   0 64
  [10] .eh_frame_hdr     PROGBITS        000000000004af60 04af60 000024 00   A  0   0  4
  [11] .eh_frame         PROGBITS        000000000004af88 04af88 00006c 00   A  0   0  8
  [12] .text             PROGBITS        000000000004c000 04b000 080c01 00  AX  0   0 16
  [13] .plt              PROGBITS        00000000000ccc10 0cbc10 000070 00  AX  0   0 16
  [14] .data.rel.ro      PROGBITS        00000000000cdc80 0cbc80 001678 00  WA  0   0 64
  [15] .dynamic          DYNAMIC         00000000000cf2f8 0cd2f8 000150 10  WA  5   0  8
  [16] .got              PROGBITS        00000000000cf448 0cd448 000080 00  WA  0   0  8
  [17] .got.plt          PROGBITS        00000000000cf4c8 0cd4c8 000048 00  WA  0   0  8
  [18] .relro_padding    NOBITS          00000000000cf510 0cd510 000af0 00  WA  0   0  1
  [19] .data             PROGBITS        00000000000d0510 0cd510 001a20 00  WA  0   0 16
  [20] .bss              NOBITS          00000000000d1f40 0cef30 0ad040 00  WA  0   0 64
  [21] .shstrtab         STRTAB          0000000000000000 0cef30 0000c9 00      0   0  1
  [22] .gnu_debuglink    PROGBITS        0000000000000000 0ceffc 00000c 00      0   0  4
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),
  R (retain), l (large), p (processor specific)

Elf file type is DYN (Shared object file)
Entry point 0xc6878
There are 10 program headers, starting at offset 64

Program Headers:
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz   Flg Align
  PHDR           0x000040 0x0000000000000040 0x0000000000000040 0x000230 0x000230 R   0x8
  LOAD           0x000000 0x0000000000000000 0x0000000000000000 0x04aff4 0x04aff4 R   0x1000
  LOAD           0x04b000 0x000000000004c000 0x000000000004c000 0x080c80 0x080c80 R E 0x1000
  LOAD           0x0cbc80 0x00000000000cdc80 0x00000000000cdc80 0x001890 0x002380 RW  0x1000
  LOAD           0x0cd510 0x00000000000d0510 0x00000000000d0510 0x001a20 0x0aea70 RW  0x1000
  DYNAMIC        0x0cd2f8 0x00000000000cf2f8 0x00000000000cf2f8 0x000150 0x000150 RW  0x8
  GNU_RELRO      0x0cbc80 0x00000000000cdc80 0x00000000000cdc80 0x001890 0x002380 R   0x1
  GNU_EH_FRAME   0x04af60 0x000000000004af60 0x000000000004af60 0x000024 0x000024 R   0x4
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW  0x0
  NOTE           0x000270 0x0000000000000270 0x0000000000000270 0x000024 0x000024 R   0x4

 Section to Segment mapping:
  Segment Sections...
   00     
   01     .note.gnu.build-id .dynsym .gnu.hash .hash .dynstr .rela.dyn .relr.dyn .rela.plt .rodata .eh_frame_hdr .eh_frame 
   02     .text .plt 
   03     .data.rel.ro .dynamic .got .got.plt .relro_padding 
   04     .data .bss 
   05     .dynamic 
   06     .data.rel.ro .dynamic .got .got.plt .relro_padding 
   07     .eh_frame_hdr 
   08     
   09     .note.gnu.build-id 
   None   .shstrtab .gnu_debuglink 
I'm a little confused because `libc.so` and `libvulkan.so` both have `.eh_frame`: ``` ❯ readelf --headers /usr/lib/libvulkan.so.1 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: DYN (Shared object 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: 524232 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 10 Size of section headers: 64 (bytes) Number of section headers: 26 Section header string table index: 24 There are 26 section headers, starting at offset 0x7ffc8: Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 [ 1] .note.gnu.build-id NOTE 0000000000000270 000270 000024 00 A 0 0 4 [ 2] .dynsym DYNSYM 0000000000000298 000298 001ef0 18 A 4 1 8 [ 3] .gnu.hash GNU_HASH 0000000000002188 002188 000758 00 A 2 0 8 [ 4] .dynstr STRTAB 00000000000028e0 0028e0 001c26 00 A 0 0 1 [ 5] .rela.dyn RELA 0000000000004508 004508 001668 18 A 2 0 8 [ 6] .relr.dyn RELR 0000000000005b70 005b70 000088 08 A 0 0 8 [ 7] .rela.plt RELA 0000000000005bf8 005bf8 000558 18 AI 2 20 8 [ 8] .rodata PROGBITS 0000000000006150 006150 021944 00 AMS 0 0 16 [ 9] .eh_frame_hdr PROGBITS 0000000000027a94 027a94 001f1c 00 A 0 0 4 [10] .eh_frame PROGBITS 00000000000299b0 0299b0 0080e4 00 A 0 0 8 [11] .text PROGBITS 0000000000032aa0 031aa0 04b8ff 00 AX 0 0 16 [12] .init PROGBITS 000000000007e39f 07d39f 000003 00 AX 0 0 1 [13] .fini PROGBITS 000000000007e3a2 07d3a2 000003 00 AX 0 0 1 [14] .plt PROGBITS 000000000007e3b0 07d3b0 0003a0 00 AX 0 0 16 [15] .init_array INIT_ARRAY 000000000007f750 07d750 000010 00 WA 0 0 8 [16] .fini_array FINI_ARRAY 000000000007f760 07d760 000010 00 WA 0 0 8 [17] .data.rel.ro PROGBITS 000000000007f770 07d770 001c20 00 WA 0 0 16 [18] .dynamic DYNAMIC 0000000000081390 07f390 0001a0 10 WA 4 0 8 [19] .got PROGBITS 0000000000081530 07f530 000770 00 WA 0 0 8 [20] .got.plt PROGBITS 0000000000081ca0 07fca0 0001e0 00 WA 0 0 8 [21] .relro_padding NOBITS 0000000000081e80 07fe80 000180 00 WA 0 0 1 [22] .data PROGBITS 0000000000082e80 07fe80 00003b 00 WA 0 0 8 [23] .bss NOBITS 0000000000082ec0 07febb 000168 00 WA 0 0 8 [24] .shstrtab STRTAB 0000000000000000 07febb 0000ed 00 0 0 1 [25] .gnu_debuglink PROGBITS 0000000000000000 07ffa8 00001c 00 0 0 4 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), R (retain), l (large), p (processor specific) Elf file type is DYN (Shared object file) Entry point 0x0 There are 10 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x000230 0x000230 R 0x8 LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x031a94 0x031a94 R 0x1000 LOAD 0x031aa0 0x0000000000032aa0 0x0000000000032aa0 0x04bcb0 0x04bcb0 R E 0x1000 LOAD 0x07d750 0x000000000007f750 0x000000000007f750 0x002730 0x0028b0 RW 0x1000 LOAD 0x07fe80 0x0000000000082e80 0x0000000000082e80 0x00003b 0x0001a8 RW 0x1000 DYNAMIC 0x07f390 0x0000000000081390 0x0000000000081390 0x0001a0 0x0001a0 RW 0x8 GNU_RELRO 0x07d750 0x000000000007f750 0x000000000007f750 0x002730 0x0028b0 R 0x1 GNU_EH_FRAME 0x027a94 0x0000000000027a94 0x0000000000027a94 0x001f1c 0x001f1c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x0 NOTE 0x000270 0x0000000000000270 0x0000000000000270 0x000024 0x000024 R 0x4 Section to Segment mapping: Segment Sections... 00 01 .note.gnu.build-id .dynsym .gnu.hash .dynstr .rela.dyn .relr.dyn .rela.plt .rodata .eh_frame_hdr .eh_frame 02 .text .init .fini .plt 03 .init_array .fini_array .data.rel.ro .dynamic .got .got.plt .relro_padding 04 .data .bss 05 .dynamic 06 .init_array .fini_array .data.rel.ro .dynamic .got .got.plt .relro_padding 07 .eh_frame_hdr 08 09 .note.gnu.build-id None .shstrtab .gnu_debuglink ``` ``` ❯ readelf --headers /usr/lib/libc.so 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: DYN (Shared object file) Machine: Advanced Micro Devices X86-64 Version: 0x1 Entry point address: 0xC6878 Start of program headers: 64 (bytes into file) Start of section headers: 847880 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 10 Size of section headers: 64 (bytes) Number of section headers: 23 Section header string table index: 21 There are 23 section headers, starting at offset 0xcf008: Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 [ 1] .note.gnu.build-id NOTE 0000000000000270 000270 000024 00 A 0 0 4 [ 2] .dynsym DYNSYM 0000000000000298 000298 009ab0 18 A 5 1 8 [ 3] .gnu.hash GNU_HASH 0000000000009d48 009d48 003044 00 A 2 0 8 [ 4] .hash HASH 000000000000cd8c 00cd8c 003398 04 A 2 0 4 [ 5] .dynstr STRTAB 0000000000010124 010124 00432e 00 A 0 0 1 [ 6] .rela.dyn RELA 0000000000014458 014458 000180 18 A 2 0 8 [ 7] .relr.dyn RELR 00000000000145d8 0145d8 0000a8 08 A 0 0 8 [ 8] .rela.plt RELA 0000000000014680 014680 000090 18 AI 2 17 8 [ 9] .rodata PROGBITS 0000000000014740 014740 03681d 00 AMS 0 0 64 [10] .eh_frame_hdr PROGBITS 000000000004af60 04af60 000024 00 A 0 0 4 [11] .eh_frame PROGBITS 000000000004af88 04af88 00006c 00 A 0 0 8 [12] .text PROGBITS 000000000004c000 04b000 080c01 00 AX 0 0 16 [13] .plt PROGBITS 00000000000ccc10 0cbc10 000070 00 AX 0 0 16 [14] .data.rel.ro PROGBITS 00000000000cdc80 0cbc80 001678 00 WA 0 0 64 [15] .dynamic DYNAMIC 00000000000cf2f8 0cd2f8 000150 10 WA 5 0 8 [16] .got PROGBITS 00000000000cf448 0cd448 000080 00 WA 0 0 8 [17] .got.plt PROGBITS 00000000000cf4c8 0cd4c8 000048 00 WA 0 0 8 [18] .relro_padding NOBITS 00000000000cf510 0cd510 000af0 00 WA 0 0 1 [19] .data PROGBITS 00000000000d0510 0cd510 001a20 00 WA 0 0 16 [20] .bss NOBITS 00000000000d1f40 0cef30 0ad040 00 WA 0 0 64 [21] .shstrtab STRTAB 0000000000000000 0cef30 0000c9 00 0 0 1 [22] .gnu_debuglink PROGBITS 0000000000000000 0ceffc 00000c 00 0 0 4 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), R (retain), l (large), p (processor specific) Elf file type is DYN (Shared object file) Entry point 0xc6878 There are 10 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x000230 0x000230 R 0x8 LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x04aff4 0x04aff4 R 0x1000 LOAD 0x04b000 0x000000000004c000 0x000000000004c000 0x080c80 0x080c80 R E 0x1000 LOAD 0x0cbc80 0x00000000000cdc80 0x00000000000cdc80 0x001890 0x002380 RW 0x1000 LOAD 0x0cd510 0x00000000000d0510 0x00000000000d0510 0x001a20 0x0aea70 RW 0x1000 DYNAMIC 0x0cd2f8 0x00000000000cf2f8 0x00000000000cf2f8 0x000150 0x000150 RW 0x8 GNU_RELRO 0x0cbc80 0x00000000000cdc80 0x00000000000cdc80 0x001890 0x002380 R 0x1 GNU_EH_FRAME 0x04af60 0x000000000004af60 0x000000000004af60 0x000024 0x000024 R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x0 NOTE 0x000270 0x0000000000000270 0x0000000000000270 0x000024 0x000024 R 0x4 Section to Segment mapping: Segment Sections... 00 01 .note.gnu.build-id .dynsym .gnu.hash .hash .dynstr .rela.dyn .relr.dyn .rela.plt .rodata .eh_frame_hdr .eh_frame 02 .text .plt 03 .data.rel.ro .dynamic .got .got.plt .relro_padding 04 .data .bss 05 .dynamic 06 .data.rel.ro .dynamic .got .got.plt .relro_padding 07 .eh_frame_hdr 08 09 .note.gnu.build-id None .shstrtab .gnu_debuglink ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geemili/dynamic_linking_adventures#1
No description provided.