<commit_before>/* vi: set sw=4 ts=4: */
/*
 * A small little ldd implementation for uClibc
 *
 * Copyright (C) 2000-2006 <NAME> <<EMAIL>>
 *
 * Several functions in this file (specifically, elf_find_section_type(),
 * elf_find_phdr_type(), and elf_find_dynamic(), were stolen from elflib.c from
 * elfvector (http://www.BitWagon.com/elfvector.html) by <NAME>
 * <<EMAIL>>, which is copyright 2000 BitWagon Software LLC
 * (GPL2).
 *
 * Licensed under GPLv2 or later
 */

#include "porting.h"

#if defined(__alpha__)
#define MATCH_MACHINE(x) (x == EM_ALPHA)
#define ELFCLASSM	ELFCLASS64
#endif

#if defined(__arc__)
#define MATCH_MACHINE(x) (x == EM_ARCOMPACT)
#define ELFCLASSM      ELFCLASS32
#endif

#if defined(__arm__) || defined(__thumb__)
#define MATCH_MACHINE(x) (x == EM_ARM)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__avr32__)
#define MATCH_MACHINE(x) (x == EM_AVR32)
#define ELFCLASSM      ELFCLASS32
#endif

#if defined(__bfin__)
#define MATCH_MACHINE(x) (x == EM_BLACKFIN)
#define ELFCLASSM      ELFCLASS32
#endif

#if defined(__s390__)
#define MATCH_MACHINE(x) (x == EM_S390)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__hppa__)
#define MATCH_MACHINE(x) (x == EM_PARISC)
#if defined(__LP64__)
#define ELFCLASSM		ELFCLASS64
#else
#define ELFCLASSM		ELFCLASS32
#endif
#endif

#if defined(__i386__)
#ifndef EM_486
#define MATCH_MACHINE(x) (x == EM_386)
#else
#define MATCH_MACHINE(x) (x == EM_386 || x == EM_486)
#endif
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__ia64__)
#define MATCH_MACHINE(x) (x == EM_IA_64)
#define ELFCLASSM	ELFCLASS64
#endif

#if defined(__mc68000__)
#define MATCH_MACHINE(x) (x == EM_68K)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__metag__)
#define MATCH_MACHINE(x) (x == EM_METAG)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__mips__)
#define MATCH_MACHINE(x) (x == EM_MIPS || x == EM_MIPS_RS3_LE)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__powerpc64__)
#define MATCH_MACHINE(x) (x == EM_PPC64)
#define ELFCLASSM	ELFCLASS64
#elif defined(__powerpc__)
#define MATCH_MACHINE(x) (x == EM_PPC)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__sh__)
#define MATCH_MACHINE(x) (x == EM_SH)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__sparc__)
#define MATCH_MACHINE(x) ((x) == EM_SPARC || (x) == EM_SPARC32PLUS)
#define ELFCLASSM    ELFCLASS32
#endif

#if defined(__cris__)
#define MATCH_MACHINE(x) (x == EM_CRIS)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__x86_64__)
#define MATCH_MACHINE(x) (x == EM_X86_64)
#define ELFCLASSM	ELFCLASS64
#endif

#if defined(__microblaze__)
#define MATCH_MACHINE(x) (x == EM_MICROBLAZE)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__xtensa__)
#define MATCH_MACHINE(x) (x == EM_XTENSA)
#define ELFCLASSM	ELFCLASS32
#endif

#ifndef MATCH_MACHINE
# ifdef __linux__
#  include <asm/elf.h>
# endif
# ifdef ELF_ARCH
#  define MATCH_MACHINE(x) (x == ELF_ARCH)
# endif
# ifdef ELF_CLASS
#  define ELFCLASSM ELF_CLASS
# endif
#endif
#ifndef MATCH_MACHINE
# warning "You really should add a MATCH_MACHINE() macro for your architecture"
#endif

