PPC64 check ehdri.e_ident[EI_DATA], not elfout

modified:   p_lx_elf.cpp
This commit is contained in:
John Reiser 2025-02-12 08:56:18 -08:00 committed by Markus F.X.J. Oberhumer
parent bd67677389
commit 782b07c752

View File

@ -1870,7 +1870,7 @@ PackLinuxElf64::buildLinuxLoader(
) { // main program with ELF2 de-compressor
addLoader("ELFMAINX,ELFMAINZ,FOLDEXEC,IDENTSTR");
if (this->e_machine==Elf64_Ehdr::EM_PPC64
&& elfout.ehdr.e_ident[Elf64_Ehdr::EI_DATA]==Elf64_Ehdr::ELFDATA2MSB) {
&& ehdri.e_ident[Elf64_Ehdr::EI_DATA]==Elf64_Ehdr::ELFDATA2MSB) {
addLoader("ELFMAINZe");
}
if (!xct_off) { // main program