class DelayAddressChunk : public Chunk {
public:
explicit DelayAddressChunk(Chunk *C) : Thunk(C) {}
- size_t getSize() const override { return 8; }
+ size_t getSize() const override { return ptrSize(); }
void writeTo(uint8_t *Buf) override {
- write64le(Buf + FileOff, Thunk->getRVA() + Config->ImageBase);
+ if (Config->is64()) {
+ write64le(Buf + FileOff, Thunk->getRVA() + Config->ImageBase);
+ } else {
+ write32le(Buf + FileOff, Thunk->getRVA() + Config->ImageBase);
+ }
}
void getBaserels(std::vector<Baserel> *Res) override {
IMPORT-NEXT: }
IMPORT-NEXT: Import {
IMPORT-NEXT: Symbol: MessageBoxA (0)
-IMPORT-NEXT: Address: 0x0
+IMPORT-NEXT: Address: 0x40203E
IMPORT-NEXT: }
IMPORT-NEXT: }
BASEREL-NEXT: }
BASEREL-NEXT: Entry {
BASEREL-NEXT: Type: HIGHLOW
-BASEREL-NEXT: Address: 0x1028
+BASEREL-NEXT: Address: 0x1024
BASEREL-NEXT: }
BASEREL-NEXT: Entry {
BASEREL-NEXT: Type: HIGHLOW
DISASM-NEXT: 203c: ff e0 jmpl *%eax
DISASM-NEXT: 203e: 51 pushl %ecx
DISASM-NEXT: 203f: 52 pushl %edx
-DISASM-NEXT: 2040: 68 28 10 40 00 pushl $4198440
+DISASM-NEXT: 2040: 68 24 10 40 00 pushl $4198436
DISASM-NEXT: 2045: 68 00 30 40 00 pushl $4206592
DISASM-NEXT: 204a: e8 b1 ff ff ff calll -79 <_main@0>
DISASM-NEXT: 204f: 5a popl %edx