mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Introduced bele_policy.h.
This commit is contained in:
parent
c15b8d71bc
commit
3d91ab6c31
169
src/bele.h
169
src/bele.h
|
@ -477,165 +477,32 @@ int __acc_cdecl_qsort le64_compare_signed(const void *, const void *);
|
|||
|
||||
|
||||
/*************************************************************************
|
||||
// Provide namespaces and classes to abtract endianness policies.
|
||||
//
|
||||
// CTP - Compile-Time Polymorphism (templates)
|
||||
// RTP - Run-Time Polymorphism (virtual functions)
|
||||
**************************************************************************/
|
||||
|
||||
namespace NBELE {
|
||||
|
||||
struct BEPolicy
|
||||
{
|
||||
enum { isBE = 1, isLE = 0 };
|
||||
|
||||
typedef BE16 U16;
|
||||
typedef BE32 U32;
|
||||
typedef BE64 U64;
|
||||
|
||||
static inline unsigned get16(const void *p)
|
||||
{ return get_be16(p); }
|
||||
static inline unsigned get24(const void *p)
|
||||
{ return get_be24(p); }
|
||||
static inline unsigned get32(const void *p)
|
||||
{ return get_be32(p); }
|
||||
static inline acc_uint64l_t get64(const void *p)
|
||||
{ return get_be64(p); }
|
||||
|
||||
static inline void set16(void *p, unsigned v)
|
||||
{ set_be16(p, v); }
|
||||
static inline void set24(void *p, unsigned v)
|
||||
{ set_be24(p, v); }
|
||||
static inline void set32(void *p, unsigned v)
|
||||
{ set_be32(p, v); }
|
||||
static inline void set64(void *p, acc_uint64l_t v)
|
||||
{ set_be64(p, v); }
|
||||
|
||||
static inline unsigned get16_signed(const void *p)
|
||||
{ return get_be16_signed(p); }
|
||||
static inline unsigned get24_signed(const void *p)
|
||||
{ return get_be24_signed(p); }
|
||||
static inline unsigned get32_signed(const void *p)
|
||||
{ return get_be32_signed(p); }
|
||||
static inline acc_uint64l_t get64_signed(const void *p)
|
||||
{ return get_be64_signed(p); }
|
||||
|
||||
static int __acc_cdecl_qsort u16_compare(const void *a, const void *b)
|
||||
{ return be16_compare(a, b); }
|
||||
static int __acc_cdecl_qsort u24_compare(const void *a, const void *b)
|
||||
{ return be24_compare(a, b); }
|
||||
static int __acc_cdecl_qsort u32_compare(const void *a, const void *b)
|
||||
{ return be32_compare(a, b); }
|
||||
static int __acc_cdecl_qsort u64_compare(const void *a, const void *b)
|
||||
{ return be64_compare(a, b); }
|
||||
|
||||
static int __acc_cdecl_qsort u16_compare_signed(const void *a, const void *b)
|
||||
{ return be16_compare_signed(a, b); }
|
||||
static int __acc_cdecl_qsort u24_compare_signed(const void *a, const void *b)
|
||||
{ return be24_compare_signed(a, b); }
|
||||
static int __acc_cdecl_qsort u32_compare_signed(const void *a, const void *b)
|
||||
{ return be32_compare_signed(a, b); }
|
||||
static int __acc_cdecl_qsort u64_compare_signed(const void *a, const void *b)
|
||||
{ return be64_compare_signed(a, b); }
|
||||
|
||||
static void compileTimeAssertions() {
|
||||
COMPILE_TIME_ASSERT(sizeof(U16) == 2)
|
||||
COMPILE_TIME_ASSERT(sizeof(U32) == 4)
|
||||
COMPILE_TIME_ASSERT(sizeof(U64) == 8)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U16, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U32, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U64, char)
|
||||
// forward declarations
|
||||
namespace N_BELE_CTP {
|
||||
class BEPolicy; class LEPolicy;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct LEPolicy
|
||||
{
|
||||
enum { isBE = 0, isLE = 1 };
|
||||
|
||||
typedef LE16 U16;
|
||||
typedef LE32 U32;
|
||||
typedef LE64 U64;
|
||||
|
||||
static inline unsigned get16(const void *p)
|
||||
{ return get_le16(p); }
|
||||
static inline unsigned get24(const void *p)
|
||||
{ return get_le24(p); }
|
||||
static inline unsigned get32(const void *p)
|
||||
{ return get_le32(p); }
|
||||
static inline acc_uint64l_t get64(const void *p)
|
||||
{ return get_le64(p); }
|
||||
|
||||
static inline void set16(void *p, unsigned v)
|
||||
{ set_le16(p, v); }
|
||||
static inline void set24(void *p, unsigned v)
|
||||
{ set_le24(p, v); }
|
||||
static inline void set32(void *p, unsigned v)
|
||||
{ set_le32(p, v); }
|
||||
static inline void set64(void *p, acc_uint64l_t v)
|
||||
{ set_le64(p, v); }
|
||||
|
||||
static inline unsigned get16_signed(const void *p)
|
||||
{ return get_le16_signed(p); }
|
||||
static inline unsigned get24_signed(const void *p)
|
||||
{ return get_le24_signed(p); }
|
||||
static inline unsigned get32_signed(const void *p)
|
||||
{ return get_le32_signed(p); }
|
||||
static inline acc_uint64l_t get64_signed(const void *p)
|
||||
{ return get_le64_signed(p); }
|
||||
|
||||
static int __acc_cdecl_qsort u16_compare(const void *a, const void *b)
|
||||
{ return le16_compare(a, b); }
|
||||
static int __acc_cdecl_qsort u24_compare(const void *a, const void *b)
|
||||
{ return le24_compare(a, b); }
|
||||
static int __acc_cdecl_qsort u32_compare(const void *a, const void *b)
|
||||
{ return le32_compare(a, b); }
|
||||
static int __acc_cdecl_qsort u64_compare(const void *a, const void *b)
|
||||
{ return le64_compare(a, b); }
|
||||
|
||||
static int __acc_cdecl_qsort u16_compare_signed(const void *a, const void *b)
|
||||
{ return le16_compare_signed(a, b); }
|
||||
static int __acc_cdecl_qsort u24_compare_signed(const void *a, const void *b)
|
||||
{ return le24_compare_signed(a, b); }
|
||||
static int __acc_cdecl_qsort u32_compare_signed(const void *a, const void *b)
|
||||
{ return le32_compare_signed(a, b); }
|
||||
static int __acc_cdecl_qsort u64_compare_signed(const void *a, const void *b)
|
||||
{ return le64_compare_signed(a, b); }
|
||||
|
||||
static void compileTimeAssertions() {
|
||||
COMPILE_TIME_ASSERT(sizeof(U16) == 2)
|
||||
COMPILE_TIME_ASSERT(sizeof(U32) == 4)
|
||||
COMPILE_TIME_ASSERT(sizeof(U64) == 8)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U16, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U32, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U64, char)
|
||||
namespace N_BELE_RTP {
|
||||
class AbstractPolicy;
|
||||
class BEPolicy; class LEPolicy;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#if (ACC_ABI_BIG_ENDIAN)
|
||||
typedef BEPolicy HostPolicy;
|
||||
#elif (ACC_ABI_LITTLE_ENDIAN)
|
||||
typedef LEPolicy HostPolicy;
|
||||
#else
|
||||
# error "ACC_ABI_ENDIAN"
|
||||
#endif
|
||||
|
||||
|
||||
struct HostAlignedPolicy
|
||||
{
|
||||
enum { isBE = HostPolicy::isBE, isLE = HostPolicy::isLE };
|
||||
|
||||
typedef acc_uint16e_t U16;
|
||||
typedef acc_uint32e_t U32;
|
||||
typedef acc_uint64l_t U64;
|
||||
|
||||
static void compileTimeAssertions() {
|
||||
COMPILE_TIME_ASSERT(sizeof(U16) == 2)
|
||||
COMPILE_TIME_ASSERT(sizeof(U32) == 4)
|
||||
COMPILE_TIME_ASSERT(sizeof(U64) == 8)
|
||||
namespace N_BELE_CTP {
|
||||
#define BELE_CTP 1
|
||||
#include "bele_policy.h"
|
||||
#undef BELE_CTP
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace NBELE
|
||||
namespace N_BELE_RTP {
|
||||
#define BELE_RTP 1
|
||||
#include "bele_policy.h"
|
||||
#undef BELE_RTP
|
||||
}
|
||||
|
||||
|
||||
#endif /* already included */
|
||||
|
|
273
src/bele_policy.h
Normal file
273
src/bele_policy.h
Normal file
|
@ -0,0 +1,273 @@
|
|||
/* bele_policy.h -- access memory in BigEndian and LittleEndian byte order
|
||||
|
||||
This file is part of the UPX executable compressor.
|
||||
|
||||
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2006 Laszlo Molnar
|
||||
All Rights Reserved.
|
||||
|
||||
UPX and the UCL library are free software; you can redistribute them
|
||||
and/or modify them under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer Laszlo Molnar
|
||||
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __UPX_BELE_H
|
||||
# error "this is an internal include file"
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
//
|
||||
**************************************************************************/
|
||||
|
||||
#if defined(BELE_CTP)
|
||||
// CTP - Compile-Time Polymorphism (templates)
|
||||
# define V static inline
|
||||
# define S static int __acc_cdecl_qsort
|
||||
# define C
|
||||
#elif defined(BELE_RTP)
|
||||
// RTP - Run-Time Polymorphism (virtual functions)
|
||||
# define V virtual
|
||||
# define S virtual int
|
||||
# define C const
|
||||
#else
|
||||
# error
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(BELE_RTP)
|
||||
struct AbstractPolicy
|
||||
{
|
||||
virtual inline ~AbstractPolicy() {}
|
||||
V bool isBE() C = 0;
|
||||
V bool isLE() C = 0;
|
||||
|
||||
V unsigned get16(const void *p) C = 0;
|
||||
V unsigned get24(const void *p) C = 0;
|
||||
V unsigned get32(const void *p) C = 0;
|
||||
V acc_uint64l_t get64(const void *p) C = 0;
|
||||
|
||||
V void set16(void *p, unsigned v) C = 0;
|
||||
V void set24(void *p, unsigned v) C = 0;
|
||||
V void set32(void *p, unsigned v) C = 0;
|
||||
V void set64(void *p, acc_uint64l_t v) C = 0;
|
||||
|
||||
V unsigned get16_signed(const void *p) C = 0;
|
||||
V unsigned get24_signed(const void *p) C = 0;
|
||||
V unsigned get32_signed(const void *p) C = 0;
|
||||
V acc_uint64l_t get64_signed(const void *p) C = 0;
|
||||
|
||||
S u16_compare(const void *a, const void *b) C = 0;
|
||||
S u24_compare(const void *a, const void *b) C = 0;
|
||||
S u32_compare(const void *a, const void *b) C = 0;
|
||||
S u64_compare(const void *a, const void *b) C = 0;
|
||||
|
||||
S u16_compare_signed(const void *a, const void *b) C = 0;
|
||||
S u24_compare_signed(const void *a, const void *b) C = 0;
|
||||
S u32_compare_signed(const void *a, const void *b) C = 0;
|
||||
S u64_compare_signed(const void *a, const void *b) C = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
struct BEPolicy
|
||||
#if defined(BELE_RTP)
|
||||
: public AbstractPolicy
|
||||
#endif
|
||||
{
|
||||
#if defined(BELE_CTP)
|
||||
typedef N_BELE_RTP::BEPolicy RTP_Policy;
|
||||
enum { isBE = 1, isLE = 0 };
|
||||
#elif defined(BELE_RTP)
|
||||
typedef N_BELE_CTP::BEPolicy CTP_Policy;
|
||||
V bool isBE() C { return CTP_Policy::isBE; }
|
||||
V bool isLE() C { return CTP_Policy::isLE; }
|
||||
#endif
|
||||
|
||||
typedef BE16 U16;
|
||||
typedef BE32 U32;
|
||||
typedef BE64 U64;
|
||||
|
||||
V unsigned get16(const void *p) C
|
||||
{ return get_be16(p); }
|
||||
V unsigned get24(const void *p) C
|
||||
{ return get_be24(p); }
|
||||
V unsigned get32(const void *p) C
|
||||
{ return get_be32(p); }
|
||||
V acc_uint64l_t get64(const void *p) C
|
||||
{ return get_be64(p); }
|
||||
|
||||
V void set16(void *p, unsigned v) C
|
||||
{ set_be16(p, v); }
|
||||
V void set24(void *p, unsigned v) C
|
||||
{ set_be24(p, v); }
|
||||
V void set32(void *p, unsigned v) C
|
||||
{ set_be32(p, v); }
|
||||
V void set64(void *p, acc_uint64l_t v) C
|
||||
{ set_be64(p, v); }
|
||||
|
||||
V unsigned get16_signed(const void *p) C
|
||||
{ return get_be16_signed(p); }
|
||||
V unsigned get24_signed(const void *p) C
|
||||
{ return get_be24_signed(p); }
|
||||
V unsigned get32_signed(const void *p) C
|
||||
{ return get_be32_signed(p); }
|
||||
V acc_uint64l_t get64_signed(const void *p) C
|
||||
{ return get_be64_signed(p); }
|
||||
|
||||
S u16_compare(const void *a, const void *b) C
|
||||
{ return be16_compare(a, b); }
|
||||
S u24_compare(const void *a, const void *b) C
|
||||
{ return be24_compare(a, b); }
|
||||
S u32_compare(const void *a, const void *b) C
|
||||
{ return be32_compare(a, b); }
|
||||
S u64_compare(const void *a, const void *b) C
|
||||
{ return be64_compare(a, b); }
|
||||
|
||||
S u16_compare_signed(const void *a, const void *b) C
|
||||
{ return be16_compare_signed(a, b); }
|
||||
S u24_compare_signed(const void *a, const void *b) C
|
||||
{ return be24_compare_signed(a, b); }
|
||||
S u32_compare_signed(const void *a, const void *b) C
|
||||
{ return be32_compare_signed(a, b); }
|
||||
S u64_compare_signed(const void *a, const void *b) C
|
||||
{ return be64_compare_signed(a, b); }
|
||||
|
||||
static void compileTimeAssertions() {
|
||||
COMPILE_TIME_ASSERT(sizeof(U16) == 2)
|
||||
COMPILE_TIME_ASSERT(sizeof(U32) == 4)
|
||||
COMPILE_TIME_ASSERT(sizeof(U64) == 8)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U16, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U32, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U64, char)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct LEPolicy
|
||||
#if defined(BELE_RTP)
|
||||
: public AbstractPolicy
|
||||
#endif
|
||||
{
|
||||
#if defined(BELE_CTP)
|
||||
typedef N_BELE_RTP::LEPolicy RTP_Policy;
|
||||
enum { isBE = 0, isLE = 1 };
|
||||
#elif defined(BELE_RTP)
|
||||
typedef N_BELE_CTP::LEPolicy CTP_Policy;
|
||||
V bool isBE() C { return CTP_Policy::isBE; }
|
||||
V bool isLE() C { return CTP_Policy::isLE; }
|
||||
#endif
|
||||
|
||||
typedef LE16 U16;
|
||||
typedef LE32 U32;
|
||||
typedef LE64 U64;
|
||||
|
||||
V unsigned get16(const void *p) C
|
||||
{ return get_le16(p); }
|
||||
V unsigned get24(const void *p) C
|
||||
{ return get_le24(p); }
|
||||
V unsigned get32(const void *p) C
|
||||
{ return get_le32(p); }
|
||||
V acc_uint64l_t get64(const void *p) C
|
||||
{ return get_le64(p); }
|
||||
|
||||
V void set16(void *p, unsigned v) C
|
||||
{ set_le16(p, v); }
|
||||
V void set24(void *p, unsigned v) C
|
||||
{ set_le24(p, v); }
|
||||
V void set32(void *p, unsigned v) C
|
||||
{ set_le32(p, v); }
|
||||
V void set64(void *p, acc_uint64l_t v) C
|
||||
{ set_le64(p, v); }
|
||||
|
||||
V unsigned get16_signed(const void *p) C
|
||||
{ return get_le16_signed(p); }
|
||||
V unsigned get24_signed(const void *p) C
|
||||
{ return get_le24_signed(p); }
|
||||
V unsigned get32_signed(const void *p) C
|
||||
{ return get_le32_signed(p); }
|
||||
V acc_uint64l_t get64_signed(const void *p) C
|
||||
{ return get_le64_signed(p); }
|
||||
|
||||
S u16_compare(const void *a, const void *b) C
|
||||
{ return le16_compare(a, b); }
|
||||
S u24_compare(const void *a, const void *b) C
|
||||
{ return le24_compare(a, b); }
|
||||
S u32_compare(const void *a, const void *b) C
|
||||
{ return le32_compare(a, b); }
|
||||
S u64_compare(const void *a, const void *b) C
|
||||
{ return le64_compare(a, b); }
|
||||
|
||||
S u16_compare_signed(const void *a, const void *b) C
|
||||
{ return le16_compare_signed(a, b); }
|
||||
S u24_compare_signed(const void *a, const void *b) C
|
||||
{ return le24_compare_signed(a, b); }
|
||||
S u32_compare_signed(const void *a, const void *b) C
|
||||
{ return le32_compare_signed(a, b); }
|
||||
S u64_compare_signed(const void *a, const void *b) C
|
||||
{ return le64_compare_signed(a, b); }
|
||||
|
||||
static void compileTimeAssertions() {
|
||||
COMPILE_TIME_ASSERT(sizeof(U16) == 2)
|
||||
COMPILE_TIME_ASSERT(sizeof(U32) == 4)
|
||||
COMPILE_TIME_ASSERT(sizeof(U64) == 8)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U16, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U32, char)
|
||||
COMPILE_TIME_ASSERT_ALIGNOF(U64, char)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#if (ACC_ABI_BIG_ENDIAN)
|
||||
typedef BEPolicy HostPolicy;
|
||||
#elif (ACC_ABI_LITTLE_ENDIAN)
|
||||
typedef LEPolicy HostPolicy;
|
||||
#else
|
||||
# error "ACC_ABI_ENDIAN"
|
||||
#endif
|
||||
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
struct HostAlignedPolicy
|
||||
{
|
||||
#if defined(BELE_CTP)
|
||||
enum { isBE = HostPolicy::isBE, isLE = HostPolicy::isLE };
|
||||
#endif
|
||||
|
||||
typedef acc_uint16e_t U16;
|
||||
typedef acc_uint32e_t U32;
|
||||
typedef acc_uint64l_t U64;
|
||||
|
||||
static void compileTimeAssertions() {
|
||||
COMPILE_TIME_ASSERT(sizeof(U16) == 2)
|
||||
COMPILE_TIME_ASSERT(sizeof(U32) == 4)
|
||||
COMPILE_TIME_ASSERT(sizeof(U64) == 8)
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#undef V
|
||||
#undef S
|
||||
#undef C
|
||||
|
||||
|
||||
/*
|
||||
vi:ts=4:et:nowrap
|
||||
*/
|
||||
|
|
@ -112,8 +112,8 @@ struct TDefaultLinker : public DefaultLinker
|
|||
virtual void set32(void *b, unsigned v) const { T::set32(b, v); }
|
||||
};
|
||||
|
||||
typedef TDefaultLinker<NBELE::BEPolicy> DefaultBELinker;
|
||||
typedef TDefaultLinker<NBELE::LEPolicy> DefaultLELinker;
|
||||
typedef TDefaultLinker<N_BELE_CTP::BEPolicy> DefaultBELinker;
|
||||
typedef TDefaultLinker<N_BELE_CTP::LEPolicy> DefaultLELinker;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -147,8 +147,8 @@ struct TSimpleLinker : public SimpleLinker
|
|||
virtual void set32(void *b, unsigned v) const { T::set32(b, v); }
|
||||
};
|
||||
|
||||
typedef TSimpleLinker<NBELE::BEPolicy> SimpleBELinker;
|
||||
typedef TSimpleLinker<NBELE::LEPolicy> SimpleLELinker;
|
||||
typedef TSimpleLinker<N_BELE_CTP::BEPolicy> SimpleBELinker;
|
||||
typedef TSimpleLinker<N_BELE_CTP::LEPolicy> SimpleLELinker;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
|
|
78
src/p_elf.h
78
src/p_elf.h
|
@ -34,7 +34,7 @@
|
|||
// Some ELF type definitinons
|
||||
**************************************************************************/
|
||||
|
||||
namespace TT_Elf {
|
||||
namespace N_Elf {
|
||||
|
||||
// The ELF file header. This appears at the start of every ELF file.
|
||||
template <class Word, class Addr, class Off, class Half>
|
||||
|
@ -116,10 +116,10 @@ struct Dyn
|
|||
}
|
||||
__attribute_packed;
|
||||
|
||||
} // namespace TT_Elf
|
||||
} // namespace N_Elf
|
||||
|
||||
|
||||
namespace TT_Elf32 {
|
||||
namespace N_Elf32 {
|
||||
|
||||
// Program segment header.
|
||||
template <class Word, class Addr, class Off>
|
||||
|
@ -243,10 +243,10 @@ struct Sym
|
|||
}
|
||||
__attribute_packed;
|
||||
|
||||
} // namespace TT_Elf32
|
||||
} // namespace N_Elf32
|
||||
|
||||
|
||||
namespace TT_Elf64 {
|
||||
namespace N_Elf64 {
|
||||
|
||||
// Program segment header.
|
||||
template <class Word, class Xword, class Addr, class Off>
|
||||
|
@ -314,56 +314,56 @@ struct Shdr
|
|||
}
|
||||
__attribute_packed;
|
||||
|
||||
} // namespace TT_Elf64
|
||||
} // namespace N_Elf64
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// now for the actual types
|
||||
**************************************************************************/
|
||||
|
||||
#define P NBELE::HostPolicy
|
||||
typedef TT_Elf ::Ehdr<P::U32,P::U32,P::U32,P::U16> Elf32_Ehdr;
|
||||
typedef TT_Elf32::Phdr<P::U32,P::U32,P::U32> Elf32_Phdr;
|
||||
typedef TT_Elf32::Shdr<P::U32,P::U32,P::U32> Elf32_Shdr;
|
||||
typedef TT_Elf ::Dyn <P::U32,P::U32> Elf32_Dyn;
|
||||
typedef TT_Elf32::Sym <P::U16,P::U32> Elf32_Sym;
|
||||
#define P N_BELE_CTP::HostPolicy
|
||||
typedef N_Elf ::Ehdr<P::U32,P::U32,P::U32,P::U16> Elf32_Ehdr;
|
||||
typedef N_Elf32::Phdr<P::U32,P::U32,P::U32> Elf32_Phdr;
|
||||
typedef N_Elf32::Shdr<P::U32,P::U32,P::U32> Elf32_Shdr;
|
||||
typedef N_Elf ::Dyn <P::U32,P::U32> Elf32_Dyn;
|
||||
typedef N_Elf32::Sym <P::U16,P::U32> Elf32_Sym;
|
||||
#undef P
|
||||
|
||||
#define P NBELE::BEPolicy
|
||||
typedef TT_Elf ::Ehdr<P::U32,P::U32,P::U32,P::U16> Elf_BE32_Ehdr;
|
||||
typedef TT_Elf32::Phdr<P::U32,P::U32,P::U32> Elf_BE32_Phdr;
|
||||
typedef TT_Elf32::Shdr<P::U32,P::U32,P::U32> Elf_BE32_Shdr;
|
||||
typedef TT_Elf ::Dyn <P::U32,P::U32> Elf_BE32_Dyn;
|
||||
typedef TT_Elf32::Sym <P::U16,P::U32> Elf_BE32_Sym;
|
||||
#define P N_BELE_CTP::BEPolicy
|
||||
typedef N_Elf ::Ehdr<P::U32,P::U32,P::U32,P::U16> Elf_BE32_Ehdr;
|
||||
typedef N_Elf32::Phdr<P::U32,P::U32,P::U32> Elf_BE32_Phdr;
|
||||
typedef N_Elf32::Shdr<P::U32,P::U32,P::U32> Elf_BE32_Shdr;
|
||||
typedef N_Elf ::Dyn <P::U32,P::U32> Elf_BE32_Dyn;
|
||||
typedef N_Elf32::Sym <P::U16,P::U32> Elf_BE32_Sym;
|
||||
#undef P
|
||||
|
||||
#define P NBELE::LEPolicy
|
||||
typedef TT_Elf ::Ehdr<P::U32,P::U32,P::U32,P::U16> Elf_LE32_Ehdr;
|
||||
typedef TT_Elf32::Phdr<P::U32,P::U32,P::U32> Elf_LE32_Phdr;
|
||||
typedef TT_Elf32::Shdr<P::U32,P::U32,P::U32> Elf_LE32_Shdr;
|
||||
typedef TT_Elf ::Dyn <P::U32,P::U32> Elf_LE32_Dyn;
|
||||
typedef TT_Elf32::Sym <P::U16,P::U32> Elf_LE32_Sym;
|
||||
#define P N_BELE_CTP::LEPolicy
|
||||
typedef N_Elf ::Ehdr<P::U32,P::U32,P::U32,P::U16> Elf_LE32_Ehdr;
|
||||
typedef N_Elf32::Phdr<P::U32,P::U32,P::U32> Elf_LE32_Phdr;
|
||||
typedef N_Elf32::Shdr<P::U32,P::U32,P::U32> Elf_LE32_Shdr;
|
||||
typedef N_Elf ::Dyn <P::U32,P::U32> Elf_LE32_Dyn;
|
||||
typedef N_Elf32::Sym <P::U16,P::U32> Elf_LE32_Sym;
|
||||
#undef P
|
||||
|
||||
#define P NBELE::HostPolicy
|
||||
typedef TT_Elf ::Ehdr<P::U32,P::U64,P::U64,P::U16> Elf64_Ehdr;
|
||||
typedef TT_Elf64::Phdr<P::U32,P::U64,P::U64,P::U64> Elf64_Phdr;
|
||||
typedef TT_Elf64::Shdr<P::U32,P::U64,P::U64,P::U64> Elf64_Shdr;
|
||||
typedef TT_Elf ::Dyn <P::U64,P::U64> Elf64_Dyn;
|
||||
#define P N_BELE_CTP::HostPolicy
|
||||
typedef N_Elf ::Ehdr<P::U32,P::U64,P::U64,P::U16> Elf64_Ehdr;
|
||||
typedef N_Elf64::Phdr<P::U32,P::U64,P::U64,P::U64> Elf64_Phdr;
|
||||
typedef N_Elf64::Shdr<P::U32,P::U64,P::U64,P::U64> Elf64_Shdr;
|
||||
typedef N_Elf ::Dyn <P::U64,P::U64> Elf64_Dyn;
|
||||
#undef P
|
||||
|
||||
#define P NBELE::BEPolicy
|
||||
typedef TT_Elf ::Ehdr<P::U32,P::U64,P::U64,P::U16> Elf_BE64_Ehdr;
|
||||
typedef TT_Elf64::Phdr<P::U32,P::U64,P::U64,P::U64> Elf_BE64_Phdr;
|
||||
typedef TT_Elf64::Shdr<P::U32,P::U64,P::U64,P::U64> Elf_BE64_Shdr;
|
||||
typedef TT_Elf ::Dyn <P::U64,P::U64> Elf_BE64_Dyn;
|
||||
#define P N_BELE_CTP::BEPolicy
|
||||
typedef N_Elf ::Ehdr<P::U32,P::U64,P::U64,P::U16> Elf_BE64_Ehdr;
|
||||
typedef N_Elf64::Phdr<P::U32,P::U64,P::U64,P::U64> Elf_BE64_Phdr;
|
||||
typedef N_Elf64::Shdr<P::U32,P::U64,P::U64,P::U64> Elf_BE64_Shdr;
|
||||
typedef N_Elf ::Dyn <P::U64,P::U64> Elf_BE64_Dyn;
|
||||
#undef P
|
||||
|
||||
#define P NBELE::LEPolicy
|
||||
typedef TT_Elf ::Ehdr<P::U32,P::U64,P::U64,P::U16> Elf_LE64_Ehdr;
|
||||
typedef TT_Elf64::Phdr<P::U32,P::U64,P::U64,P::U64> Elf_LE64_Phdr;
|
||||
typedef TT_Elf64::Shdr<P::U32,P::U64,P::U64,P::U64> Elf_LE64_Shdr;
|
||||
typedef TT_Elf ::Dyn <P::U64,P::U64> Elf_LE64_Dyn;
|
||||
#define P N_BELE_CTP::LEPolicy
|
||||
typedef N_Elf ::Ehdr<P::U32,P::U64,P::U64,P::U16> Elf_LE64_Ehdr;
|
||||
typedef N_Elf64::Phdr<P::U32,P::U64,P::U64,P::U64> Elf_LE64_Phdr;
|
||||
typedef N_Elf64::Shdr<P::U32,P::U64,P::U64,P::U64> Elf_LE64_Shdr;
|
||||
typedef N_Elf ::Dyn <P::U64,P::U64> Elf_LE64_Dyn;
|
||||
#undef P
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user