flat assembler
Message board for the users of flat assembler.

Index > Windows > section '.reloc'

Author
Thread Post new topic Reply to topic
eskizo



Joined: 22 Nov 2005
Posts: 59
eskizo
Code:
section '.reloc' fixups data readable discardable     ; needed for Win32s    


Sorry for creating a new thread to ask such simple question, but I can't find the answer anywhere. When do I need to declare this kind of section?
Post 16 Jul 2009, 04:55
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3056
Location: vpcmipstrm
bitRAKE
Primarily only in DLLs, but in general for any executable which might need to be relocated. If the base address (defaults to $400000 for executables) conflict with other loaded resources then windows will attempt to relocate to another base when relocation segment is present. Also, there is a security feature (only in Win7?) to locate programs at a random base - iirc, it also requires a relocation section to work dynamically.
Post 16 Jul 2009, 05:04
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Afaik ASLR was introduced on Vista (although it might have begun in a pre-vista server edition of Windows) - there were some changes for Win7, but I can't remember the details and don't have an URL handy, sorry. To enable ASLR for your executables, I believe you need both the .reloc section as well as some header stuff, here's a short description.
Post 16 Jul 2009, 12:45
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.