Support building big-endian objects (#2382)

The JIT build_object routine currently rejects building object files
for any big-endian platform.  However, most of the object builder
code works fine for either byte order, with the exception of a small
change in the ObjectBuilderTarget::new routine.

This patch adds that change and removes the assert in build_object.
This commit is contained in:
Ulrich Weigand
2020-11-09 18:19:33 +01:00
committed by GitHub
parent b326f29885
commit 0568f4fb02
2 changed files with 4 additions and 9 deletions

View File

@@ -28,10 +28,6 @@ pub(crate) fn build_object(
dwarf_sections: Vec<DwarfSection>,
) -> Result<(Object, Vec<ObjectUnwindInfo>), anyhow::Error> {
const CODE_SECTION_ALIGNMENT: u64 = 0x1000;
assert_eq!(
isa.triple().architecture.endianness(),
Ok(target_lexicon::Endianness::Little)
);
let mut unwind_info = Vec::new();