diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1996-06-20 23:59:08 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1996-06-20 23:59:08 +0000 |
commit | b9110a3c4f394a498400b729b866a2f31b0ab851 (patch) | |
tree | 14c8fb9758734a18fc3a7eb27a7bcdfe0c518f91 /bfd/peicode.h | |
parent | edec3111a27452b101fa566d2f4a0447dedf8132 (diff) | |
download | gdb-b9110a3c4f394a498400b729b866a2f31b0ab851.zip gdb-b9110a3c4f394a498400b729b866a2f31b0ab851.tar.gz gdb-b9110a3c4f394a498400b729b866a2f31b0ab851.tar.bz2 |
* coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
ifdef to COFF_WITH_PE.
(coff_compute_section_file_positions): Likewise.
(coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
* pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
* peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
COFF_IMAGE_WITH_PE, always include.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r-- | bfd/peicode.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h index 213c20c..3a84b23 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -23,7 +23,34 @@ Most of this hacked by Steve Chamberlain, sac@cygnus.com */ - +/* Hey look, some documentation [and in a place you expect to find it]! + + The main reference for the pei format is "Microsoft Portable Executable + and Common Object File Format Specification 4.1". Get it if you need to + do some serious hacking on this code. + + Another reference: + "Peering Inside the PE: A Tour of the Win32 Portable Executable + File Format", MSJ 1994, Volume 9. + + The *sole* difference between the pe format and the pei format is that the + latter has an MSDOS 2.0 .exe header on the front that prints the message + "This app must be run under Windows." (or some such). + (FIXME: Whether that statement is *really* true or not is unknown. + Are there more subtle differences between pe and pei formats? + For now assume there aren't. If you find one, then for God sakes + document it here!) + + The Microsoft docs use the word "image" instead of "executable" because + the former can also refer to a DLL (shared library). Confusion can arise + because the `i' in `pei' also refers to "image". The `pe' format can + also create images (i.e. executables), it's just that to run on a win32 + system you need to use the pei format. + + FIXME: Please add more docs here so the next poor fool that has to hack + on this code has a chance of getting something accomplished without + wasting too much time. +*/ #define coff_bfd_print_private_bfd_data pe_print_private_bfd_data #define coff_mkobject pe_mkobject @@ -1870,8 +1897,6 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd) return true; } -#ifdef COFF_IMAGE_WITH_PE - /* Copy private section data. */ #define coff_bfd_copy_private_section_data pe_bfd_copy_private_section_data @@ -1909,5 +1934,3 @@ pe_bfd_copy_private_section_data (ibfd, isec, obfd, osec) return true; } - -#endif |