Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #12547

Re: include

From "Paul" <pchrist<nospam>or@yahoo.co.uk>
Newsgroups comp.lang.c++
Subject Re: include
Date 2011-12-15 17:34 +0000
Organization Netfront http://www.netfront.net/
Message-ID <jcdb36$38m$1@adenine.netfront.net> (permalink)
References (4 earlier) <4ee861b5$0$4379$7b1e8fa0@news.nbl.fi> <jcag6e$2qso$1@adenine.netfront.net> <4ee8e480$0$3089$7b1e8fa0@news.nbl.fi> <jcbfb4$rs3$1@adenine.netfront.net> <4ee9c1f8$0$4349$7b1e8fa0@news.nbl.fi>

Show all headers | View raw


"Juha Nieminen" <nospam@thanks.invalid> wrote in message 
news:4ee9c1f8$0$4349$7b1e8fa0@news.nbl.fi...
> "Paul" <pchrist <nospam>or@yahoo.co.uk> wrote:
>>> http://en.wikipedia.org/w/index.php?title=Portable_Executable&oldid=464930661
>>>
>>>  An exe file cannot be run directly without any modification. An exe
>>> file does not contain pure machine code.
>>
>> Nonsense and exe file is loaded into memory by the program loader, it is 
>> not
>> somehow parsed again by a dynamic linker as you seem to be suggesting.
>
>  So the wikipedia article above is wrong. Care to quote some actual
> technical documentation (eg. from Microsoft) that contradicts the
> wikipedia article?

If the wiki article is saying that PE is loaded with a dynamic loader then 
its probably talking about a DLL. It is certialy not the case that all exe's 
are loaded with a dynamic linker.

I don't really need to post a link to prove you wrong because anyone, who 
has a clue, who reads this knows you are wrong. The only one who needs to go 
looking for links is you because you KNOW you don't know what you are 
talking about.


>
>> MZ is just an old MS-DOS stub and it's part of the format for that 
>> partcular
>> type of exectuable file.
>
>  Ah, so now you finally admit that an exe file contains something else 
> than
> pure machine code.

This is the first time I have discussed the format of a windows PE with you.

>
>> It has nothing to with dynmaic linking, it tells the program loader how 
>> to
>> load the exe into memory.
>
>  The "MZ" id just denotes the file type. However, you happily ignored the
> fact that it's not the only header data that the exe file contains. It
> contains more header data plus relocation data for the dynamic linker.
> This data is used by the dynamic linker to modify base addresses and
> system function call addresses inside the program binary, before it can
> be properly run. If you don't believe me, consult the proper technical
> documentation on exe files.

These other headers are not required to be present. And not all executable 
files are of this format either.

>
>> I never said and exe is pure machine code with no headers
>
>  Ah, you took a third option that I didn't immediately think of, of the
> two I suggested (ie. either check the file format specification for 
> yourself,
> or avoid it and pretend that you are right). In other words: Start lying
> about what you claimed before. But now that I think about it, it's really
> the most natural way of proceeding for you: Pretend that you didn't make
> the original mistake you did. Just start repeating "I never said that"
> enough times and hope that nobody remembers.

What are you blabbering on about here, a load of old bollox as usual.
You initially started spouting that an exe was not machine code in some kind 
of attempt to prove that object code was machine code. I have not 
participated in any discussion with you about the format of a PE or any 
other executable until now.

>
>  Well, at least now you admit that an .exe file is not pure machine code,
> which is something. (Of course you still can't admit having made a 
> mistake.)

No I don't. Most executable files are considered machine code, even if some 
of them contain headers for the program loader.


>
>>, it was you who
>> introduced this PE format into the discussion.
>
>  The .exe files used in Windows *are* in the PE format. And even the
> old DOS .exe files, which were simpler, were not pure machine code either.

Com files are though.

