X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fbfd-in.h;h=146aac2050ca265af8bc7fd42e21c738f6536d6c;hb=ae4221d7c27786eb790a96d65a78cb0fb7d79fcf;hp=79e483d51d464305e941a04ede2fb9563ad02624;hpb=125c4a69c4572195571873dccbc31434bba53ddd;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 79e483d51d..146aac2050 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -1,5 +1,6 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -84,7 +85,7 @@ typedef struct _bfd bfd; /* General rules: functions which are boolean return true on success and false on failure (unless they're a predicate). -- bfd.doc */ /* I'm sure this is going to break something and someone is going to - force me to change it. */ + force me to change it. */ /* typedef enum boolean {false, true} boolean; */ /* Yup, SVR4 has a "typedef enum boolean" in -fnf */ /* It gets worse if the host also defines a true/false enum... -sts */ @@ -93,7 +94,7 @@ typedef struct _bfd bfd; #define TRUE_FALSE_ALREADY_DEFINED #endif #ifdef MPW -/* Pre-emptive strike - get the file with the enum. */ +/* Pre-emptive strike - get the file with the enum. */ #include #define TRUE_FALSE_ALREADY_DEFINED #endif /* MPW */ @@ -177,12 +178,18 @@ typedef unsigned long symvalue; typedef unsigned long bfd_size_type; /* Print a bfd_vma x on stream s. */ -#define fprintf_vma(s,x) fprintf(s, "%08lx", x) -#define sprintf_vma(s,x) sprintf(s, "%08lx", x) +#define fprintf_vma(s,x) fprintf (s, "%08lx", x) +#define sprintf_vma(s,x) sprintf (s, "%08lx", x) #endif /* not BFD64 */ +extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma)); +extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma)); +extern void bfd_elf_sprintf_vma PARAMS ((bfd *, char *, bfd_vma)); +extern void bfd_elf_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma)); + #define printf_vma(x) fprintf_vma(stdout,x) +#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x) typedef unsigned int flagword; /* 32 bits of flags */ typedef unsigned char bfd_byte; @@ -284,7 +291,6 @@ typedef struct carsym { file_ptr file_offset; /* look here to find the file */ } carsym; /* to make these you call a carsymogen */ - /* Used in generating armaps (archive tables of contents). Perhaps just a forward definition would do? */ struct orl { /* output ranlib */ @@ -293,13 +299,12 @@ struct orl { /* output ranlib */ int namidx; /* index into string table */ }; - /* Linenumber stuff */ typedef struct lineno_cache_entry { unsigned int line_number; /* Linenumber from start of function*/ union { struct symbol_cache_entry *sym; /* Function name */ - unsigned long offset; /* Offset into section */ + bfd_vma offset; /* Offset into section */ } u; } alent; @@ -344,7 +349,7 @@ typedef struct _symbol_info char type; CONST char *name; /* Symbol name. */ unsigned char stab_type; /* Stab type. */ - char stab_other; /* Stab other. */ + char stab_other; /* Stab other. */ short stab_desc; /* Stab desc. */ CONST char *stab_name; /* String for stab type. */ } symbol_info; @@ -481,7 +486,6 @@ extern long bfd_tell PARAMS ((bfd *abfd)); extern int bfd_flush PARAMS ((bfd *abfd)); extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); - /* Cast from const char * to char * so that caller can assign to a char * without a warning. */ #define bfd_get_filename(abfd) ((char *) (abfd)->filename) @@ -514,7 +518,10 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean)(bool)), true) +#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) + +extern boolean bfd_cache_close PARAMS ((bfd *abfd)); +/* NB: This declaration should match the autogenerated one in libbfd.h. */ extern boolean bfd_record_phdr PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma, @@ -540,6 +547,11 @@ void bfd_putb32 PARAMS ((bfd_vma, unsigned char *)); void bfd_putl32 PARAMS ((bfd_vma, unsigned char *)); void bfd_putb16 PARAMS ((bfd_vma, unsigned char *)); void bfd_putl16 PARAMS ((bfd_vma, unsigned char *)); + +/* Byte swapping routines which take size and endiannes as arguments. */ + +bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean)); +void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean)); /* Externally visible ECOFF routines. */ @@ -619,15 +631,18 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list extern boolean bfd_elf_get_bfd_needed_list PARAMS ((bfd *, struct bfd_link_needed_list **)); extern boolean bfd_elf32_size_dynamic_sections - PARAMS ((bfd *, const char *, const char *, boolean, const char *, + PARAMS ((bfd *, const char *, const char *, const char *, const char * const *, struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *)); extern boolean bfd_elf64_size_dynamic_sections - PARAMS ((bfd *, const char *, const char *, boolean, const char *, + PARAMS ((bfd *, const char *, const char *, const char *, const char * const *, struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *)); extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *)); +extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *)); extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); +extern struct bfd_link_needed_list *bfd_elf_get_runpath_list + PARAMS ((bfd *, struct bfd_link_info *)); /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error @@ -646,9 +661,13 @@ extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs)); /* Return the arch_size field of an elf bfd, or -1 if not elf. */ extern int bfd_get_arch_size PARAMS ((bfd *)); -/* Return true if address "naturally" sign extends, or -1 if not elf. */ +/* Return true if address "naturally" sign extends, or -1 if not elf. */ extern int bfd_get_sign_extend_vma PARAMS ((bfd *)); +extern boolean bfd_m68k_elf32_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + /* SunOS shared library support routines for the linker. */ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list @@ -727,6 +746,10 @@ extern boolean bfd_coff_get_auxent extern boolean bfd_coff_set_symbol_class PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int)); +extern boolean bfd_m68k_coff_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + /* ARM Interworking support. Called from linker. */ extern boolean bfd_arm_allocate_interworking_sections PARAMS ((struct bfd_link_info *)); @@ -757,7 +780,7 @@ extern boolean bfd_elf32_arm_process_before_allocation extern boolean bfd_elf32_arm_get_bfd_for_interworking PARAMS ((bfd *, struct bfd_link_info *)); -/* TI COFF load page support. */ +/* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page PARAMS ((struct sec *, int));