For ELF files, there is a field near the start of the ELF header that indicates the endianness of the file:e_ident[EI_DATA]. If an application wants to extract data from the header of a given ELF binary, this field can be used to know whether endianness adjustments are needed for extracted integer values.
Is there an equivalent process for determining the endianness of a given PE file, or is it safe to assume that all PE files will use little endianness for stored integer values?
The majority of PE files encountered will likely be compiled for x86 or x86_64 (and, thus, will use little endianness), but the question arises for PE files built for Windows on ARM / ARM64, since many ARM processors have big endian and little endian modes of operation. Also, this article implies that Windows supports/supported running on other architectures like MIPS as well, which may have supported big endianness also.