From f87eee9ffe78dbf775df09a95a056e00ebeb6e4a Mon Sep 17 00:00:00 2001 From: Thomas Guillemard Date: Thu, 9 May 2019 13:10:38 +0200 Subject: [PATCH] nxo: Allow target machine ARM Required to build AArch32 NSO/NRO --- src/format/nxo.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/format/nxo.rs b/src/format/nxo.rs index c1558d4..81634c9 100644 --- a/src/format/nxo.rs +++ b/src/format/nxo.rs @@ -1,6 +1,6 @@ use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use elf; -use elf::types::{EM_AARCH64, ProgramHeader, PT_LOAD, SHT_NOTE}; +use elf::types::{EM_ARM, EM_AARCH64, ProgramHeader, PT_LOAD, SHT_NOTE}; use crate::format::{utils, romfs::RomFs, nacp::NacpFile}; use std; use std::fs::File; @@ -59,8 +59,8 @@ impl NxoFile { let elf_file = elf::File::open_stream(&mut file).unwrap(); - if elf_file.ehdr.machine != EM_AARCH64 { - println!("Error: Invalid ELF file (expected AArch64 machine)"); + if elf_file.ehdr.machine != EM_AARCH64 && elf_file.ehdr.machine != EM_ARM { + println!("Error: Invalid ELF file (expected ARM or AArch64 machine)"); process::exit(1) }