Skip to content

Commit

Permalink
MachO: Fix a typo in x64 BE magic number
Browse files Browse the repository at this point in the history
For x64 Big Endian architectures 0xcffaedfe is a magic number, according to the official Apple Mach-O loader.

See https://opensource.apple.com/source/xnu/xnu-2050.18.24/EXTERNAL_HEADERS/mach-o/loader.h
  • Loading branch information
RoadTrain authored Oct 13, 2023
1 parent 37620f6 commit 5786007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ELFSharp/MachO/MachOReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static MachOResult TryLoadFat(Stream stream, bool shouldOwnStream, out IR
{ 0xFEEDFACE, (false, Endianess.LittleEndian) },
{ 0xFEEDFACF, (true, Endianess.LittleEndian) },
{ 0xCEFAEDFE, (false, Endianess.BigEndian) },
{ 0xCFFEEDFE, (true, Endianess.BigEndian) }
{ 0xCFFAEDFE, (true, Endianess.BigEndian) }
};

private const uint FatMagic = 0xBEBAFECA;
Expand Down

0 comments on commit 5786007

Please sign in to comment.