diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2019-03-16 23:09:26 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-03-16 23:09:26 +0000 |
| commit | 26eea58be0a78ea40b0ba18ba0dfd6ba470313b6 (patch) | |
| tree | 0b0fcef0fbc1d1fa061e8ea90ed976414b341900 /libelf/libelfP.h | |
| parent | 700b2efec5ca61f6a1c6859dd54cef773449eaac (diff) | |
| parent | 76a46f02a97f7d0d8ee334e1fbdb981757a7f50c (diff) | |
| download | platform_external_elfutils-android10-s1-release.tar.gz platform_external_elfutils-android10-s1-release.tar.bz2 platform_external_elfutils-android10-s1-release.zip | |
Snap for 5381581 from 76a46f02a97f7d0d8ee334e1fbdb981757a7f50c to qt-releaseandroid-vts-10.0_r5android-vts-10.0_r4android-vts-10.0_r3android-vts-10.0_r2android-vts-10.0_r1android-q-preview-6android-q-preview-5android-q-preview-4android-mainline-10.0.0_r3android-mainline-10.0.0_r2android-mainline-10.0.0_r1android-cts-10.0_r5android-cts-10.0_r4android-cts-10.0_r3android-cts-10.0_r2android-cts-10.0_r1android-10.0.0_r6android-10.0.0_r5android-10.0.0_r46android-10.0.0_r4android-10.0.0_r3android-10.0.0_r2android-10.0.0_r17android-10.0.0_r11android-10.0.0_r10android-10.0.0_r1android10-tests-releaseandroid10-security-releaseandroid10-s3-releaseandroid10-s2-releaseandroid10-s1-releaseandroid10-releaseandroid10-mainline-releaseandroid10-mainline-a-releaseandroid10-gsi
Change-Id: I6bcb41ced4cc380e88825e35e16d68c9500579e1
Diffstat (limited to 'libelf/libelfP.h')
| -rw-r--r-- | libelf/libelfP.h | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/libelf/libelfP.h b/libelf/libelfP.h index 9f3e8e9d..51344142 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -411,43 +411,30 @@ struct Elf typedef void (*xfct_t) (void *, const void *, size_t, int); /* The table with the function pointers. */ -extern const xfct_t __elf_xfctstom[EV_NUM - 1][EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] attribute_hidden; -extern const xfct_t __elf_xfctstof[EV_NUM - 1][EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] attribute_hidden; +extern const xfct_t __elf_xfctstom[ELFCLASSNUM - 1][ELF_T_NUM] + attribute_hidden; /* Array with sizes of the external types indexed by ELF version, binary class, and type. */ -extern const size_t __libelf_type_sizes[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] attribute_hidden; +extern const size_t __libelf_type_sizes[ELFCLASSNUM - 1][ELF_T_NUM] + attribute_hidden; /* We often have to access the size for a type in the current version. */ -#if EV_NUM != 2 # define elf_typesize(class,type,n) \ - elfw2(class,fsize) (type, n, __libelf_version) -#else -# define elf_typesize(class,type,n) \ - (__libelf_type_sizes[EV_CURRENT - 1][ELFW(ELFCLASS,class) - 1][type] * n) -#endif - -/* Currently selected version of the ELF specification. */ -extern unsigned int __libelf_version attribute_hidden; + (__libelf_type_sizes[ELFW(ELFCLASS,class) - 1][type] * n) /* The byte value used for filling gaps. */ extern int __libelf_fill_byte attribute_hidden; -/* Nonzero if the version was set. */ -extern int __libelf_version_initialized attribute_hidden; - -/* Index for __libelf_type_sizes et al. */ -#if EV_NUM == 2 -# define LIBELF_EV_IDX 0 -#else -# define LIBELF_EV_IDX (__libelf_version - 1) -#endif +/* EV_CURRENT if the version was set, EV_NONE otherwise. */ +extern unsigned int __libelf_version attribute_hidden; -/* Array with alignment requirements of the internal types indexed by ELF - version, binary class, and type. */ -extern const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] attribute_hidden; +/* Array with alignment requirements of the internal types indexed by + binary class, and type. */ +extern const uint_fast8_t __libelf_type_aligns[ELFCLASSNUM - 1][ELF_T_NUM] + attribute_hidden; # define __libelf_type_align(class, type) \ - (__libelf_type_aligns[LIBELF_EV_IDX][class - 1][type] ?: 1) + (__libelf_type_aligns[class - 1][type] ?: 1) /* Given an Elf handle and a section type returns the Elf_Data d_type. Should not be called when SHF_COMPRESSED is set, the d_type should @@ -455,16 +442,6 @@ extern const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_ extern Elf_Type __libelf_data_type (Elf *elf, int sh_type, GElf_Xword align) internal_function; -/* The libelf API does not have such a function but it is still useful. - Get the memory size for the given type. - - These functions cannot be marked internal since they are aliases - of the export elfXX_fsize functions.*/ -extern size_t __elf32_msize (Elf_Type __type, size_t __count, - unsigned int __version) __const_attribute__; -extern size_t __elf64_msize (Elf_Type __type, size_t __count, - unsigned int __version) __const_attribute__; - /* Create Elf descriptor from memory image. */ extern Elf *__libelf_read_mmaped_file (int fildes, void *map_address, |
