Introduce target endianness accessors get_teXX() and set_teXX() in packer.h to

replace all [gs]et_nativeXX() member functions.
This commit is contained in:
Markus F.X.J. Oberhumer
2008-01-09 13:57:47 +01:00
parent 9060ac7897
commit 7f9c47176a
12 changed files with 328 additions and 363 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ PackLinuxI386sh::buildLoader(Filter const *ft)
// filter
optimizeFilter(&fold_ft, buf, sz_fold);
unsigned fold_hdrlen = sizeof(l_info) + sizeof(Elf32_Ehdr) +
sizeof(Elf32_Phdr) * get_native32(&((Elf32_Ehdr const *)(void *)buf)->e_phnum);
sizeof(Elf32_Phdr) * get_te32(&((Elf32_Ehdr const *)(void *)buf)->e_phnum);
if (0 == get_le32(fold_hdrlen + buf)) {
// inconsistent SIZEOF_HEADERS in *.lds (ld, binutils)
fold_hdrlen = umax(0x80, fold_hdrlen);