Thu Aug 31 16:00:53 1995 steve chamberlain <sac@slash.cygnus.com>

* Makefile.in: Update dependencies.
	* aout-target.h (MY_bfd_print_private_bfd_data): New.
	* bfd-in.h (PE STUFF): Deleted.
	* bfd.c (tdata->pe_obj_data): New.
	(bfd_print_private_bfd_data): New.
	* coff-i386.c, coff-arm.c (coff_*-rtype_to_howto): Get image base from
	new place.
	* libcoff.h, libbfd.h, bfd-in2.h: Rebuilt.
	* coffcode.h (pe_value): Delete
	(coff_mkobject, coff_mkobject_hook): Conditionally build.
	(coff_compute_section_file_positions): Look in new place.
	(add_data_entry, fill_pe_header_info): Deleted.
	(coff_write_object_contents): Remove PE stuff.
	(coff_bfd_print_private_bfd_data): New.
	* coffswap.h: Remove PE stuff.
	* elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): New.
	* libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): New.
	* libcoff-in.h (pe_data_type): New.
	* libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): New.
	* targets.c (_bfd_print_private_bfd_data): New.
	* peicode.h: New file.
This commit is contained in:
Steve Chamberlain 1995-08-31 23:33:37 +00:00
parent 0b4fc03b37
commit 4e98461f60
10 changed files with 1262 additions and 124 deletions

View file

@ -208,9 +208,10 @@ opncls.c
osf-core.c
pc532-mach.c
pe-arm.c
pei-arm.c
pe-i386.c
pei-arm.c
pei-i386.c
peicode.h
ptrace-core.c
reloc.c
reloc16.c

View file

@ -1,3 +1,27 @@
Thu Aug 31 16:00:53 1995 steve chamberlain <sac@slash.cygnus.com>
* Makefile.in: Update dependencies.
* aout-target.h (MY_bfd_print_private_bfd_data): New.
* bfd-in.h (PE STUFF): Deleted.
* bfd.c (tdata->pe_obj_data): New.
(bfd_print_private_bfd_data): New.
* coff-i386.c, coff-arm.c (coff_*-rtype_to_howto): Get image base from
new place.
* libcoff.h, libbfd.h, bfd-in2.h: Rebuilt.
* coffcode.h (pe_value): Delete
(coff_mkobject, coff_mkobject_hook): Conditionally build.
(coff_compute_section_file_positions): Look in new place.
(add_data_entry, fill_pe_header_info): Deleted.
(coff_write_object_contents): Remove PE stuff.
(coff_bfd_print_private_bfd_data): New.
* coffswap.h: Remove PE stuff.
* elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): New.
* libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): New.
* libcoff-in.h (pe_data_type): New.
* libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): New.
* targets.c (_bfd_print_private_bfd_data): New.
* peicode.h: New file.
Thu Aug 31 11:49:21 1995 Ian Lance Taylor <ian@cygnus.com>
* bfd-in.h: Add extern "C" if __cplusplus.

View file

@ -133,6 +133,7 @@ BFD32_BACKENDS = \
cf-sparclynx.o \
coff-a29k.o \
coff-apollo.o \
coff-arm.o \
coff-h8300.o \
coff-h8500.o \
coff-i386.o \
@ -164,6 +165,7 @@ BFD32_BACKENDS = \
elf32-ppc.o \
elf32-sparc.o \
elf32.o \
elflink.o \
hp300hpux.o \
som.o \
i386aout.o \
@ -280,7 +282,7 @@ CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c \
sparclynx.c cf-sparclynx.c aix386-core.c hpux-core.c \
irix-core.c lynx-core.c osf-core.c hash.c linker.c cofflink.c \
m68knetbsd.c ns32knetbsd.c sparcnetbsd.c pe-i386.c pei-i386.c \
versados.c
versados.c coff-arm.c pe-arm.c pei-arm.c
HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h \
coffswap.h ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
@ -834,7 +836,15 @@ pe-i386.o: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/bfdlink.h coffcode.h coffswap.h
pei-i386.o: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h coffswap.h
$(INCDIR)/bfdlink.h coffcode.h coffswap.h peicode.h
versados.o: versados.c $(INCDIR)/libiberty.h
coff-arm.o: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
pe-arm.o: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h coffswap.h
pei-arm.o: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h coffswap.h peicode.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY

View file

