flat assembler
Message board for the users of flat assembler.

Index > Windows > .reloc section

Author
Thread Post new topic Reply to topic
avhohlov



Joined: 26 Jul 2004
Posts: 4
avhohlov 06 Sep 2004, 14:13
PEDEMO.ASM includes empty .reloc section. If I remove it sample still work
Is .reloc section in PE-exe needed or no?
Thanks
Post 06 Sep 2004, 14:13
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 06 Sep 2004, 14:28
it is not needed in standard PE executables, but DLLs need it.
Post 06 Sep 2004, 14:28
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 06 Sep 2004, 14:42
Win32s needs it also for standard PE executables.
Post 06 Sep 2004, 14:42
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 06 Sep 2004, 14:59
anyway, how does this relocation work? does it relocate every used offset?
Post 06 Sep 2004, 14:59
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 08 Sep 2004, 23:50
vid, it relocated "everything that needs to be relocated" - ie, non-eip-relative references to code/data. And the PE is only relocated if the range [imagebase;imagebase+sizeofimage] isn't available when starting the program (which it always is under windows when you have a base address of 0x400000)
Post 08 Sep 2004, 23:50
View user's profile Send private message Visit poster's website Reply with quote
avhohlov



Joined: 26 Jul 2004
Posts: 4
avhohlov 13 Sep 2004, 09:38
2Privalov
I test PE without .reloc in Win32S, it does not work.
(other question, why CreateWindowEx does not work, I can call Message BoxA only, but this is insufficient now)

Second question - why empty .reloc extends EXE-file from 53 to 60Kb?
(PEDEMO extends from 2 to 3 Kb)

And third, PEDEMO includes only second import table, pointer to first table is zero. I use debugger (TD) and disassembler (hiew) and I thiink that it use first table to correct show DLL function calls. I try to set both import table pointers to same location - it work, but is it correct or no?

Thanks
Post 13 Sep 2004, 09:38
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.