diff options
| author | Ulrich Drepper <[email protected]> | 2007-03-30 19:14:59 +0000 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2007-03-30 19:14:59 +0000 |
| commit | c07fbb3ff74a8c7b4916ff8155060a35f4b08aaa (patch) | |
| tree | c8a1484501cecd7309fae583e2009c31983c72be /libelf/libelfP.h | |
| parent | 6258e7486eb3eed6e50005946795c5fbf73aa106 (diff) | |
propagate from branch 'com.redhat.elfutils.roland.pending' (head b584b7056d679db0fc272b47667047d07737ca55)
to branch 'com.redhat.elfutils' (head 5f150a0b2f07e8c60913d4e6ad833ef026ccd26e)
Diffstat (limited to 'libelf/libelfP.h')
| -rw-r--r-- | libelf/libelfP.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libelf/libelfP.h b/libelf/libelfP.h index 54158aeb..f06252d7 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -1,5 +1,5 @@ /* Internal interfaces for libelf. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Red Hat, Inc. + Copyright (C) 1998,1999,2000,2001,2002,2003,2005,2006,2007 Red Hat, Inc. This file is part of Red Hat elfutils. Contributed by Ulrich Drepper <[email protected]>, 1998. @@ -423,6 +423,22 @@ 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 + +#if !ALLOW_UNALIGNED +/* 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; +# define __libelf_type_align(class, type) \ + (__libelf_type_aligns[LIBELF_EV_IDX][class][type] ?: 1) +#else +# define __libelf_type_align(class, type) 1 +#endif /* The libelf API does not have such a function but it is still useful. Get the memory size for the given type. |