@ -449,58 +449,6 @@ extern long bfd_tell PARAMS ((bfd *abfd));
extern int bfd_flush PARAMS ((bfd *abfd));
extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
/* PE STUFF */
/* Also define some types which are used within bfdlink.h for the
bfd_link_info struct. These are not defined in bfdlink.h for a reason.
When the link_info data is passed to bfd from ld, it is copied into
extern variables defined in internal.h. The type class for these must
be available to any thing that includes internal.h. When internal.h is
included, it is always preceeded by an include on this file. If I leave the
type definitions in bfdlink.h, then I must include that file when ever
I include internal.h, and this is not always a good thing */
/* These are the different types of subsystems to be used when linking for
Windows NT. This information is passed in as an input parameter (default
is console) and ultimately ends up in the optional header data */
#define BFD_PE_NATIVE 1 /* image doesn't require a subsystem */
#define BFD_PE_WINDOWS 2 /* image runs in the Windows GUI subsystem */
#define BFD_PE_CONSOLE 3 /* image runs in the Windows CUI subsystem */
#define BFD_PE_OS2 5 /* image runs in the OS/2 character subsystem */
#define BFD_PE_POSIX 7 /* image runs in the posix character subsystem */
/* The NT optional header file allows input of the stack and heap reserve
and commit size. This data may be input on the command line and will
end up in the optional header. Default sizes are provided. */
typedef struct
{
boolean defined;
bfd_vma value;
} bfd_link_pe_info_dval ;
typedef struct _bfd_link_pe_info
{
bfd_link_pe_info_dval dll;
bfd_link_pe_info_dval file_alignment;
bfd_link_pe_info_dval heap_commit;
bfd_link_pe_info_dval heap_reserve;
bfd_link_pe_info_dval image_base;
bfd_link_pe_info_dval major_image_version;
bfd_link_pe_info_dval major_os_version;
bfd_link_pe_info_dval major_subsystem_version;
bfd_link_pe_info_dval minor_image_version;
bfd_link_pe_info_dval minor_os_version;
bfd_link_pe_info_dval minor_subsystem_version;
bfd_link_pe_info_dval section_alignment;
bfd_link_pe_info_dval stack_commit;
bfd_link_pe_info_dval stack_reserve;
bfd_link_pe_info_dval subsystem;
} bfd_link_pe_info;
/* END OF PE STUFF */
/* Cast from const char * to char * so that caller can assign to
a char * without a warning. */

View file

@ -449,58 +449,6 @@ extern long bfd_tell PARAMS ((bfd *abfd));
extern int bfd_flush PARAMS ((bfd *abfd));
extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
/* PE STUFF */
/* Also define some types which are used within bfdlink.h for the
bfd_link_info struct. These are not defined in bfdlink.h for a reason.
When the link_info data is passed to bfd from ld, it is copied into
extern variables defined in internal.h. The type class for these must
be available to any thing that includes internal.h. When internal.h is
included, it is always preceeded by an include on this file. If I leave the
type definitions in bfdlink.h, then I must include that file when ever
I include internal.h, and this is not always a good thing */
/* These are the different types of subsystems to be used when linking for
Windows NT. This information is passed in as an input parameter (default
is console) and ultimately ends up in the optional header data */
#define BFD_PE_NATIVE 1 /* image doesn't require a subsystem */
#define BFD_PE_WINDOWS 2 /* image runs in the Windows GUI subsystem */
#define BFD_PE_CONSOLE 3 /* image runs in the Windows CUI subsystem */
#define BFD_PE_OS2 5 /* image runs in the OS/2 character subsystem */
#define BFD_PE_POSIX 7 /* image runs in the posix character subsystem */
/* The NT optional header file allows input of the stack and heap reserve
and commit size. This data may be input on the command line and will
end up in the optional header. Default sizes are provided. */
typedef struct
{
boolean defined;
bfd_vma value;
} bfd_link_pe_info_dval ;
typedef struct _bfd_link_pe_info
{
bfd_link_pe_info_dval dll;
bfd_link_pe_info_dval file_alignment;
bfd_link_pe_info_dval heap_commit;
bfd_link_pe_info_dval heap_reserve;
bfd_link_pe_info_dval image_base;
bfd_link_pe_info_dval major_image_version;
bfd_link_pe_info_dval major_os_version;
bfd_link_pe_info_dval major_subsystem_version;
bfd_link_pe_info_dval minor_image_version;
bfd_link_pe_info_dval minor_os_version;
bfd_link_pe_info_dval minor_subsystem_version;
bfd_link_pe_info_dval section_alignment;
bfd_link_pe_info_dval stack_commit;
bfd_link_pe_info_dval stack_reserve;
bfd_link_pe_info_dval subsystem;
} bfd_link_pe_info;
/* END OF PE STUFF */
/* Cast from const char * to char * so that caller can assign to
a char * without a warning. */
@ -1909,6 +1857,7 @@ struct _bfd
struct _oasys_data *oasys_obj_data;
struct _oasys_ar_data *oasys_ar_data;
struct coff_tdata *coff_obj_data;
struct pe_tdata *pe_obj_data;
struct ecoff_tdata *ecoff_obj_data;
struct ieee_data_struct *ieee_data;
struct ieee_ar_data_struct *ieee_ar_data;
@ -2079,6 +2028,9 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_get_dynamic_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
#define bfd_print_private_bfd_data(abfd, file)\
BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
@ -2211,7 +2163,8 @@ CAT(NAME,_bfd_copy_private_bfd_data),\
CAT(NAME,_bfd_merge_private_bfd_data),\
CAT(NAME,_bfd_copy_private_section_data),\
CAT(NAME,_bfd_copy_private_symbol_data),\
CAT(NAME,_bfd_set_private_flags)
CAT(NAME,_bfd_set_private_flags),\
CAT(NAME,_bfd_print_private_bfd_data)\
/* Called to copy BFD general private data from one object file
to another. */
boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
@ -2229,6 +2182,9 @@ CAT(NAME,_bfd_set_private_flags)
/* Called to set private backend flags */
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
/* Called to print private BFD data */
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, void *));
/* Core file entry points. */
#define BFD_JUMP_TABLE_CORE(NAME)\
CAT(NAME,_core_file_failing_command),\

