1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

src: cleanup MAX_ELF_HDR

This commit is contained in:
Markus F.X.J. Oberhumer 2023-04-19 23:23:46 +02:00
parent d1ab85a1a6
commit b1729e3bcf
3 changed files with 4 additions and 4 deletions

View File

@ -1,2 +0,0 @@
static unsigned const MAX_ELF_HDR_32(512);
static unsigned const MAX_ELF_HDR_64(1024);

View File

@ -83,7 +83,7 @@ int upx_doctest_check() { return upx_doctest_check(0, nullptr); }
// compile-time checks
**************************************************************************/
// need extra paranthesis because the C preprocessor does not understand C++ templates
// need extra parenthesis because the C preprocessor does not understand C++ templates
ACC_COMPILE_TIME_ASSERT_HEADER((std::is_same<short, upx_int16_t>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((std::is_same<unsigned short, upx_uint16_t>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((std::is_same<int, upx_int32_t>::value))

View File

@ -52,7 +52,9 @@
#define PT_GNU_RELRO32 Elf32_Phdr::PT_GNU_RELRO
#define PT_GNU_RELRO64 Elf64_Phdr::PT_GNU_RELRO
#include "MAX_ELF_HDR.h"
// also see stub/src/MAX_ELF_HDR.[Sc]
static constexpr unsigned MAX_ELF_HDR_32 = 512;
static constexpr unsigned MAX_ELF_HDR_64 = 1024;
//static unsigned const EF_ARM_HASENTRY = 0x02;
static unsigned const EF_ARM_EABI_VER4 = 0x04000000;