home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,938 of 4,675   
   Alexei A. Frounze to firr   
   Re: question about exe (again)   
   19 Aug 17 05:34:23   
   
   From: alexfrunews@nospicedham.gmail.com   
      
   On Saturday, August 19, 2017 at 4:44:51 AM UTC-7, firr wrote:   
   > some times ago it was discussed and i know thet here are probably not much   
   many people knowing that things but maybe some   
   >   
   > if you load exe program into memory it is typically loaded under adress   
   0040_0000 (which is 4 MB skiping from begining)   
   >   
   > header is typically loaded under 0040_0000,   
   > code is typically loaded under 0040_1000, and data is loaded after that (in   
   small hello worlds it will be 0040_2000),   
   > consts after that, static empty ram area is reserved after that, then   
   imports and other sections also somewhere after that   
   >   
   > still i am not sure as to one thing.. in exe   
   > i think you dont necessary need relocations   
   > (or am i wrong?) So this would mean that in   
   > such exe adresses may be fixed (and they in fact would have some values like   
   004x_xxxx and so on (may be obviously bigger but in small exe this kind of   
   values))   
   >   
   > is this really the case? no relocations and this kind of fixed values there?   
      
   Yep. 32-bit Windows/PE and Linux/ELF executables work   
   without relocations.   
      
   >  if realocations are   
   present are   
   > they only a list of adresses in ram where you need to add "base adress" of   
   image (as i heard) or yet something other to that?>   
      
   In a nutshell, yes.   
      
   Alex   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca