On Wed, 2024-11-27 at 12:03 +0000, Vadim Fedorenko wrote: [...] > > looks good, I'm just curious about one thing.. > > > > so ELF_T_WORD enum has this comment: /* Elf32_Word, Elf64_Word, ... */ > > > > I did just quick check, ***so I might be easily wrong***, but I wonder the > > code in __elf_xfctstom (which I assume is the one called for conversion) > > chooses to swap 32/64 bits values based on elf->class .. so for 64bit ELF > > class we swap 64bit values? ... while .BTF_ids has always 32 bit values > > Well according to the doc: > > ELF_T_WORD Unsigned 32-bit words. > ELF_T_XWORD Unsigned 64-bit words. > > It shouldn't use 64 bits swap: > > const xfct_t __elf_xfctstom[EV_NUM - 1][EV_NUM - 1][ELFCLASSNUM - > 1][ELF_T_NUM] = > .... > [ELF_T_WORD] = ElfW2(Bits, cvt_Word), > [ELF_T_XWORD] = ElfW2(Bits, cvt_Xword), > ... > > Are you looking somewhere else? Right, thank you, Vadim. [...]