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

« back to all changes in this revision

Viewing changes to src/pefile.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2009-10-16 12:56:47 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20091016125647-vity1npel2qsmr9c
Tags: 3.04-1
* New upstream release:
  + FTBFS with gcc 4.4 fixed by upstream (closes: #548566).
* p_mach.cpp: Fix from upstream vcs: mach/fat needs seek() 
  after set_extent().

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-2008 Markus Franz Xaver Johannes Oberhumer
6
 
   Copyright (C) 1996-2008 Laszlo Molnar
 
5
   Copyright (C) 1996-2009 Markus Franz Xaver Johannes Oberhumer
 
6
   Copyright (C) 1996-2009 Laszlo Molnar
7
7
   All Rights Reserved.
8
8
 
9
9
   UPX and the UCL library are free software; you can redistribute them
106
106
    unsigned crelocs;               // rva of preprocessed fixups
107
107
    int big_relocs;
108
108
 
109
 
    struct pe_header_t
110
 
    {
 
109
    __packed_struct(pe_header_t)
111
110
        // 0x0
112
111
        char    _[4];               // pemagic
113
112
        LE16    cpu;
142
141
        // 0x74
143
142
        LE32    ddirsentries;       // usually 16
144
143
 
145
 
        struct ddirs_t
146
 
        {
 
144
        __packed_struct(ddirs_t)
147
145
            LE32    vaddr;
148
146
            LE32    size;
149
 
        }
150
 
        __attribute_packed;
151
 
 
152
 
        struct ddirs_t ddirs[16];
153
 
    }
154
 
    __attribute_packed;
155
 
 
156
 
    struct pe_section_t
157
 
    {
 
147
        __packed_struct_end()
 
148
 
 
149
        ddirs_t ddirs[16];
 
150
    __packed_struct_end()
 
151
 
 
152
    __packed_struct(pe_section_t)
158
153
        char    name[8];
159
154
        LE32    vsize;
160
155
        LE32    vaddr;
162
157
        LE32    rawdataptr;
163
158
        char    _[12];
164
159
        LE32    flags;
165
 
    }
166
 
    __attribute_packed;
 
160
    __packed_struct_end()
167
161
 
168
162
    pe_header_t ih, oh;
169
163
    pe_section_t *isection;
333
327
 
334
328
    class Export : private noncopyable
335
329
    {
336
 
        struct export_dir_t
337
 
        {
 
330
        __packed_struct(export_dir_t)
338
331
            char  _[12]; // flags, timedate, version
339
332
            LE32  name;
340
333
            char  __[4]; // ordinal base
343
336
            LE32  addrtable;
344
337
            LE32  nameptrtable;
345
338
            LE32  ordinaltable;
346
 
        }
347
 
        __attribute_packed;
 
339
        __packed_struct_end()
348
340
 
349
341
        export_dir_t edir;
350
342
        char  *ename;