From 601cd95277beb1043ec9c9de82d9dcc48931e1e6 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Mon, 21 Aug 2006 19:57:43 +0200 Subject: [PATCH] Removed Packer::getIdentstr(). --- src/p_lx_elf.cpp | 12 ------------ src/p_lx_exc.cpp | 4 ---- src/packer.cpp | 2 +- src/packer.h | 1 - 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 03ab715c..4431123e 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -1027,10 +1027,6 @@ PackLinuxElf32::generateElfHdr( h2->ehdr.e_shnum = 0; h2->ehdr.e_shstrndx = 0; -#if 0 //{ - unsigned identsize; - char const *const ident = getIdentstr(&identsize); -#endif //} sz_elf_hdrs = sizeof(*h2) - sizeof(linfo); // default set_native32(&h2->phdr[0].p_filesz, sizeof(*h2)); // + identsize; h2->phdr[0].p_memsz = h2->phdr[0].p_filesz; @@ -1081,10 +1077,6 @@ PackOpenBSDElf32x86::generateElfHdr( h3->ehdr.e_shnum = 0; h3->ehdr.e_shstrndx = 0; -#if 0 //{ - unsigned identsize; - char const *const ident = getIdentstr(&identsize); -#endif //} sz_elf_hdrs = sizeof(*h3) - sizeof(linfo); unsigned const note_offset = sz_elf_hdrs; set_native32(&h3->phdr[0].p_filesz, sizeof(*h3)+sizeof(elfnote)); // + identsize; @@ -1147,10 +1139,6 @@ PackLinuxElf64::generateElfHdr( h2->ehdr.e_shnum = 0; h2->ehdr.e_shstrndx = 0; -#if 0 //{ - unsigned identsize; - char const *const ident = getIdentstr(&identsize); -#endif //} sz_elf_hdrs = sizeof(*h2) - sizeof(linfo); // default set_native64(&h2->phdr[0].p_filesz, sizeof(*h2)); // + identsize; h2->phdr[0].p_memsz = h2->phdr[0].p_filesz; diff --git a/src/p_lx_exc.cpp b/src/p_lx_exc.cpp index 535555bc..315a9de0 100644 --- a/src/p_lx_exc.cpp +++ b/src/p_lx_exc.cpp @@ -136,10 +136,6 @@ PackLinuxI386::generateElfHdr( assert(h2->ehdr.e_phentsize == sizeof(Elf32_Phdr)); assert(h2->ehdr.e_shnum == 0); -#if 0 //{ - unsigned identsize; - char const *const ident = getIdentstr(&identsize); -#endif //} h2->phdr[0].p_filesz = sizeof(*h2); // + identsize; h2->phdr[0].p_memsz = h2->phdr[0].p_filesz; diff --git a/src/packer.cpp b/src/packer.cpp index 85ecb701..28cb46b5 100644 --- a/src/packer.cpp +++ b/src/packer.cpp @@ -986,7 +986,7 @@ int Packer::getLoaderSize() const // loader util **************************************************************************/ -char const *Packer::getIdentstr(unsigned *size, int small) const +static const char *getIdentstr(unsigned *size, int small) { static char identbig[] = "\n\0" diff --git a/src/packer.h b/src/packer.h index 699b5033..d44f1100 100644 --- a/src/packer.h +++ b/src/packer.h @@ -209,7 +209,6 @@ protected: virtual void freezeLoader(); virtual upx_byte *getLoader() const; virtual int getLoaderSize() const; - virtual const char *getIdentstr(unsigned *size, int small=-1) const; virtual void initLoader(const void *pdata, int plen, int small=-1); #if 1 && (ACC_CC_GNUC >= 0x040100) virtual void __acc_cdecl_va addLoader(const char *s, ...) __attribute__((__sentinel__));