File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes General Computing and the fly likes PE file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "PE file" Watch "PE file" New topic

PE file

abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635
A PE file consists of a number of headers and sections that tell the dynamic linker how to map the file into memory

What are headers and sections?
Paul Clapham

Joined: Oct 14, 2005
Posts: 19874

I don't know anything about PE files, never heard of them. However a "header" is some data that appears at or near the beginning of a file. A "section" is a part of a file which can be treated as a unit (sort of like the "sections" you get when you peel an orange).
Stephan van Hulst

Joined: Sep 20, 2010
Posts: 4228

Well, if I'm not mistaken, PE is the file format for windows NT executables. Sections are parts of the file that describe either code or different types of data. Sections have different permissions or attributes associated with them.

The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635

May you explain about "Sections" and "Image info" in this image?
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Looks like you are looking at word.exe. The Image Info describes the header for the EXE file - if you open word.exe with a hex editor you can find the same information in the first X bytes (I used to know what X was, 128? 256? but don't recall). And EXE (and a DLL) file are divided up into various sections into which different things are placed. Things such as the opcodes, text strings and images used by the program.

Go to the MSDN web site, there should be documentation there on how an EXE/DLL file is laid out.

JBoss In Action
I agree. Here's the link:
subject: PE file
It's not a secret anymore!