+2002-01-06 Alan Modra <amodra@bigpond.net.au>
+
+ * syms.c (_bfd_generic_make_empty_symbol): New function.
+ * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
+ _bfd_generic_make_empty_symbol.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
+ (hppabsd_core_get_symtab_upper_bound): Don't define.
+ (hppabsd_core_get_symtab): Likewise.
+ (hppabsd_core_print_symbol): Likewise.
+ (hppabsd_core_get_symbol_info): Likewise.
+ (hppabsd_core_bfd_is_local_label_name): Likewise.
+ (hppabsd_core_get_lineno): Likewise.
+ (hppabsd_core_find_nearest_line): Likewise.
+ (hppabsd_core_bfd_make_debug_symbol): Likewise.
+ (hppabsd_core_read_minisymbols): Likewise.
+ (hppabsd_core_minisymbol_to_symbol): Likewise.
+ (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
+ Formatting fixes.
+ * hpux-core.c: Similarly.
+ * irix-core.c: Similarly.
+ * osf-core.c: Similarly.
+ * sco5-core.c: Similarly.
+ * binary.c (binary_make_empty_symbol): Remove function, define as
+ _bfd_generic_make_empty_symbol.
+ * ihex.c (ihex_make_empty_symbol): Likewise.
+ * mmo.c (mmo_make_empty_symbol): Likewise.
+ * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
+ * srec.c (srec_make_empty_symbol): Likewise.
+ * versados.c (versados_make_empty_symbol): Likewise.
+ * vms.c (_bfd_vms_make_empty_symbol): Remove.
+ (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
+ * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
+ rather than _bfd_vms_make_empty_symbol.
+ * vms-misc.c (new_symbol): Likewise.
+
2002-01-05 Alan Modra <amodra@bigpond.net.au>
* section.c (bfd_section_init): Remove unnecessary initialisations.
#define bfd_make_empty_symbol(abfd) \
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
+asymbol *
+_bfd_generic_make_empty_symbol PARAMS ((bfd *));
+
#define bfd_make_debug_symbol(abfd,ptr,size) \
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
int
static long binary_get_symtab_upper_bound PARAMS ((bfd *));
static char *mangle_name PARAMS ((bfd *, char *));
static long binary_get_symtab PARAMS ((bfd *, asymbol **));
-static asymbol *binary_make_empty_symbol PARAMS ((bfd *));
static void binary_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static boolean binary_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
return BIN_SYMS;
}
-/* Make an empty symbol. */
-
-static asymbol *
-binary_make_empty_symbol (abfd)
- bfd *abfd;
-{
- return (asymbol *) bfd_alloc (abfd, (bfd_size_type) sizeof (asymbol));
-}
-
+#define binary_make_empty_symbol _bfd_generic_make_empty_symbol
#define binary_print_symbol _bfd_nosymbols_print_symbol
/* Get information about a symbol. */
static asection *make_bfd_asection PARAMS ((bfd *, const char *,
flagword, bfd_size_type,
file_ptr, unsigned int));
-static asymbol *hppabsd_core_make_empty_symbol PARAMS ((bfd *));
static const bfd_target *hppabsd_core_core_file_p PARAMS ((bfd *));
static char *hppabsd_core_core_file_failing_command PARAMS ((bfd *));
static int hppabsd_core_core_file_failing_signal PARAMS ((bfd *));
return asect;
}
-static asymbol *
-hppabsd_core_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, (bfd_size_type) sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
static const bfd_target *
hppabsd_core_core_file_p (abfd)
bfd *abfd;
return true;
}
\f
-#define hppabsd_core_get_symtab_upper_bound \
- _bfd_nosymbols_get_symtab_upper_bound
-#define hppabsd_core_get_symtab _bfd_nosymbols_get_symtab
-#define hppabsd_core_print_symbol _bfd_nosymbols_print_symbol
-#define hppabsd_core_get_symbol_info _bfd_nosymbols_get_symbol_info
-#define hppabsd_core_bfd_is_local_label_name \
- _bfd_nosymbols_bfd_is_local_label_name
-#define hppabsd_core_get_lineno _bfd_nosymbols_get_lineno
-#define hppabsd_core_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define hppabsd_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define hppabsd_core_read_minisymbols _bfd_nosymbols_read_minisymbols
-#define hppabsd_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort ()
bfd_false, bfd_false
},
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (hppabsd_core),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (hppabsd_core),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (hppabsd_core),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
static asection *make_bfd_asection
PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma,
unsigned int));
-static asymbol *hpux_core_make_empty_symbol PARAMS ((bfd *));
static const bfd_target *hpux_core_core_file_p PARAMS ((bfd *));
static char *hpux_core_core_file_failing_command PARAMS ((bfd *));
static int hpux_core_core_file_failing_signal PARAMS ((bfd *));
return asect;
}
-static asymbol *
-hpux_core_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, (bfd_size_type) sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
/* this function builds a bfd target if the file is a corefile.
It returns null or 0 if it finds out thaat it is not a core file.
The way it checks this is by looking for allowed 'type' field values.
return true; /* FIXME, We have no way of telling at this point */
}
\f
-#define hpux_core_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
-#define hpux_core_get_symtab _bfd_nosymbols_get_symtab
-#define hpux_core_print_symbol _bfd_nosymbols_print_symbol
-#define hpux_core_get_symbol_info _bfd_nosymbols_get_symbol_info
-#define hpux_core_bfd_is_local_label_name \
- _bfd_nosymbols_bfd_is_local_label_name
-#define hpux_core_get_lineno _bfd_nosymbols_get_lineno
-#define hpux_core_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define hpux_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define hpux_core_read_minisymbols _bfd_nosymbols_read_minisymbols
-#define hpux_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort ()
bfd_false, bfd_false
},
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (hpux_core),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (hpux_core),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (hpux_core),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
static boolean ihex_write_record
PARAMS ((bfd *, size_t, unsigned int, unsigned int, bfd_byte *));
static boolean ihex_write_object_contents PARAMS ((bfd *));
-static asymbol *ihex_make_empty_symbol PARAMS ((bfd *));
static boolean ihex_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static int ihex_sizeof_headers PARAMS ((bfd *, boolean));
return true;
}
-/* Make an empty symbol. This is required only because
- bfd_make_section_anyway wants to create a symbol for the section. */
-
-static asymbol *
-ihex_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, (bfd_size_type) sizeof (asymbol));
- if (new != NULL)
- new->the_bfd = abfd;
- return new;
-}
-
/* Set the architecture for the output file. The architecture is
irrelevant, so we ignore errors about unknown architectures. */
#define ihex_get_symtab_upper_bound bfd_0l
#define ihex_get_symtab \
((long (*) PARAMS ((bfd *, asymbol **))) bfd_0l)
+#define ihex_make_empty_symbol _bfd_generic_make_empty_symbol
#define ihex_print_symbol _bfd_nosymbols_print_symbol
#define ihex_get_symbol_info _bfd_nosymbols_get_symbol_info
#define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
static int irix_core_core_file_failing_signal PARAMS ((bfd *));
static boolean irix_core_core_file_matches_executable_p
PARAMS ((bfd *, bfd *));
-static asymbol *irix_core_make_empty_symbol PARAMS ((bfd *));
static void swap_abort PARAMS ((void));
static asection *
return true; /* XXX - FIXME */
}
-static asymbol *
-irix_core_make_empty_symbol (abfd)
- bfd *abfd;
-{
- bfd_size_type amt = sizeof (asymbol);
- asymbol *new = (asymbol *) bfd_zalloc (abfd, amt);
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
-#define irix_core_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
-#define irix_core_get_symtab _bfd_nosymbols_get_symtab
-#define irix_core_print_symbol _bfd_nosymbols_print_symbol
-#define irix_core_get_symbol_info _bfd_nosymbols_get_symbol_info
-#define irix_core_bfd_is_local_label_name \
- _bfd_nosymbols_bfd_is_local_label_name
-#define irix_core_get_lineno _bfd_nosymbols_get_lineno
-#define irix_core_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define irix_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define irix_core_read_minisymbols _bfd_nosymbols_read_minisymbols
-#define irix_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort()
bfd_false, bfd_false
},
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (irix_core),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (irix_core),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (irix_core),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
#define _bfd_nosymbols_get_symtab \
((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
-#define _bfd_nosymbols_make_empty_symbol \
- ((asymbol *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
+#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
#define _bfd_nosymbols_print_symbol \
((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_void)
#define _bfd_nosymbols_get_symbol_info \
#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
#define _bfd_nosymbols_get_symtab \
((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
-#define _bfd_nosymbols_make_empty_symbol \
- ((asymbol *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
+#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
#define _bfd_nosymbols_print_symbol \
((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_void)
#define _bfd_nosymbols_get_symbol_info \
/* BFD back-end for mmo objects (MMIX-specific object-format).
- Copyright 2001
+ Copyright 2001, 2002
Free Software Foundation, Inc.
Written by Hans-Peter Nilsson (hp@bitrange.com).
Infrastructure and other bits originally copied from srec.c and
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long mmo_get_symtab_upper_bound PARAMS ((bfd *));
static long mmo_get_symtab PARAMS ((bfd *, asymbol **));
-static asymbol *mmo_make_empty_symbol PARAMS ((bfd *));
static void mmo_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static void mmo_print_symbol PARAMS ((bfd *, PTR, asymbol *,
bfd_print_symbol_type));
return symcount;
}
-/* Make an empty symbol. */
-
-static asymbol *
-mmo_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
-
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
/* Get information about a symbol. */
static void
/* FIXME: We can do better on this one, if we have a dwarf2 .debug_line
section or if MMO line numbers are implemented. */
#define mmo_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define mmo_make_empty_symbol _bfd_generic_make_empty_symbol
#define mmo_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define mmo_read_minisymbols _bfd_generic_read_minisymbols
#define mmo_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
/* forward declarations */
-static asection *
-make_bfd_asection PARAMS ((bfd *, const char *, flagword, bfd_size_type,
- bfd_vma, file_ptr));
-static asymbol *
-osf_core_make_empty_symbol PARAMS ((bfd *));
-static const bfd_target *
-osf_core_core_file_p PARAMS ((bfd *));
-static char *
-osf_core_core_file_failing_command PARAMS ((bfd *));
-static int
-osf_core_core_file_failing_signal PARAMS ((bfd *));
-static boolean
-osf_core_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
-static void
-swap_abort PARAMS ((void));
+static asection *make_bfd_asection
+ PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr));
+static const bfd_target *osf_core_core_file_p PARAMS ((bfd *));
+static char *osf_core_core_file_failing_command PARAMS ((bfd *));
+static int osf_core_core_file_failing_signal PARAMS ((bfd *));
+static boolean osf_core_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
+static void swap_abort PARAMS ((void));
/* These are stored in the bfd's tdata */
return asect;
}
-static asymbol *
-osf_core_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, (bfd_size_type) sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
static const bfd_target *
osf_core_core_file_p (abfd)
bfd *abfd;
return true; /* FIXME, We have no way of telling at this point */
}
\f
-#define osf_core_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
-#define osf_core_get_symtab _bfd_nosymbols_get_symtab
-#define osf_core_print_symbol _bfd_nosymbols_print_symbol
-#define osf_core_get_symbol_info _bfd_nosymbols_get_symbol_info
-#define osf_core_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
-#define osf_core_get_lineno _bfd_nosymbols_get_lineno
-#define osf_core_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define osf_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define osf_core_read_minisymbols _bfd_nosymbols_read_minisymbols
-#define osf_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort()
bfd_false, bfd_false
},
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (osf_core),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (osf_core),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (osf_core),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
/* BFD back-end for PPCbug boot records.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
static long ppcboot_get_symtab_upper_bound PARAMS ((bfd *));
static char *mangle_name PARAMS ((bfd *, char *));
static long ppcboot_get_symtab PARAMS ((bfd *, asymbol **));
-static asymbol *ppcboot_make_empty_symbol PARAMS ((bfd *));
static void ppcboot_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static boolean ppcboot_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
return PPCBOOT_SYMS;
}
-\f
-/* Make an empty symbol. */
-
-static asymbol *
-ppcboot_make_empty_symbol (abfd)
- bfd *abfd;
-{
- return (asymbol *) bfd_alloc (abfd, (bfd_size_type) sizeof (asymbol));
-}
-
-\f
+#define ppcboot_make_empty_symbol _bfd_generic_make_empty_symbol
#define ppcboot_print_symbol _bfd_nosymbols_print_symbol
/* Get information about a symbol. */
static asection *
make_bfd_asection PARAMS ((bfd *, const char *, flagword, bfd_size_type,
bfd_vma, file_ptr));
-static asymbol *sco5_core_make_empty_symbol PARAMS ((bfd *));
static struct user *read_uarea PARAMS ((bfd *, int));
const bfd_target *sco5_core_file_p PARAMS ((bfd *abfd));
char *sco5_core_file_failing_command PARAMS ((bfd *abfd));
return asect;
}
-static asymbol *
-sco5_core_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, (bfd_size_type) sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
static struct user *
read_uarea(abfd, filepos)
bfd *abfd;
return true; /* FIXME, We have no way of telling at this point */
}
-#define sco5_core_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
-#define sco5_core_get_symtab _bfd_nosymbols_get_symtab
-#define sco5_core_print_symbol _bfd_nosymbols_print_symbol
-#define sco5_core_get_symbol_info _bfd_nosymbols_get_symbol_info
-#define sco5_core_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
-#define sco5_core_get_lineno _bfd_nosymbols_get_lineno
-#define sco5_core_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define sco5_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define sco5_core_read_minisymbols _bfd_nosymbols_read_minisymbols
-#define sco5_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort ()
bfd_false, bfd_false
},
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (sco5),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (sco5_core),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (sco5),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
/* BFD back-end for s-record objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
static boolean srec_write_object_contents PARAMS ((bfd *));
static boolean symbolsrec_write_object_contents PARAMS ((bfd *));
static int srec_sizeof_headers PARAMS ((bfd *, boolean));
-static asymbol *srec_make_empty_symbol PARAMS ((bfd *));
static long srec_get_symtab_upper_bound PARAMS ((bfd *));
static long srec_get_symtab PARAMS ((bfd *, asymbol **));
return 0;
}
-static asymbol *
-srec_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, (bfd_size_type) sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
/* Return the amount of memory needed to read the symbol table. */
static long
#define srec_bfd_is_local_label_name bfd_generic_is_local_label_name
#define srec_get_lineno _bfd_nosymbols_get_lineno
#define srec_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define srec_make_empty_symbol _bfd_generic_make_empty_symbol
#define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define srec_read_minisymbols _bfd_generic_read_minisymbols
#define srec_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
. BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
*/
+/*
+FUNCTION
+ _bfd_generic_make_empty_symbol
+
+SYNOPSIS
+ asymbol *_bfd_generic_make_empty_symbol (bfd *);
+
+DESCRIPTION
+ Create a new <<asymbol>> structure for the BFD @var{abfd}
+ and return a pointer to it. Used by core file routines,
+ binary back-end and anywhere else where no private info
+ is needed.
+*/
+
+asymbol *
+_bfd_generic_make_empty_symbol (abfd)
+ bfd *abfd;
+{
+ bfd_size_type amt = sizeof (asymbol);
+ asymbol *new = (asymbol *) bfd_zalloc (abfd, amt);
+ if (new)
+ new->the_bfd = abfd;
+ return new;
+}
+
/*
FUNCTION
bfd_make_debug_symbol
/* BFD back-end for VERSAdos-E objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
Versados is a Motorola trademark.
static boolean versados_set_section_contents
PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
static int versados_sizeof_headers PARAMS ((bfd *, boolean));
-static asymbol *versados_make_empty_symbol PARAMS ((bfd *));
static long int versados_get_symtab_upper_bound PARAMS ((bfd *));
static long int versados_get_symtab PARAMS ((bfd *, asymbol **));
static void versados_get_symbol_info
return 0;
}
-static asymbol *
-versados_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, (bfd_size_type) sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
/* Return the amount of memory needed to read the symbol table. */
static long
#define versados_bfd_is_local_label_name bfd_generic_is_local_label_name
#define versados_get_lineno _bfd_nosymbols_get_lineno
#define versados_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define versados_make_empty_symbol _bfd_generic_make_empty_symbol
#define versados_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define versados_read_minisymbols _bfd_generic_read_minisymbols
#define versados_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
/* vms-gsd.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
go and read the openVMS linker manual (esp. appendix B)
if you don't know what's going on here :-)
{
/* symbol specification (definition or reference) */
- symbol = _bfd_vms_make_empty_symbol (abfd);
+ symbol = bfd_make_empty_symbol (abfd);
if (symbol == 0)
return -1;
/* vms-misc.c -- Miscellaneous functions for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
_bfd_vms_debug (7, "new_symbol %s\n", name);
#endif
- symbol = _bfd_vms_make_empty_symbol (abfd);
+ symbol = bfd_make_empty_symbol (abfd);
if (symbol == 0)
return symbol;
symbol->name = name;
/* vms.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
static boolean vms_bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
static boolean vms_bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
-#define vms_make_empty_symbol _bfd_vms_make_empty_symbol
+#define vms_make_empty_symbol _bfd_generic_make_empty_symbol
\f
/*===========================================================================*/
return PRIV (gsd_sym_count);
}
-/* Create a new asymbol structure for the BFD abfd and return a pointer
- to it.
- This routine is necessary because each back end has private information
- surrounding the asymbol. Building your own asymbol and pointing to it
- will not create the private information, and will cause problems later on. */
-
-asymbol *
-_bfd_vms_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *symbol;
-
- symbol = (asymbol *) bfd_zalloc(abfd, (bfd_size_type) sizeof (asymbol));
-
-#if VMS_DEBUG
- vms_debug (1, "_bfd_vms_make_empty_symbol(%p)\n", abfd);
-#endif
-
- if (symbol == 0)
- {
- bfd_set_error (bfd_error_no_memory);
- return 0;
- }
- symbol->the_bfd = abfd;
-
- return symbol;
-}
-
/* Print symbol to file according to how. how is one of
bfd_print_symbol_name just print the name
bfd_print_symbol_more print more (???)