1999-09-12 01:37:28 +02:00
|
|
|
/* Support for the generic parts of PE/PEI; common header information.
|
2003-04-03 13:13:27 +02:00
|
|
|
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
2001-03-08 22:04:02 +01:00
|
|
|
Free Software Foundation, Inc.
|
1999-09-12 01:37:28 +02:00
|
|
|
Written by Cygnus Solutions.
|
|
|
|
|
2003-04-03 13:13:27 +02:00
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2003-04-03 13:13:27 +02:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2003-04-03 13:13:27 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2003-04-03 13:13:27 +02:00
|
|
|
/* Most of this hacked by Steve Chamberlain,
|
1999-09-12 01:37:28 +02:00
|
|
|
sac@cygnus.com
|
|
|
|
|
2003-04-03 13:13:27 +02:00
|
|
|
PE/PEI rearrangement (and code added): Donn Terry
|
|
|
|
Softway Systems, Inc. */
|
1999-09-12 01:37:28 +02:00
|
|
|
|
|
|
|
/* 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
|
2003-04-03 13:13:27 +02:00
|
|
|
wasting too much time. */
|
1999-09-12 01:37:28 +02:00
|
|
|
|
|
|
|
#ifndef GET_FCN_LNNOPTR
|
|
|
|
#define GET_FCN_LNNOPTR(abfd, ext) \
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef GET_FCN_ENDNDX
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_FCN_ENDNDX(abfd, ext) \
|
|
|
|
H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_endndx)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PUT_FCN_LNNOPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_FCN_LNNOPTR(abfd, in, ext) \
|
|
|
|
H_PUT_32(abfd, in, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_FCN_ENDNDX
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_FCN_ENDNDX(abfd, in, ext) \
|
|
|
|
H_PUT_32(abfd, in, ext->x_sym.x_fcnary.x_fcn.x_endndx)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_LNSZ_LNNO
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_LNSZ_LNNO(abfd, ext) \
|
|
|
|
H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_LNSZ_SIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_LNSZ_SIZE(abfd, ext) \
|
|
|
|
H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_LNSZ_LNNO
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_LNSZ_LNNO(abfd, in, ext) \
|
|
|
|
H_PUT_16(abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_LNSZ_SIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_LNSZ_SIZE(abfd, in, ext) \
|
|
|
|
H_PUT_16(abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCN_SCNLEN
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCN_SCNLEN(abfd, ext) \
|
|
|
|
H_GET_32 (abfd, ext->x_scn.x_scnlen)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCN_NRELOC
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCN_NRELOC(abfd, ext) \
|
|
|
|
H_GET_16 (abfd, ext->x_scn.x_nreloc)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCN_NLINNO
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCN_NLINNO(abfd, ext) \
|
|
|
|
H_GET_16 (abfd, ext->x_scn.x_nlinno)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCN_SCNLEN
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCN_SCNLEN(abfd, in, ext) \
|
|
|
|
H_PUT_32(abfd, in, ext->x_scn.x_scnlen)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCN_NRELOC
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCN_NRELOC(abfd, in, ext) \
|
|
|
|
H_PUT_16(abfd, in, ext->x_scn.x_nreloc)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCN_NLINNO
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCN_NLINNO(abfd, in, ext) \
|
|
|
|
H_PUT_16(abfd,in, ext->x_scn.x_nlinno)
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_LINENO_LNNO
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_LINENO_LNNO(abfd, ext) \
|
|
|
|
H_GET_16 (abfd, ext->l_lnno);
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_LINENO_LNNO
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_LINENO_LNNO(abfd, val, ext) \
|
|
|
|
H_PUT_16(abfd,val, ext->l_lnno);
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The f_symptr field in the filehdr is sometimes 64 bits. */
|
|
|
|
#ifndef GET_FILEHDR_SYMPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_FILEHDR_SYMPTR H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_FILEHDR_SYMPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_FILEHDR_SYMPTR H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Some fields in the aouthdr are sometimes 64 bits. */
|
|
|
|
#ifndef GET_AOUTHDR_TSIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_AOUTHDR_TSIZE H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_AOUTHDR_TSIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_AOUTHDR_TSIZE H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_AOUTHDR_DSIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_AOUTHDR_DSIZE H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_AOUTHDR_DSIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_AOUTHDR_DSIZE H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_AOUTHDR_BSIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_AOUTHDR_BSIZE H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_AOUTHDR_BSIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_AOUTHDR_BSIZE H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_AOUTHDR_ENTRY
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_AOUTHDR_ENTRY H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_AOUTHDR_ENTRY
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_AOUTHDR_ENTRY H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_AOUTHDR_TEXT_START
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_AOUTHDR_TEXT_START H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_AOUTHDR_TEXT_START
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_AOUTHDR_TEXT_START H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_AOUTHDR_DATA_START
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_AOUTHDR_DATA_START H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_AOUTHDR_DATA_START
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_AOUTHDR_DATA_START H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Some fields in the scnhdr are sometimes 64 bits. */
|
|
|
|
#ifndef GET_SCNHDR_PADDR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCNHDR_PADDR H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCNHDR_PADDR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCNHDR_PADDR H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCNHDR_VADDR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCNHDR_VADDR H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCNHDR_VADDR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCNHDR_VADDR H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCNHDR_SIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCNHDR_SIZE H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCNHDR_SIZE
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCNHDR_SIZE H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCNHDR_SCNPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCNHDR_SCNPTR H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCNHDR_SCNPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCNHDR_SCNPTR H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCNHDR_RELPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCNHDR_RELPTR H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCNHDR_RELPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCNHDR_RELPTR H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef GET_SCNHDR_LNNOPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_SCNHDR_LNNOPTR H_GET_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef PUT_SCNHDR_LNNOPTR
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define PUT_SCNHDR_LNNOPTR H_PUT_32
|
1999-09-12 01:37:28 +02:00
|
|
|
#endif
|
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
#ifdef COFF_WITH_pep
|
2000-04-18 06:03:16 +02:00
|
|
|
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_OPTHDR_IMAGE_BASE H_GET_64
|
|
|
|
#define PUT_OPTHDR_IMAGE_BASE H_PUT_64
|
|
|
|
#define GET_OPTHDR_SIZE_OF_STACK_RESERVE H_GET_64
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_STACK_RESERVE H_PUT_64
|
|
|
|
#define GET_OPTHDR_SIZE_OF_STACK_COMMIT H_GET_64
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_STACK_COMMIT H_PUT_64
|
|
|
|
#define GET_OPTHDR_SIZE_OF_HEAP_RESERVE H_GET_64
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_HEAP_RESERVE H_PUT_64
|
|
|
|
#define GET_OPTHDR_SIZE_OF_HEAP_COMMIT H_GET_64
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT H_PUT_64
|
2000-04-18 06:03:16 +02:00
|
|
|
#define GET_PDATA_ENTRY bfd_get_64
|
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
#define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pep_bfd_copy_private_bfd_data_common
|
|
|
|
#define _bfd_XX_bfd_copy_private_section_data _bfd_pep_bfd_copy_private_section_data
|
|
|
|
#define _bfd_XX_get_symbol_info _bfd_pep_get_symbol_info
|
|
|
|
#define _bfd_XX_only_swap_filehdr_out _bfd_pep_only_swap_filehdr_out
|
|
|
|
#define _bfd_XX_print_private_bfd_data_common _bfd_pep_print_private_bfd_data_common
|
|
|
|
#define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript
|
|
|
|
#define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript
|
|
|
|
#define _bfd_XXi_only_swap_filehdr_out _bfd_pepi_only_swap_filehdr_out
|
|
|
|
#define _bfd_XXi_swap_aouthdr_in _bfd_pepi_swap_aouthdr_in
|
|
|
|
#define _bfd_XXi_swap_aouthdr_out _bfd_pepi_swap_aouthdr_out
|
|
|
|
#define _bfd_XXi_swap_aux_in _bfd_pepi_swap_aux_in
|
|
|
|
#define _bfd_XXi_swap_aux_out _bfd_pepi_swap_aux_out
|
|
|
|
#define _bfd_XXi_swap_lineno_in _bfd_pepi_swap_lineno_in
|
|
|
|
#define _bfd_XXi_swap_lineno_out _bfd_pepi_swap_lineno_out
|
|
|
|
#define _bfd_XXi_swap_scnhdr_out _bfd_pepi_swap_scnhdr_out
|
|
|
|
#define _bfd_XXi_swap_sym_in _bfd_pepi_swap_sym_in
|
|
|
|
#define _bfd_XXi_swap_sym_out _bfd_pepi_swap_sym_out
|
|
|
|
|
|
|
|
#else /* !COFF_WITH_pep */
|
2000-04-18 06:03:16 +02:00
|
|
|
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 11:57:26 +02:00
|
|
|
#define GET_OPTHDR_IMAGE_BASE H_GET_32
|
|
|
|
#define PUT_OPTHDR_IMAGE_BASE H_PUT_32
|
|
|
|
#define GET_OPTHDR_SIZE_OF_STACK_RESERVE H_GET_32
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_STACK_RESERVE H_PUT_32
|
|
|
|
#define GET_OPTHDR_SIZE_OF_STACK_COMMIT H_GET_32
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_STACK_COMMIT H_PUT_32
|
|
|
|
#define GET_OPTHDR_SIZE_OF_HEAP_RESERVE H_GET_32
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_HEAP_RESERVE H_PUT_32
|
|
|
|
#define GET_OPTHDR_SIZE_OF_HEAP_COMMIT H_GET_32
|
|
|
|
#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT H_PUT_32
|
2000-04-18 06:03:16 +02:00
|
|
|
#define GET_PDATA_ENTRY bfd_get_32
|
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
#define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pe_bfd_copy_private_bfd_data_common
|
|
|
|
#define _bfd_XX_bfd_copy_private_section_data _bfd_pe_bfd_copy_private_section_data
|
|
|
|
#define _bfd_XX_get_symbol_info _bfd_pe_get_symbol_info
|
|
|
|
#define _bfd_XX_only_swap_filehdr_out _bfd_pe_only_swap_filehdr_out
|
|
|
|
#define _bfd_XX_print_private_bfd_data_common _bfd_pe_print_private_bfd_data_common
|
|
|
|
#define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript
|
|
|
|
#define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript
|
|
|
|
#define _bfd_XXi_only_swap_filehdr_out _bfd_pei_only_swap_filehdr_out
|
|
|
|
#define _bfd_XXi_swap_aouthdr_in _bfd_pei_swap_aouthdr_in
|
|
|
|
#define _bfd_XXi_swap_aouthdr_out _bfd_pei_swap_aouthdr_out
|
|
|
|
#define _bfd_XXi_swap_aux_in _bfd_pei_swap_aux_in
|
|
|
|
#define _bfd_XXi_swap_aux_out _bfd_pei_swap_aux_out
|
|
|
|
#define _bfd_XXi_swap_lineno_in _bfd_pei_swap_lineno_in
|
|
|
|
#define _bfd_XXi_swap_lineno_out _bfd_pei_swap_lineno_out
|
|
|
|
#define _bfd_XXi_swap_scnhdr_out _bfd_pei_swap_scnhdr_out
|
|
|
|
#define _bfd_XXi_swap_sym_in _bfd_pei_swap_sym_in
|
|
|
|
#define _bfd_XXi_swap_sym_out _bfd_pei_swap_sym_out
|
|
|
|
|
|
|
|
#endif /* !COFF_WITH_pep */
|
2000-04-18 06:03:16 +02:00
|
|
|
|
1999-09-12 01:37:28 +02:00
|
|
|
/* These functions are architecture dependent, and are in peicode.h:
|
|
|
|
coff_swap_reloc_in
|
|
|
|
int coff_swap_reloc_out
|
|
|
|
coff_swap_filehdr_in
|
|
|
|
coff_swap_scnhdr_in
|
|
|
|
pe_mkobject
|
|
|
|
pe_mkobject_hook */
|
|
|
|
|
|
|
|
/* The functions described below are common across all PE/PEI
|
|
|
|
implementations architecture types, and actually appear in
|
|
|
|
peigen.c. */
|
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
void _bfd_XXi_swap_sym_in PARAMS ((bfd*, PTR, PTR));
|
|
|
|
#define coff_swap_sym_in _bfd_XXi_swap_sym_in
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
unsigned int _bfd_XXi_swap_sym_out PARAMS ((bfd*, PTR, PTR));
|
|
|
|
#define coff_swap_sym_out _bfd_XXi_swap_sym_out
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
void _bfd_XXi_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR));
|
|
|
|
#define coff_swap_aux_in _bfd_XXi_swap_aux_in
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
unsigned int _bfd_XXi_swap_aux_out \
|
1999-09-12 01:37:28 +02:00
|
|
|
PARAMS ((bfd *, PTR, int, int, int, int, PTR));
|
2001-02-13 20:23:08 +01:00
|
|
|
#define coff_swap_aux_out _bfd_XXi_swap_aux_out
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
void _bfd_XXi_swap_lineno_in PARAMS ((bfd*, PTR, PTR));
|
|
|
|
#define coff_swap_lineno_in _bfd_XXi_swap_lineno_in
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
unsigned int _bfd_XXi_swap_lineno_out PARAMS ((bfd*, PTR, PTR));
|
|
|
|
#define coff_swap_lineno_out _bfd_XXi_swap_lineno_out
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
void _bfd_XXi_swap_aouthdr_in PARAMS ((bfd*, PTR, PTR));
|
|
|
|
#define coff_swap_aouthdr_in _bfd_XXi_swap_aouthdr_in
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
unsigned int _bfd_XXi_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
|
|
|
|
#define coff_swap_aouthdr_out _bfd_XXi_swap_aouthdr_out
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
unsigned int _bfd_XXi_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR));
|
|
|
|
#define coff_swap_scnhdr_out _bfd_XXi_swap_scnhdr_out
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2002-11-30 09:39:46 +01:00
|
|
|
bfd_boolean _bfd_XX_print_private_bfd_data_common PARAMS ((bfd *, PTR));
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2002-11-30 09:39:46 +01:00
|
|
|
bfd_boolean _bfd_XX_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *));
|
1999-09-12 02:02:11 +02:00
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
void _bfd_XX_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
|
1999-09-12 01:37:28 +02:00
|
|
|
|
2002-11-30 09:39:46 +01:00
|
|
|
bfd_boolean _bfd_XXi_final_link_postscript
|
1999-09-12 02:45:26 +02:00
|
|
|
PARAMS ((bfd *, struct coff_final_link_info *));
|
|
|
|
|
2000-02-28 19:56:11 +01:00
|
|
|
#ifndef coff_final_link_postscript
|
2001-02-13 20:23:08 +01:00
|
|
|
#define coff_final_link_postscript _bfd_XXi_final_link_postscript
|
2000-02-28 19:56:11 +01:00
|
|
|
#endif
|
1999-09-12 01:37:28 +02:00
|
|
|
/* The following are needed only for ONE of pe or pei, but don't
|
|
|
|
otherwise vary; peicode.h fixes up ifdefs but we provide the
|
|
|
|
prototype. */
|
|
|
|
|
2001-02-13 20:23:08 +01:00
|
|
|
unsigned int _bfd_XX_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
|
|
|
|
unsigned int _bfd_XXi_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
|
2002-11-30 09:39:46 +01:00
|
|
|
bfd_boolean _bfd_XX_bfd_copy_private_section_data
|
1999-09-12 01:37:28 +02:00
|
|
|
PARAMS ((bfd *, asection *, bfd *, asection *));
|
2003-04-03 13:13:27 +02:00
|
|
|
|
|
|
|
/* Macro: Returns true if the bfd is a PE executable as opposed to a PE object file. */
|
2003-08-18 20:26:56 +02:00
|
|
|
#define bfd_pe_executable_p(abfd) \
|
|
|
|
(strncmp ((abfd)->xvec->name, "pei-", 4) == 0 \
|
|
|
|
|| strncmp ((abfd)->xvec->name, "efi-app-", 8) == 0)
|