* Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>, 2020-09-12, 01:14:
- printf(" %2d: [%14p; memsz:%7lx] flags: %#x; ", j, + printf(" %2d: [%14p; memsz:%7jx] flags: %#jx; ", j, (void *) (info\->dlpi_addr + info\->dlpi_phdr[j].p_vaddr), - info\->dlpi_phdr[j].p_memsz, - info\->dlpi_phdr[j].p_flags); + (uintmax_t) info\->dlpi_phdr[j].p_memsz, + (uintmax_t) info\->dlpi_phdr[j].p_flags);
The commit message is misleading. ElfN_Word is always uint32_t, regardless of N. On the other hand, on 64-bit architectures the type of p_memsz is Elf64_Xword (i.e., uint64_t), not Elf64_Word.
-- Jakub Wilk