From a84d4fc42639184d81ce06afea7041c79cf42d2e Mon Sep 17 00:00:00 2001 From: Dave MacLachlan Date: Thu, 12 May 2016 14:22:59 -0700 Subject: Replaced glibc version of elf.h with musl version of elf.h. Updated dump_syms xcode project and ran tests. BUG= R=vapier@chromium.org Review URL: https://codereview.chromium.org/1973113002 . --- src/common/dwarf/elf_reader.cc | 13 +++++++++++++ src/common/mac/include/features.h | 16 ---------------- 2 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 src/common/mac/include/features.h (limited to 'src/common') diff --git a/src/common/dwarf/elf_reader.cc b/src/common/dwarf/elf_reader.cc index 81683141..b41faa6e 100644 --- a/src/common/dwarf/elf_reader.cc +++ b/src/common/dwarf/elf_reader.cc @@ -52,6 +52,19 @@ #define EM_AARCH64 183 /* ARM AARCH64 */ #endif +// Map Linux macros to their Apple equivalents. +#if __APPLE__ +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ +#endif // __LITTLE_ENDIAN +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ +#endif // __BIG_ENDIAN +#ifndef __BYTE_ORDER +#define __BYTE_ORDER __BYTE_ORDER__ +#endif // __BYTE_ORDER +#endif // __APPLE__ + // TODO(dthomson): Can be removed once all Java code is using the Google3 // launcher. We need to avoid processing PLT functions as it causes memory // fragmentation in malloc, which is fixed in tcmalloc - and if the Google3 diff --git a/src/common/mac/include/features.h b/src/common/mac/include/features.h deleted file mode 100644 index 2020c482..00000000 --- a/src/common/mac/include/features.h +++ /dev/null @@ -1,16 +0,0 @@ -// This file is included by third_party/glibc/elf/elf.h -// We use it to map a couple of glibc specific macros -// over to their OS X equivalents. - - -// Map GNU endianness macros over to OS X endianness macros. - -#ifndef __LITTLE_ENDIAN - #define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ -#endif -#ifndef __BIG_ENDIAN - #define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ -#endif -#ifndef __BYTE_ORDER - #define __BYTE_ORDER __BYTE_ORDER__ -#endif -- cgit v1.2.1