Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Relocation Help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Tue Jul 28, 2009 2:24 pm    Post subject: Relocation Help Reply with quote

For assembly, If I were to move a piece of code from one place to another, only 50% of the code might work. That is all the relative jumps. But the not relative values would not be the same. So I was wondering how dlls achieve this change (mapping the values to the correct places) when loading it.

So if I had mov eax,[00401000] and I pasted this somewhere else it would remain the same. But for a relative jump the jump would be relative to where it is.
Back to top
View user's profile Send private message
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Tue Jul 28, 2009 2:49 pm    Post subject: Reply with quote

Dlls use relocations tables (usually loacted in the .reloc section).
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Tue Jul 28, 2009 3:55 pm    Post subject: Reply with quote

If you're looking at this for your own personal project, i'd take a look at this

http://en.wikipedia.org/wiki/Position-independent_code
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites