Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #7981
| Subject | Re: question about exe (again) |
|---|---|
| Newsgroups | comp.programming |
| References | <ae5e1307-b87e-4a1b-a6bd-6123a54e411a@googlegroups.com> |
| From | Richard Damon <Richard@Damon-Family.org> |
| Message-ID | <PZ_lB.1069$xN2.298@fx44.iad> (permalink) |
| Organization | Forte - www.forteinc.com |
| Date | 2017-08-19 13:57 -0400 |
On 8/19/17 7:36 AM, fir 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? > > > <yet maybe second a bit more hard of this question -> 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?> > > tnx > My understanding is that the exe file (like DLLs) is relocatable, but specifies a preferred address. I believe that if loaded at the preferred address, than one advantage is that the loader doesn't need to do most of the relocation fixups. The system has the option to load the program at a different address if it wants (and there are some security benefits to randomizing the load address), unless the file is specifically marked as non-relocatable.
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
question about exe (again) fir <profesor.fir@gmail.com> - 2017-08-19 04:36 -0700
Re: question about exe (again) Richard Damon <Richard@Damon-Family.org> - 2017-08-19 13:57 -0400
Re: question about exe (again) fir <profesor.fir@gmail.com> - 2017-08-19 11:06 -0700
Re: question about exe (again) Robert Wessel <robertwessel2@yahoo.com> - 2017-08-22 01:00 -0500
csiph-web