View file

@ -15,7 +15,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This structure contains everything that BFD knows about a target.
It includes things like its byte order, name, what routines to call
@ -36,6 +36,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef bfd_elfNN_find_nearest_line
#define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line
#endif
#define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols
#define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol
#define bfd_elfNN_get_dynamic_symtab_upper_bound _bfd_elf_get_dynamic_symtab_upper_bound
#define bfd_elfNN_get_lineno _bfd_elf_get_lineno
#define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
@ -89,6 +91,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define bfd_elfNN_bfd_copy_private_bfd_data \
((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
#endif
#ifndef bfd_elfNN_bfd_print_private_bfd_data
#define bfd_elfNN_bfd_print_private_bfd_data \
((boolean (*) PARAMS ((bfd *, void *))) bfd_true)
#endif
#ifndef bfd_elfNN_bfd_merge_private_bfd_data
#define bfd_elfNN_bfd_merge_private_bfd_data \
((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)

View file

@ -1,6 +1,6 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@ -21,7 +21,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Align an address upward to a boundary, expressed as a number of bytes.
E.g. align to an 8-byte boundary with argument of 8. */
@ -72,6 +72,8 @@ struct areltdata {
char *bfd_zmalloc PARAMS ((bfd_size_type size));
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's obstack. Note
that realloc can never occur in place. */
@ -95,15 +97,12 @@ boolean bfd_slurp_bsd_armap_f2 PARAMS ((bfd *abfd));
#define bfd_slurp_bsd_armap bfd_slurp_armap
#define bfd_slurp_coff_armap bfd_slurp_armap
boolean _bfd_slurp_extended_name_table PARAMS ((bfd *abfd));
extern boolean _bfd_construct_extended_name_table
PARAMS ((bfd *, boolean, char **, bfd_size_type *));
boolean _bfd_write_archive_contents PARAMS ((bfd *abfd));
bfd *_bfd_get_elt_at_filepos PARAMS ((bfd *archive, file_ptr filepos));
bfd * _bfd_new_bfd PARAMS ((void));
#define DEFAULT_STRING_SPACE_SIZE 0x2000
boolean bfd_add_to_string_table PARAMS ((char **table, char *new_string,
unsigned int *table_length,
char **free_ptr));
boolean bfd_false PARAMS ((bfd *ignore));
boolean bfd_true PARAMS ((bfd *ignore));
PTR bfd_nullvoidptr PARAMS ((bfd *ignore));
@ -151,8 +150,16 @@ extern boolean _bfd_generic_get_section_contents
#define _bfd_generic_bfd_copy_private_bfd_data \
((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
#define _bfd_generic_bfd_merge_private_bfd_data \
((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
#define _bfd_generic_bfd_set_private_flags \
((boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
#define _bfd_generic_bfd_copy_private_section_data \
((boolean (*) PARAMS ((bfd *, asection *, bfd *, asection *))) bfd_true)
#define _bfd_generic_bfd_copy_private_symbol_data \
((boolean (*) PARAMS ((bfd *, asymbol *, bfd *, asymbol *))) bfd_true)
#define _bfd_generic_bfd_print_private_bfd_data \
((boolean (*) PARAMS ((bfd *, void *))) bfd_true)
/* Routines to use for BFD_JUMP_TABLE_CORE when there is no core file
support. Use BFD_JUMP_TABLE_CORE (_bfd_nocore). */
@ -167,6 +174,9 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
#define _bfd_noarchive_slurp_armap bfd_false
#define _bfd_noarchive_slurp_extended_name_table bfd_false
#define _bfd_noarchive_construct_extended_name_table \
((boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
bfd_false)
#define _bfd_noarchive_truncate_arname \
((void (*) PARAMS ((bfd *, const char *, char *))) bfd_void)
#define _bfd_noarchive_write_armap \
@ -176,6 +186,7 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
#define _bfd_noarchive_openr_next_archived_file \
((bfd *(*) PARAMS ((bfd *, bfd *))) bfd_nullvoidptr)
#define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt
#define _bfd_noarchive_update_armap_timestamp bfd_false
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd). */
@ -183,12 +194,15 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
#define _bfd_archive_bsd_slurp_armap bfd_slurp_bsd_armap
#define _bfd_archive_bsd_slurp_extended_name_table \
_bfd_slurp_extended_name_table
extern boolean _bfd_archive_bsd_construct_extended_name_table
PARAMS ((bfd *, char **, bfd_size_type *, const char **));
#define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
#define _bfd_archive_bsd_write_armap bsd_write_armap
#define _bfd_archive_bsd_openr_next_archived_file \
bfd_generic_openr_next_archived_file
#define _bfd_archive_bsd_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
extern boolean _bfd_archive_bsd_update_armap_timestamp PARAMS ((bfd *));
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff). */
@ -196,12 +210,15 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
#define _bfd_archive_coff_slurp_armap bfd_slurp_coff_armap
#define _bfd_archive_coff_slurp_extended_name_table \
_bfd_slurp_extended_name_table
extern boolean _bfd_archive_coff_construct_extended_name_table
PARAMS ((bfd *, char **, bfd_size_type *, const char **));
#define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
#define _bfd_archive_coff_write_armap coff_write_armap
#define _bfd_archive_coff_openr_next_archived_file \
bfd_generic_openr_next_archived_file
#define _bfd_archive_coff_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
#define _bfd_archive_coff_update_armap_timestamp bfd_true
/* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol
support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */
@ -226,6 +243,11 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
bfd_false)
#define _bfd_nosymbols_bfd_make_debug_symbol \
((asymbol *(*) PARAMS ((bfd *, PTR, unsigned long))) bfd_nullvoidptr)
#define _bfd_nosymbols_read_minisymbols \
((long (*) PARAMS ((bfd *, boolean, PTR *, unsigned int *))) _bfd_n1)
#define _bfd_nosymbols_minisymbol_to_symbol \
((asymbol *(*) PARAMS ((bfd *, boolean, const PTR, asymbol *))) \
bfd_nullvoidptr)
/* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */
@ -235,7 +257,7 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
#define _bfd_norelocs_canonicalize_reloc \
((long (*) PARAMS ((bfd *, asection *, arelent **, asymbol **))) _bfd_n1)
#define _bfd_norelocs_bfd_reloc_type_lookup \
((const reloc_howto_type *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) \
((reloc_howto_type *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) \
bfd_nullvoidptr)
/* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not
@ -274,6 +296,8 @@ extern boolean _bfd_generic_set_section_contents
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
#define _bfd_nolink_bfd_final_link \
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
#define _bfd_nolink_bfd_link_split_section \
((boolean (*) PARAMS ((bfd *, struct sec *))) bfd_false)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@ -290,6 +314,12 @@ extern boolean _bfd_generic_set_section_contents
label. */
extern boolean bfd_generic_is_local_label PARAMS ((bfd *, asymbol *));
/* Generic minisymbol routines. */
extern long _bfd_generic_read_minisymbols
PARAMS ((bfd *, boolean, PTR *, unsigned int *));
extern asymbol *_bfd_generic_minisymbol_to_symbol
PARAMS ((bfd *, boolean, const PTR, asymbol *));
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *entry,
@ -335,6 +365,9 @@ extern boolean _bfd_generic_link_add_one_symbol
extern boolean _bfd_generic_final_link
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean _bfd_generic_link_split_section
PARAMS ((bfd *, struct sec *));
/* Generic reloc_link_order processing routine. */
extern boolean _bfd_generic_reloc_link_order
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@ -351,12 +384,12 @@ extern unsigned int _bfd_count_link_order_relocs
/* Final link relocation routine. */
extern bfd_reloc_status_type _bfd_final_link_relocate
PARAMS ((const reloc_howto_type *, bfd *, asection *, bfd_byte *,
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
bfd_vma address, bfd_vma value, bfd_vma addend));
/* Relocate a particular location by a howto and a value. */
extern bfd_reloc_status_type _bfd_relocate_contents
PARAMS ((const reloc_howto_type *, bfd *, bfd_vma, bfd_byte *));
PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *));
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init PARAMS ((void));
@ -413,5 +446,18 @@ extern bfd *bfd_last_cache;
extern const bfd_target * const bfd_target_vector[];
extern const bfd_target * const bfd_default_vector[];
/* A function shared by the ECOFF and MIPS ELF backends, which have no
other common header files. */
#if defined(__STDC__) || defined(ALMOST_STDC)
struct ecoff_find_line;
#endif
extern boolean
_bfd_ecoff_locate_line
PARAMS ((bfd *, asection *, bfd_vma, struct ecoff_debug_info * const,
const struct ecoff_debug_swap * const, struct ecoff_find_line *,
const char **, const char **, unsigned int *));
/* And more follows */

View file

@ -1,6 +1,6 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@ -21,7 +21,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Align an address upward to a boundary, expressed as a number of bytes.
E.g. align to an 8-byte boundary with argument of 8. */
@ -72,6 +72,8 @@ struct areltdata {
char *bfd_zmalloc PARAMS ((bfd_size_type size));
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's obstack. Note
that realloc can never occur in place. */
@ -148,8 +150,16 @@ extern boolean _bfd_generic_get_section_contents
#define _bfd_generic_bfd_copy_private_bfd_data \
((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
#define _bfd_generic_bfd_merge_private_bfd_data \
((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
#define _bfd_generic_bfd_set_private_flags \
((boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
#define _bfd_generic_bfd_copy_private_section_data \
((boolean (*) PARAMS ((bfd *, asection *, bfd *, asection *))) bfd_true)
#define _bfd_generic_bfd_copy_private_symbol_data \
((boolean (*) PARAMS ((bfd *, asymbol *, bfd *, asymbol *))) bfd_true)
#define _bfd_generic_bfd_print_private_bfd_data \
((boolean (*) PARAMS ((bfd *, void *))) bfd_true)
/* Routines to use for BFD_JUMP_TABLE_CORE when there is no core file
support. Use BFD_JUMP_TABLE_CORE (_bfd_nocore). */
@ -233,6 +243,11 @@ extern boolean _bfd_archive_coff_construct_extended_name_table
bfd_false)
#define _bfd_nosymbols_bfd_make_debug_symbol \
((asymbol *(*) PARAMS ((bfd *, PTR, unsigned long))) bfd_nullvoidptr)
#define _bfd_nosymbols_read_minisymbols \
((long (*) PARAMS ((bfd *, boolean, PTR *, unsigned int *))) _bfd_n1)
#define _bfd_nosymbols_minisymbol_to_symbol \
((asymbol *(*) PARAMS ((bfd *, boolean, const PTR, asymbol *))) \
bfd_nullvoidptr)
/* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */
@ -281,6 +296,8 @@ extern boolean _bfd_generic_set_section_contents
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
#define _bfd_nolink_bfd_final_link \
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
#define _bfd_nolink_bfd_link_split_section \
((boolean (*) PARAMS ((bfd *, struct sec *))) bfd_false)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@ -297,6 +314,12 @@ extern boolean _bfd_generic_set_section_contents
label. */
extern boolean bfd_generic_is_local_label PARAMS ((bfd *, asymbol *));
/* Generic minisymbol routines. */
extern long _bfd_generic_read_minisymbols
PARAMS ((bfd *, boolean, PTR *, unsigned int *));
extern asymbol *_bfd_generic_minisymbol_to_symbol
PARAMS ((bfd *, boolean, const PTR, asymbol *));
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *entry,
@ -342,6 +365,9 @@ extern boolean _bfd_generic_link_add_one_symbol
extern boolean _bfd_generic_final_link
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean _bfd_generic_link_split_section
PARAMS ((bfd *, struct sec *));
/* Generic reloc_link_order processing routine. */
extern boolean _bfd_generic_reloc_link_order
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@ -420,6 +446,19 @@ extern bfd *bfd_last_cache;
extern const bfd_target * const bfd_target_vector[];
extern const bfd_target * const bfd_default_vector[];
/* A function shared by the ECOFF and MIPS ELF backends, which have no
other common header files. */
#if defined(__STDC__) || defined(ALMOST_STDC)
struct ecoff_find_line;
#endif
extern boolean
_bfd_ecoff_locate_line
PARAMS ((bfd *, asection *, bfd_vma, struct ecoff_debug_info * const,
const struct ecoff_debug_swap * const, struct ecoff_find_line *,
const char **, const char **, unsigned int *));
/* And more follows */
void
@ -466,9 +505,25 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_16_PCREL",
"BFD_RELOC_12_PCREL",
"BFD_RELOC_8_PCREL",
"BFD_RELOC_32_GOT_PCREL",
"BFD_RELOC_16_GOT_PCREL",
"BFD_RELOC_8_GOT_PCREL",
"BFD_RELOC_32_GOTOFF",
"BFD_RELOC_16_GOTOFF",
"BFD_RELOC_8_GOTOFF",
"BFD_RELOC_32_PLT_PCREL",
"BFD_RELOC_16_PLT_PCREL",
"BFD_RELOC_8_PLT_PCREL",
"BFD_RELOC_32_PLTOFF",
"BFD_RELOC_16_PLTOFF",
"BFD_RELOC_8_PLTOFF",
"BFD_RELOC_68K_GLOB_DAT",
"BFD_RELOC_68K_JMP_SLOT",
"BFD_RELOC_68K_RELATIVE",
"BFD_RELOC_32_BASEREL",
"BFD_RELOC_16_BASEREL",
"BFD_RELOC_8_BASEREL",
"BFD_RELOC_RVA",
"BFD_RELOC_8_FFnn",
"BFD_RELOC_32_PCREL_S2",
"BFD_RELOC_16_PCREL_S2",
@ -553,15 +608,19 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_SWI",
"BFD_RELOC_ARM_MULTI",
"BFD_RELOC_ARM_CP_OFF_IMM",
"BFD_RELOC_ARM_ADR_IMM",
"BFD_RELOC_ARM_LDR_IMM",
"BFD_RELOC_ARM_LITERAL",
"BFD_RELOC_ARM_IN_POOL",
/* start-sanitize-arc */
"BFD_RELOC_ARC_B22_PCREL",
"BFD_RELOC_ARC_B26",
/* end-sanitize-arc */
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
const struct reloc_howto_struct *
reloc_howto_type *
bfd_default_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));

View file

@ -16,7 +16,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
@ -252,6 +252,9 @@ extern boolean _bfd_ecoff_bfd_copy_private_bfd_data PARAMS ((bfd *, bfd *));
#define _bfd_ecoff_bfd_copy_private_symbol_data \
_bfd_generic_bfd_copy_private_symbol_data
#define _bfd_ecoff_bfd_print_private_bfd_data \
_bfd_generic_bfd_pritn_private_bfd_data
#define _bfd_ecoff_bfd_merge_private_bfd_data \
_bfd_generic_bfd_merge_private_bfd_data
@ -283,6 +286,8 @@ extern boolean _bfd_ecoff_find_nearest_line
const char **filename_ptr, const char **fnname_ptr,
unsigned int *retline_ptr));
#define _bfd_ecoff_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define _bfd_ecoff_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_ecoff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define _bfd_ecoff_get_reloc_upper_bound coff_get_reloc_upper_bound
extern long _bfd_ecoff_canonicalize_reloc

1083
bfd/peicode.h Normal file

File diff suppressed because it is too large Load diff