* dyn_load.c: Include asm/elf.h and linux/elf-em.h explicitly, and
undefine ELF_DATA and EM_ALPHA (if PLATFORM_ANDROID and
BIONIC_ELFDATA_REDEF_BUG are defined) to workaround a bug (avoiding
"macro redefined" warnings) in Android 4.1 (and 4.2) Bionic which has
the mismatching macro definitions in headers included from linker.h.
/* The header file is in "bionic/linker" folder of Android sources. */
/* If you don't need the "dynamic loading" feature, you may build */
/* the collector with -D IGNORE_DYNAMIC_LOADING. */
+# ifdef BIONIC_ELFDATA_REDEF_BUG
+ /* Workaround a problem in Android 4.1 (and 4.2) Bionic which has */
+ /* mismatching ELF_DATA definitions in sys/exec_elf.h and */
+ /* asm/elf.h included from linker.h file (similar to EM_ALPHA). */
+# include <asm/elf.h>
+# include <linux/elf-em.h>
+# undef ELF_DATA
+# undef EM_ALPHA
+# endif
# include <linker.h>
# else
# include <link.h>