#if UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_LITTLE
#define ELFDATAM	ELFDATA2LSB
#elif UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_BIG
#define ELFDATAM	ELFDATA2MSB
#endif<commit_msg>ldd: fix compile for some architectures<commit_after>/* vi: set sw=4 ts=4: */
/*
 * A small little ldd implementation for uClibc
 *
 * Copyright (C) 2000-2006 <NAME> <<EMAIL>>
 *
 * Several functions in this file (specifically, elf_find_section_type(),
 * elf_find_phdr_type(), and elf_find_dynamic(), were stolen from elflib.c from
 * elfvector (http://www.BitWagon.com/elfvector.html) by <NAME>
 * <<EMAIL>>, which is copyright 2000 BitWagon Software LLC
 * (GPL2).
 *
 * Licensed under GPLv2 or later
 */

#include "porting.h"

#if defined(__alpha__)
#define MATCH_MACHINE(x) (x == EM_ALPHA)
#define ELFCLASSM	ELFCLASS64
#endif

#if defined(__arc__)
#define MATCH_MACHINE(x) (x == EM_ARCOMPACT)
#define ELFCLASSM      ELFCLASS32
#endif

#if defined(__arm__) || defined(__thumb__)
#define MATCH_MACHINE(x) (x == EM_ARM)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__avr32__)
#define MATCH_MACHINE(x) (x == EM_AVR32)
#define ELFCLASSM      ELFCLASS32
#endif

#if defined(__bfin__)
#define MATCH_MACHINE(x) (x == EM_BLACKFIN)
#define ELFCLASSM      ELFCLASS32
#endif

#if defined(__TMS320C6X__)
#define MATCH_MACHINE(x) (x == EM_TI_C6000)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__cris__)
#define MATCH_MACHINE(x) (x == EM_CRIS)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__frv__)
#define MATCH_MACHINE(x) (x == EM_CYGNUS_FRV)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__hppa__)
#define MATCH_MACHINE(x) (x == EM_PARISC)
#if defined(__LP64__)
#define ELFCLASSM		ELFCLASS64
#else
#define ELFCLASSM		ELFCLASS32
#endif
#endif

#if defined(__i386__)
#ifndef EM_486
#define MATCH_MACHINE(x) (x == EM_386)
#else
#define MATCH_MACHINE(x) (x == EM_386 || x == EM_486)
#endif
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__ia64__)
#define MATCH_MACHINE(x) (x == EM_IA_64)
#define ELFCLASSM	ELFCLASS64
#endif

#if defined(__mc68000__)
#define MATCH_MACHINE(x) (x == EM_68K)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__metag__)
#define MATCH_MACHINE(x) (x == EM_METAG)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__microblaze__)
#define MATCH_MACHINE(x) (x == EM_MICROBLAZE)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__mips__)
#define MATCH_MACHINE(x) (x == EM_MIPS || x == EM_MIPS_RS3_LE)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__nds32__)
#define MATCH_MACHINE(x) (x == EM_NDS32)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__powerpc__)
#define MATCH_MACHINE(x) (x == EM_PPC)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__sh__)
#define MATCH_MACHINE(x) (x == EM_SH)
#define ELFCLASSM	ELFCLASS32
#endif

#if defined(__sparc__)
#define MATCH_MACHINE(x) ((x) == EM_SPARC || (x) == EM_SPARC32PLUS)
#define ELFCLASSM    ELFCLASS32
#endif

#if defined(__x86_64__)
#define MATCH_MACHINE(x) (x == EM_X86_64)
#define ELFCLASSM	ELFCLASS64
#endif

#if defined(__xtensa__)
#define MATCH_MACHINE(x) (x == EM_XTENSA)
#define ELFCLASSM	ELFCLASS32
#endif

#ifndef MATCH_MACHINE
# ifdef __linux__
#  include <asm/elf.h>
# endif
# ifdef ELF_ARCH
#  define MATCH_MACHINE(x) (x == ELF_ARCH)
# endif
# ifdef ELF_CLASS
#  define ELFCLASSM ELF_CLASS
# endif
#endif
#ifndef MATCH_MACHINE
# warning "You really should add a MATCH_MACHINE() macro for your architecture"
#endif

#if UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_LITTLE
#define ELFDATAM	ELFDATA2LSB
#elif UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_BIG
#define ELFDATAM	ELFDATA2MSB
#endif
{'fraction_non_alphanumeric': 0.11793239351220251, 'fraction_numerical': 0.03486433227224496, 'mean_word_length': 6.203056768558952, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6218640', 'n_tokens_mistral': 2927, 'n_tokens_neox': 2812, 'n_words': 657}