开发者

Need help using <elf.h>

开发者 https://www.devze.com 2023-03-17 08:04 出处:网络
How do I wrap Elf32_Ehdr and El开发者_运维技巧f64_Ehdr so that on 64 bit architectures Elf64_Ehdr and Elf32_Ehdr on 32 bit ones?#include <stdint.h>

How do I wrap Elf32_Ehdr and El开发者_运维技巧f64_Ehdr so that on 64 bit architectures Elf64_Ehdr and Elf32_Ehdr on 32 bit ones?


#include <stdint.h>
#include <elf.h>
#if UINTPTR_MAX == 0xffffffff
#define Elf_Ehdr Elf32_Ehdr
#define Elf_Phdr Elf32_Phdr
#else
#define Elf_Ehdr Elf64_Ehdr
#define Elf_Phdr Elf64_Phdr
#endif
0

精彩评论

暂无评论...
验证码 换一张
取 消