Print an elf32_Word as a word


I am working with ELF files. I have a variables of type elf32_Word and I would like to print them in the terminal as text.

For example, my section table name:

Elf32_Shdr ST;

but the "%d" value doesn't make it (it is print as an integer).

FYI, i know the elf32 declaration in elf.h:

typedef __u32   Elf32_Word;

Sections with well printed names :

index    value      size      type bind oth ver shndx          name
  [0]  0x00000000 0x00000000  NOTY LOCL  D    0 UNDEF          
  [1]  0x00025c0c 0x00000000  FUNC GLOB  D    2 UNDEF          .udiv
  [2]  0x00025e00 0x00000140  OBJT WEAK  D    1 .bss           _iob
asked on Stack Overflow Dec 13, 2019 by Foxhunt • edited Dec 13, 2019 by Foxhunt

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0