* 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.
This commit is contained in:
Alan Modra 2002-01-06 07:30:35 +00:00
parent a9011d31b6
commit 3f3c5c3404
19 changed files with 138 additions and 303 deletions

View File

@ -1,3 +1,40 @@
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.

View File

@ -3110,6 +3110,9 @@ bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol));
#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

View File

@ -48,7 +48,6 @@ static boolean binary_get_section_contents
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));
@ -219,15 +218,7 @@ binary_get_symtab (abfd, alocation)
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. */

View File

@ -51,7 +51,6 @@
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 *));
@ -100,18 +99,6 @@ make_bfd_asection (abfd, name, flags, _raw_size, offset, alignment_power)
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;
@ -239,19 +226,6 @@ hppabsd_core_core_file_matches_executable_p (core_bfd, exec_bfd)
return true;
}
#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 ()
@ -300,15 +274,15 @@ const bfd_target hppabsd_core_vec =
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,

View File

@ -103,7 +103,6 @@ struct hpux_core_struct
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 *));
@ -142,18 +141,6 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, alignment_power)
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.
@ -353,18 +340,6 @@ hpux_core_core_file_matches_executable_p (core_bfd, exec_bfd)
return true; /* FIXME, We have no way of telling at this point */
}
#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 ()
@ -411,15 +386,15 @@ const bfd_target hpux_core_vec =
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,

View File

@ -1,5 +1,5 @@
/* 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>.
@ -139,7 +139,6 @@ static boolean ihex_set_section_contents
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));
@ -916,21 +915,6 @@ ihex_write_object_contents (abfd)
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. */
@ -970,6 +954,7 @@ ihex_sizeof_headers (abfd, exec)
#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

View File

@ -48,7 +48,6 @@ static char *irix_core_core_file_failing_command PARAMS ((bfd *));
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 *
@ -203,29 +202,6 @@ irix_core_core_file_matches_executable_p (core_bfd, exec_bfd)
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()
@ -272,15 +248,15 @@ const bfd_target irix_core_vec =
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,

View File

@ -251,8 +251,7 @@ extern boolean _bfd_archive_coff_construct_extended_name_table
#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 \

View File

@ -256,8 +256,7 @@ extern boolean _bfd_archive_coff_construct_extended_name_table
#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 \

View File

@ -1,5 +1,5 @@
/* 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
@ -381,7 +381,6 @@ static boolean mmo_get_section_contents
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));
@ -2188,19 +2187,6 @@ mmo_get_symtab (abfd, alocation)
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
@ -3171,6 +3157,7 @@ mmo_canonicalize_reloc (abfd, section, relptr, symbols)
/* 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

View File

@ -30,21 +30,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* 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 */
@ -82,18 +74,6 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
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;
@ -196,17 +176,6 @@ osf_core_core_file_matches_executable_p (core_bfd, exec_bfd)
return true; /* FIXME, We have no way of telling at this point */
}
#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()
@ -253,15 +222,15 @@ const bfd_target osf_core_vec =
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,

View File

@ -1,5 +1,5 @@
/* 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>
@ -96,7 +96,6 @@ static boolean ppcboot_get_section_contents
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));
@ -332,17 +331,7 @@ ppcboot_get_symtab (abfd, alocation)
return PPCBOOT_SYMS;
}
/* Make an empty symbol. */
static asymbol *
ppcboot_make_empty_symbol (abfd)
bfd *abfd;
{
return (asymbol *) bfd_alloc (abfd, (bfd_size_type) sizeof (asymbol));
}
#define ppcboot_make_empty_symbol _bfd_generic_make_empty_symbol
#define ppcboot_print_symbol _bfd_nosymbols_print_symbol
/* Get information about a symbol. */

View File

@ -43,7 +43,6 @@ struct sco5_core_struct
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));
@ -75,18 +74,6 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
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;
@ -371,17 +358,6 @@ sco5_core_file_matches_executable_p (core_bfd, exec_bfd)
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 ()
@ -428,15 +404,15 @@ const bfd_target sco5_core_vec =
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,

View File

@ -1,6 +1,6 @@
/* 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>.
@ -138,7 +138,6 @@ static boolean internal_srec_write_object_contents PARAMS ((bfd *, int));
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 **));
@ -1150,18 +1149,6 @@ srec_sizeof_headers (abfd, exec)
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
@ -1251,6 +1238,7 @@ srec_print_symbol (abfd, afile, symbol, how)
#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

View File

@ -494,6 +494,31 @@ DESCRIPTION
. 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

View File

@ -1,5 +1,6 @@
/* 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.
@ -55,7 +56,6 @@ static boolean versados_get_section_contents
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
@ -723,18 +723,6 @@ versados_sizeof_headers (abfd, exec)
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
@ -865,6 +853,7 @@ versados_canonicalize_reloc (abfd, section, relptr, symbols)
#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

View File

@ -1,6 +1,7 @@
/* 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 :-)
@ -635,7 +636,7 @@ _bfd_vms_slurp_gsd (abfd, objtype)
{
/* symbol specification (definition or reference) */
symbol = _bfd_vms_make_empty_symbol (abfd);
symbol = bfd_make_empty_symbol (abfd);
if (symbol == 0)
return -1;

View File

@ -1,6 +1,6 @@
/* 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)
@ -1070,7 +1070,7 @@ new_symbol (abfd, name)
_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;

View File

@ -1,6 +1,6 @@
/* 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)
@ -129,7 +129,7 @@ static long vms_canonicalize_dynamic_reloc
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
/*===========================================================================*/
@ -1142,34 +1142,6 @@ vms_get_symtab (abfd, symbols)
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 (???)