>
>  You claimed that .exe files can be run directly without any modification,
> and that they are "machine code" (which you yourself defined as 
> "containing
> only machine code"). In your definition object files are not "machine 
> code"
> because they contain something else than machine code as well.

exe files can be run directly , they are loaded into memory by the program 
loader directly. The MZ header doesn't change this.
Object files , typically are not machine code as they are not directly 
loaded into memory and need to be linked first.

>
>  Well, big surprise: There isn't that much difference between an object
> file and an exe file: Both contain machine code *and* ancillary data,
> mostly related to rebasing/relocating the code and setting function call
> addresses.

Object files contain object code. It is incorrect to say that an object file 
is machine code just because the text segment contains opcodes.
You can, in  the correct context, say that object files contain machine code 
as the text section notrmally does contain machine specific opcodes. It is 
incorrect however to suggest this file format is the same as an exectuable.
 



--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

include ahso <ahso47@yahoo.com> - 2011-12-13 01:45 -0800
  Re: include Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-13 02:07 -0800
    Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-13 12:44 +0000
      Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 13:47 +0100
        Re: include Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-12-13 18:24 +0000
          Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 19:30 +0100
          Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-13 18:38 +0000
            Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 18:47 +0000
              Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 20:14 +0100
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 19:31 +0000
                Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 21:10 +0100
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:17 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:18 +0000
                Re: include Dombo <dombo@disposable.invalid> - 2011-12-14 19:56 +0100
              Re: include Ian Collins <ian-news@hotmail.com> - 2011-12-14 08:45 +1300
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:03 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:05 +0000
                Re: include Ian Collins <ian-news@hotmail.com> - 2011-12-14 09:12 +1300
              Re: include Tobias Müller <troplin@bluewin.ch> - 2011-12-14 09:31 +0000
            Re: include Goran <goran.pusic@gmail.com> - 2011-12-14 07:06 -0800
              Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 15:35 +0000
                Re: include Goran <goran.pusic@gmail.com> - 2011-12-14 23:19 -0800
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 12:37 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 12:38 +0000
                Re: include Goran <goran.pusic@gmail.com> - 2011-12-15 06:12 -0800
                Re: include Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-17 15:39 -0800
        Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 08:42 +0000
          Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 09:02 +0000
            Re: include jacob navia <jacob@spamsink.net> - 2011-12-14 10:18 +0100
              Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 14:28 +0000
                Re: include jacob navia <jacob@spamsink.net> - 2011-12-14 17:25 +0100
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 17:43 +0000
          Re: include jacob navia <jacob@spamsink.net> - 2011-12-14 10:13 +0100
            Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 09:37 +0000
      Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-13 12:50 +0000
        Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 08:43 +0000
          Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 08:58 +0000
            Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 09:23 +0000
              Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 14:31 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 17:55 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 23:23 +0000
          Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 15:43 +0000
            Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 18:01 +0000
              Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 00:34 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-15 09:46 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 17:34 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 17:58 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 19:56 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 21:08 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 21:36 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 21:43 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 22:23 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 23:16 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 23:30 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 23:38 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 12:00 +0000
                Re: include gwowen <gwowen@gmail.com> - 2011-12-16 04:22 -0800
                Re: include 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-16 07:26 -0800
                Re: include Goran <goran.pusic@gmail.com> - 2011-12-15 23:48 -0800
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 07:59 +0000
                Re: include Goran <goran.pusic@gmail.com> - 2011-12-16 03:56 -0800
                Re: include Goran <goran.pusic@gmail.com> - 2011-12-16 04:04 -0800
                Re: include John Bokma <john@castleamber.com> - 2011-12-16 08:28 -0600
                Re: include Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-17 15:51 -0800
                Re: include gwowen <gwowen@gmail.com> - 2011-12-16 02:11 -0800
                Re: include Goran <goran.pusic@gmail.com> - 2011-12-16 03:59 -0800
                Re: include John Bokma <john@castleamber.com> - 2011-12-16 08:24 -0600
                Re: include Tobias Müller <troplin@bluewin.ch> - 2011-12-16 15:55 +0000
                Re: include "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-12-16 10:11 +0100
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 14:10 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 16:00 +0000
                Re: include "io_x" <a@b.c.invalid> - 2011-12-18 18:07 +0100
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-18 17:11 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 11:49 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 14:04 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 16:19 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 18:37 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-17 07:35 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-17 14:34 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-17 14:47 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-17 19:52 +0000
                Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-17 20:03 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-17 23:11 +0000
                Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-19 10:14 +0000
                Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-19 15:46 +0000

csiph-web