Date: Sun, 13 Sep 2020 17:36:44 +0000 (UTC) From: Brandon Bergren <bdragon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365693 - head/sys/powerpc/include Message-ID: <202009131736.08DHaiRY003677@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdragon Date: Sun Sep 13 17:36:43 2020 New Revision: 365693 URL: https://svnweb.freebsd.org/changeset/base/365693 Log: [PowerPC64LE] Adjust ELF definitions for LE. Set ELF_TARG_DATA correctly on PowerPC64LE. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/include/elf.h Modified: head/sys/powerpc/include/elf.h ============================================================================== --- head/sys/powerpc/include/elf.h Sun Sep 13 17:13:32 2020 (r365692) +++ head/sys/powerpc/include/elf.h Sun Sep 13 17:36:43 2020 (r365693) @@ -100,14 +100,17 @@ __ElfType(Auxinfo); #define R_PPC_EMB_COUNT (R_PPC_EMB_RELSDA - R_PPC_EMB_NADDR32 + 1) /* Define "machine" characteristics */ +#if BYTE_ORDER == LITTLE_ENDIAN +#define ELF_TARG_DATA ELFDATA2LSB +#else +#define ELF_TARG_DATA ELFDATA2MSB +#endif #if __ELF_WORD_SIZE == 64 #define ELF_TARG_CLASS ELFCLASS64 -#define ELF_TARG_DATA ELFDATA2MSB #define ELF_TARG_MACH EM_PPC64 #define ELF_TARG_VER 1 #else #define ELF_TARG_CLASS ELFCLASS32 -#define ELF_TARG_DATA ELFDATA2MSB #define ELF_TARG_MACH EM_PPC #define ELF_TARG_VER 1 #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009131736.08DHaiRY003677>