~ubuntu-branches/debian/sid/upx-ucl/sid

« back to all changes in this revision

Viewing changes to src/packer.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2009-09-20 21:34:57 UTC
  • mfrom: (1.2.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090920213457-x95n0rq823lx12sw
Tags: 3.03-3
* Upload to unstable.
* Standards-Version: 3.8.3 (no changes).
* Build with debhelper v7.
* rules: call dh_prep instead of `dh_clean -k'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
   This file is part of the UPX executable compressor.
4
4
 
5
 
   Copyright (C) 1996-2007 Markus Franz Xaver Johannes Oberhumer
6
 
   Copyright (C) 1996-2007 Laszlo Molnar
 
5
   Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer
 
6
   Copyright (C) 1996-2008 Laszlo Molnar
7
7
   All Rights Reserved.
8
8
 
9
9
   UPX and the UCL library are free software; you can redistribute them
21
21
   If not, write to the Free Software Foundation, Inc.,
22
22
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
23
 
24
 
   Markus F.X.J. Oberhumer   Laszlo Molnar
25
 
   markus@oberhumer.com      ml1050@users.sourceforge.net
 
24
   Markus F.X.J. Oberhumer              Laszlo Molnar
 
25
   <markus@oberhumer.com>               <ml1050@users.sourceforge.net>
26
26
 */
27
27
 
28
28
 
240
240
#else
241
241
    void __acc_cdecl_va addLoaderVA(const char *s, ...);
242
242
#endif
 
243
    virtual bool hasLoaderSection(const char *name) const;
243
244
    virtual int getLoaderSection(const char *name, int *slen=NULL) const;
244
245
    virtual int getLoaderSectionStart(const char *name, int *slen=NULL) const;
245
246
 
283
284
    static upx_byte *optimizeReloc32(upx_byte *in,unsigned relocnum,upx_byte *out,upx_byte *image,int bs,int *big);
284
285
    static unsigned unoptimizeReloc32(upx_byte **in,upx_byte *image,MemBuffer *out,int bs);
285
286
 
 
287
    // target endianness abstraction
 
288
    unsigned get_te16(const void *p)        const { return bele->get16(p); }
 
289
    unsigned get_te32(const void *p)        const { return bele->get32(p); }
 
290
    acc_uint64l_t get_te64(const void *p)   const { return bele->get64(p); }
 
291
    void set_te16(void *p, unsigned v)      const { bele->set16(p, v); }
 
292
    void set_te32(void *p, unsigned v)      const { bele->set32(p, v); }
 
293
    void set_te64(void *p, acc_uint64l_t v) const { bele->set64(p, v); }
 
294
 
286
295
protected:
287
 
    const N_BELE_RTP::AbstractPolicy *bele;
 
296
    const N_BELE_RTP::AbstractPolicy *bele; // target endianness
288
297
    InputFile *fi;
289
298
    off_t file_size;        // will get set by constructor
290
299
    PackHeader ph;          // must be filled by canUnpack()