Introduce ElfW macro and ELFW to encapsulate the difference between Elf32_* and Elf64_*. Also, introduce ElfW_Rel and SHT_RELX for difference between REL and RELA.

This commit is contained in:
Shinichiro Hamaji
2008-11-30 08:14:07 +09:00
committed by grischka
parent 76b02c2a03
commit 7dd792ef51
3 changed files with 198 additions and 177 deletions

10
elf.h
View File

@ -1630,4 +1630,14 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_C60HI16 0x55 // high 16 bit MVKH embedded
#define R_C60LO16 0x54 // low 16 bit MVKL embedded
#ifdef TCC_TARGET_X86_64
#define TCC_ELFCLASS ELFCLASS64
#define ElfW(type) Elf##64##_##type
#define ELFW(type) ELF##64##_##type
#else
#define TCC_ELFCLASS ELFCLASS32
#define ElfW(type) Elf##32##_##type
#define ELFW(type) ELF##32##_##type
#endif
#endif /* elf.h */