+2006-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_backend_data): Add bfd_link_info pointer
+ parameter.
+ (_bfd_elf_sizeof_headers): Replace bfd_boolean param with
+ bfd_link_info pointer.
+ * targets.c (struct bfd_target <_bfd_sizeof_headers>): Likewise.
+ * bfd.c (bfd_sizeof_headers): Tweak param name.
+ * aout-adobe.c (aout_adobe_sizeof_headers): Adjust.
+ * aoutx.h (NAME (aout, sizeof_headers)): Adjust.
+ * binary.c (binary_sizeof_headers): Adjust.
+ * bout.c (b_out_sizeof_headers): Adjust.
+ * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust.
+ * coff64-rs6000.c (xcoff64_sizeof_headers): Adjust.
+ * coffgen.c (coff_sizeof_headers): Adjust.
+ * ecoff.c (_bfd_ecoff_sizeof_headers): Adjust.
+ (ecoff_compute_section_file_positions): Adjust.
+ (_bfd_ecoff_write_object_contents): Adjust.
+ * elf.c (get_program_header_size, _bfd_elf_sizeof_headers): Adjust.
+ * elf32-arm.c (elf32_arm_additional_program_headers): Adjust.
+ * elf32-i370.c (elf_backend_additional_program_headers): Adjust.
+ * elf32-ppc.c (ppc_elf_additional_program_headers): Adjust.
+ * elf64-hppa.c (elf64_hppa_additional_program_headers): Adjust.
+ * elf64-x86-64.c (elf64_x86_64_additional_program_headers): Adjust.
+ * elfxx-ia64.c (elfNN_ia64_additional_program_headers): Adjust.
+ * elfxx-mips.c (_bfd_mips_elf_additional_program_headers): Adjust.
+ * elfxx-mips.h (_bfd_mips_elf_additional_program_headers): Adjust.
+ * i386msdos.c: Convert to ISO C.
+ (msdos_sizeof_headers): Adjust.
+ * i386os9k.c: Convert to ISO C.
+ (os9k_sizeof_headers): Adjust.
+ * ieee.c (ieee_sizeof_headers): Adjust.
+ * ihex.c (ihex_sizeof_headers): Adjust.
+ * libaout.h (NAME (aout, sizeof_headers)): Adjust.
+ * libbfd-in.h (_bfd_nolink_sizeof_headers): Adjust.
+ * libcoff-in.h (coff_sizeof_headers): Adjust.
+ * libecoff.h (_bfd_ecoff_sizeof_headers): Adjust.
+ * mach-o.c (bfd_mach_o_sizeof_headers): Adjust.
+ * mmo.c (mmo_sizeof_headers): Adjust.
+ * oasys.c (oasys_sizeof_headers): Adjust.
+ * pdp11.c (NAME (aout, sizeof_headers)): Adjust.
+ * pef.c (bfd_pef_sizeof_headers): Adjust.
+ * ppcboot.c (ppcboot_sizeof_headers): Adjust.
+ * som.c (som_sizeof_headers): Adjust.
+ * srec.c (srec_sizeof_headers): Adjust.
+ * tekhex.c (tekhex_sizeof_headers): Adjust.
+ * versados.c (versados_sizeof_headers): Adjust.
+ * vms.c (vms_sizeof_headers): Adjust.
+ * xcoff-target.h (_bfd_xcoff_sizeof_headers): Adjust.
+ * xsym.c (bfd_sym_sizeof_headers): Adjust.
+ * xsym.h (bfd_sym_sizeof_headers): Adjust.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+
2006-06-15 Mark Shinwell <shinwell@codesourcery.com>
* bfd-in2.h: Regenerate.
static int
aout_adobe_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED,
- bfd_boolean ignore ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return sizeof (struct internal_exec);
}
}
int
-NAME (aout, sizeof_headers) (bfd *abfd, bfd_boolean execable ATTRIBUTE_UNUSED)
+NAME (aout, sizeof_headers) (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return adata (abfd).exec_bytes_size;
}
#define bfd_set_private_flags(abfd, flags) \
BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, reloc) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
+#define bfd_sizeof_headers(abfd, info) \
+ BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
BFD_SEND (abfd, _bfd_find_nearest_line, \
NAME##_bfd_discard_group, \
NAME##_section_already_linked \
- int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
+ int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
bfd_byte * (*_bfd_get_relocated_section_contents)
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, struct bfd_symbol **);
DESCRIPTION
The following functions exist but have not yet been documented.
-.#define bfd_sizeof_headers(abfd, reloc) \
-. BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
+.#define bfd_sizeof_headers(abfd, info) \
+. BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
.
.#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
. BFD_SEND (abfd, _bfd_find_nearest_line, \
static int
binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
/* BFD back-end for Intel 960 b.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
}
static int
-b_out_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED, bfd_boolean ignore ATTRIBUTE_UNUSED)
+b_out_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return sizeof (struct external_exec);
}
extern bfd_boolean _bfd_xcoff_write_archive_contents
PARAMS ((bfd *));
extern int _bfd_xcoff_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ PARAMS ((bfd *, struct bfd_link_info *));
extern void _bfd_xcoff_swap_sym_in
PARAMS ((bfd *, PTR, PTR));
extern unsigned int _bfd_xcoff_swap_sym_out
always uses an a.out header. */
int
-_bfd_xcoff_sizeof_headers (abfd, reloc)
- bfd *abfd;
- bfd_boolean reloc ATTRIBUTE_UNUSED;
+_bfd_xcoff_sizeof_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
int size;
/* BFD back-end for IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written Clinton Popetz.
Contributed by Cygnus Support.
extern bfd_boolean _bfd_xcoff_write_archive_contents
PARAMS ((bfd *));
extern int _bfd_xcoff_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ PARAMS ((bfd *, struct bfd_link_info *));
extern void _bfd_xcoff_swap_sym_in
PARAMS ((bfd *, PTR, PTR));
extern unsigned int _bfd_xcoff_swap_sym_out
static bfd *xcoff64_openr_next_archived_file
PARAMS ((bfd *, bfd *));
static int xcoff64_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ PARAMS ((bfd *, struct bfd_link_info *));
static asection *xcoff64_create_csect_from_smclas
PARAMS ((bfd *, union internal_auxent *, const char *));
static bfd_boolean xcoff64_is_lineno_count_overflow
always uses an a.out header. */
static int
-xcoff64_sizeof_headers (abfd, reloc)
- bfd *abfd;
- bfd_boolean reloc ATTRIBUTE_UNUSED;
+xcoff64_sizeof_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
int size;
}
int
-coff_sizeof_headers (bfd *abfd, bfd_boolean reloc)
+coff_sizeof_headers (bfd *abfd, struct bfd_link_info *info)
{
size_t size;
- if (! reloc)
+ if (!info->relocatable)
size = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd);
else
size = bfd_coff_filhsz (abfd);
/* Get the size of the section headers. */
int
-_bfd_ecoff_sizeof_headers (bfd *abfd, bfd_boolean reloc ATTRIBUTE_UNUSED)
+_bfd_ecoff_sizeof_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *current;
int c;
const bfd_vma round = ecoff_backend (abfd)->round;
bfd_size_type amt;
- sofar = _bfd_ecoff_sizeof_headers (abfd, FALSE);
+ sofar = _bfd_ecoff_sizeof_headers (abfd, NULL);
file_sofar = sofar;
/* Sort the sections by VMA. */
}
if ((abfd->flags & D_PAGED) != 0)
- text_size = _bfd_ecoff_sizeof_headers (abfd, FALSE);
+ text_size = _bfd_ecoff_sizeof_headers (abfd, NULL);
else
text_size = 0;
text_start = 0;
return the number of additional program segments which this BFD
will need. It should return -1 on error. */
int (*elf_backend_additional_program_headers)
- (bfd *);
+ (bfd *, struct bfd_link_info *);
/* This function is called to modify an existing segment map in a
backend specific fashion. */
#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
extern int _bfd_elf_sizeof_headers
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_new_section_hook
(bfd *, asection *);
extern bfd_boolean _bfd_elf_init_reloc_shdr
will be two segments. */
static bfd_size_type
-get_program_header_size (bfd *abfd)
+get_program_header_size (bfd *abfd, struct bfd_link_info *info)
{
size_t segs;
asection *s;
{
int a;
- a = (*bed->elf_backend_additional_program_headers) (abfd);
+ a = (*bed->elf_backend_additional_program_headers) (abfd, info);
if (a == -1)
abort ();
segs += a;
}
int
-_bfd_elf_sizeof_headers (bfd *abfd, bfd_boolean reloc)
+_bfd_elf_sizeof_headers (bfd *abfd, struct bfd_link_info *info)
{
int ret;
ret = get_elf_backend_data (abfd)->s->sizeof_ehdr;
- if (! reloc)
- ret += get_program_header_size (abfd);
+ if (!info->relocatable)
+ ret += get_program_header_size (abfd, info);
return ret;
}
/* We may add a PT_ARM_EXIDX program header. */
static int
-elf32_arm_additional_program_headers (bfd *abfd)
+elf32_arm_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *sec;
(bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, \
Elf_Internal_Sym *)) i370_noop
#define elf_backend_additional_program_headers \
- (int (*) (bfd *)) i370_noop
+ (int (*) (bfd *, struct bfd_link_info *)) i370_noop
#define elf_backend_modify_segment_map \
(bfd_boolean (*) (bfd *, struct bfd_link_info *)) i370_noop
need to bump up the number of section headers. */
static int
-ppc_elf_additional_program_headers (bfd *abfd)
+ppc_elf_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int ret = 0;
PARAMS ((bfd *, struct bfd_link_info *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static int elf64_hppa_additional_program_headers
- PARAMS ((bfd *));
-
static bfd_boolean elf64_hppa_modify_segment_map
PARAMS ((bfd *, struct bfd_link_info *));
existence of a .interp section. */
static int
-elf64_hppa_additional_program_headers (abfd)
- bfd *abfd;
+elf64_hppa_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
}
static int
-elf64_x86_64_additional_program_headers (bfd *abfd)
+elf64_x86_64_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int count = 0;
PARAMS ((bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym,
const char **namep, flagword *flagsp, asection **secp,
bfd_vma *valp));
-static int elfNN_ia64_additional_program_headers
- PARAMS ((bfd *abfd));
static bfd_boolean elfNN_ia64_modify_segment_map
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elfNN_ia64_is_local_label_name
/* Return the number of additional phdrs we will need. */
static int
-elfNN_ia64_additional_program_headers (abfd)
- bfd *abfd;
+elfNN_ia64_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int ret = 0;
segments. */
int
-_bfd_mips_elf_additional_program_headers (bfd *abfd)
+_bfd_mips_elf_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int ret = 0;
/* MIPS ELF specific backend routines.
- Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
extern void _bfd_mips_elf_final_write_processing
(bfd *, bfd_boolean);
extern int _bfd_mips_elf_additional_program_headers
- (bfd *);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_modify_segment_map
(bfd *, struct bfd_link_info *);
extern asection * _bfd_mips_elf_gc_mark_hook
/* BFD back-end for MS-DOS executables.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Bryan Ford of the University of Utah.
Contributed by the Center for Software Science at the
#define EXE_LOAD_LOW 0xffff
#define EXE_PAGE_SIZE 512
-static int msdos_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
-static bfd_boolean msdos_write_object_contents
- PARAMS ((bfd *));
-static bfd_boolean msdos_set_section_contents
- PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
-
static int
-msdos_sizeof_headers (abfd, exec)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean exec ATTRIBUTE_UNUSED;
+msdos_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
static bfd_boolean
-msdos_write_object_contents (abfd)
- bfd *abfd;
+msdos_write_object_contents (bfd *abfd)
{
static char hdr[EXE_PAGE_SIZE];
file_ptr outfile_size = sizeof(hdr);
}
static bfd_boolean
-msdos_set_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- sec_ptr section;
- const PTR location;
- file_ptr offset;
- bfd_size_type count;
+msdos_set_section_contents (bfd *abfd,
+ sec_ptr section,
+ const void *location,
+ file_ptr offset,
+ bfd_size_type count)
{
if (count == 0)
/* BFD back-end for os9000 i386 binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
#include "libaout.h" /* BFD a.out internal data structures */
#include "os9k.h"
-static const bfd_target * os9k_callback
- PARAMS ((bfd *));
-static const bfd_target * os9k_object_p
- PARAMS ((bfd *));
-static int os9k_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
-bfd_boolean os9k_swap_exec_header_in
- PARAMS ((bfd *, mh_com *, struct internal_exec *));
-
/* Swaps the information in an executable header taken from a raw byte
stream memory image, into the internal exec_header structure. */
-bfd_boolean
-os9k_swap_exec_header_in (abfd, raw_bytes, execp)
- bfd *abfd;
- mh_com *raw_bytes;
- struct internal_exec *execp;
+static bfd_boolean
+os9k_swap_exec_header_in (bfd *abfd,
+ mh_com *raw_bytes,
+ struct internal_exec *execp)
{
mh_com *bytes = (mh_com *) raw_bytes;
unsigned int dload, dmemsize, dmemstart;
return TRUE;
}
-static const bfd_target *
-os9k_object_p (abfd)
- bfd *abfd;
-{
- struct internal_exec anexec;
- mh_com exec_bytes;
-
- if (bfd_bread ((PTR) &exec_bytes, (bfd_size_type) MHCOM_BYTES_SIZE, abfd)
- != MHCOM_BYTES_SIZE)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
-
- anexec.a_info = H_GET_16 (abfd, exec_bytes.m_sync);
- if (N_BADMAG (anexec))
- {
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
-
- if (! os9k_swap_exec_header_in (abfd, &exec_bytes, &anexec))
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
- return aout_32_some_aout_object_p (abfd, &anexec, os9k_callback);
-}
-
/* Finish up the opening of a b.out file for reading. Fill in all the
fields that are not handled by common code. */
static const bfd_target *
-os9k_callback (abfd)
- bfd *abfd;
+os9k_callback (bfd *abfd)
{
struct internal_exec *execp = exec_hdr (abfd);
unsigned long bss_start;
return abfd->xvec;
}
+static const bfd_target *
+os9k_object_p (bfd *abfd)
+{
+ struct internal_exec anexec;
+ mh_com exec_bytes;
+
+ if (bfd_bread ((PTR) &exec_bytes, (bfd_size_type) MHCOM_BYTES_SIZE, abfd)
+ != MHCOM_BYTES_SIZE)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+
+ anexec.a_info = H_GET_16 (abfd, exec_bytes.m_sync);
+ if (N_BADMAG (anexec))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+
+ if (! os9k_swap_exec_header_in (abfd, &exec_bytes, &anexec))
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ return aout_32_some_aout_object_p (abfd, &anexec, os9k_callback);
+}
+
static int
-os9k_sizeof_headers (ignore_abfd, ignore)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- bfd_boolean ignore ATTRIBUTE_UNUSED;
+os9k_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return sizeof (struct internal_exec);
}
static int
ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean x ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
/* Get the size of the headers, for the linker. */
static int
-ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
+ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
(bfd *, bfd_boolean, const void *, asymbol *);
extern int NAME (aout, sizeof_headers)
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean NAME (aout, adjust_sizes_and_vmas)
(bfd *, bfd_size_type *, file_ptr *);
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
-#define _bfd_nolink_sizeof_headers ((int (*) (bfd *, bfd_boolean)) bfd_0)
+#define _bfd_nolink_sizeof_headers \
+ ((int (*) (bfd *, struct bfd_link_info *)) bfd_0)
#define _bfd_nolink_bfd_get_relocated_section_contents \
((bfd_byte *(*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
bfd_byte *, bfd_boolean, asymbol **)) \
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
-#define _bfd_nolink_sizeof_headers ((int (*) (bfd *, bfd_boolean)) bfd_0)
+#define _bfd_nolink_sizeof_headers \
+ ((int (*) (bfd *, struct bfd_link_info *)) bfd_0)
#define _bfd_nolink_bfd_get_relocated_section_contents \
((bfd_byte *(*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
bfd_byte *, bfd_boolean, asymbol **)) \
extern bfd_boolean coff_find_inliner_info
(bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_coff_reloc16_relax_section
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
extern bfd_boolean coff_find_inliner_info
(bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_coff_reloc16_relax_section
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
/* BFD ECOFF object file private structure.
Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
+ 2005, 2006 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
extern bfd_boolean _bfd_ecoff_set_section_contents
(bfd *, asection *, const void * location, file_ptr, bfd_size_type);
-extern int _bfd_ecoff_sizeof_headers (bfd *, bfd_boolean);
+extern int _bfd_ecoff_sizeof_headers (bfd *, struct bfd_link_info *);
/* ecoff_bfd_get_relocated_section_contents defined by backend. */
/* ecoff_bfd_relax_section defined by backend. */
extern struct bfd_link_hash_table *_bfd_ecoff_bfd_link_hash_table_create
static int
bfd_mach_o_sizeof_headers (bfd *a ATTRIBUTE_UNUSED,
- bfd_boolean b ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
bfd_print_symbol_type);
static bfd_boolean mmo_set_section_contents (bfd *, sec_ptr, const void *,
file_ptr, bfd_size_type);
-static int mmo_sizeof_headers (bfd *, bfd_boolean);
+static int mmo_sizeof_headers (bfd *, struct bfd_link_info *);
static long mmo_get_reloc_upper_bound (bfd *, asection *);
static bfd_boolean mmo_internal_write_header (bfd *);
static bfd_boolean mmo_internal_write_post (bfd *, int, asection *);
static int
mmo_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
}
static int
-oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
+oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
}
int
-NAME (aout, sizeof_headers) (bfd *abfd, bfd_boolean execable ATTRIBUTE_UNUSED)
+NAME (aout, sizeof_headers) (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return adata (abfd).exec_bytes_size;
}
/* PEF support for BFD.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
}
static int
-bfd_pef_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
+bfd_pef_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
static void ppcboot_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static bfd_boolean ppcboot_set_section_contents
PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
-static int ppcboot_sizeof_headers PARAMS ((bfd *, bfd_boolean));
static bfd_boolean ppcboot_bfd_print_private_bfd_data PARAMS ((bfd *, PTR));
#define ppcboot_set_tdata(abfd, ptr) ((abfd)->tdata.any = (PTR) (ptr))
\f
static int
-ppcboot_sizeof_headers (abfd, exec)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean exec ATTRIBUTE_UNUSED;
+ppcboot_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return sizeof (ppcboot_hdr_t);
}
static int
som_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean reloc ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
(*_bfd_error_handler) (_("som_sizeof_headers unimplemented"));
fflush (stderr);
static int
srec_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
/* Generic target-file-type support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
. NAME##_bfd_discard_group, \
. NAME##_section_already_linked \
.
-. int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
+. int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
. bfd_byte * (*_bfd_get_relocated_section_contents)
. (bfd *, struct bfd_link_info *, struct bfd_link_order *,
. bfd_byte *, bfd_boolean, struct bfd_symbol **);
static int
tekhex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
/* BFD back-end for VERSAdos-E objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
Versados is a Motorola trademark.
static int
versados_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
static int
vms_sizeof_headers (bfd * abfd ATTRIBUTE_UNUSED,
- bfd_boolean reloc ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
#if VMS_DEBUG
vms_debug (1, "vms_sizeof_headers (%p, %s)\n", abfd, (reloc)?"True":"False");
/* Common definitions for backends based on IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001, 2002, 2004, 2005
+ Copyright 2000, 2001, 2002, 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Cygnus Support.
extern int _bfd_xcoff_generic_stat_arch_elt (bfd *, struct stat *);
extern bfd_boolean _bfd_xcoff_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int);
extern bfd_boolean _bfd_xcoff_write_archive_contents (bfd *);
-extern int _bfd_xcoff_sizeof_headers (bfd *, bfd_boolean);
+extern int _bfd_xcoff_sizeof_headers (bfd *, struct bfd_link_info *);
extern void _bfd_xcoff_swap_sym_in (bfd *, void *, void *);
extern unsigned int _bfd_xcoff_swap_sym_out (bfd *, void *, void *);
extern void _bfd_xcoff_swap_aux_in (bfd *, void *, int, int, int, int, void *);
}
int
-bfd_sym_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
+bfd_sym_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
/* xSYM symbol-file support for BFD.
- Copyright 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
extern long bfd_sym_canonicalize_symtab
(bfd *, asymbol **);
extern int bfd_sym_sizeof_headers
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
#endif /* __xSYM_H__ */
+2006-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name): Adjust bfd_sizeof_headers call.
+
2006-06-14 Kevin F. Quinn <kevquinn@gentoo.org>
* ld.texinfo: Document new -z lazy option.
/* Don't find the real header size if only marking sections;
The bfd function may cache incorrect data. */
if (expld.phase != lang_mark_phase_enum)
- hdr_size = bfd_sizeof_headers (output_bfd, link_info.relocatable);
+ hdr_size = bfd_sizeof_headers (output_bfd, &link_info);
new_abs (hdr_size);
}
break;