Home | History | Annotate | Download | only in include

Lines Matching refs:bfd

2    generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", 
4 "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
6 Run "make headers" in your build bfd/ to regenerate. */
8 /* Main header file for the bfd library -- portable access to object files.
16 This file is part of BFD, the Binary File Descriptor library.
77 /* The word size used by BFD on the host. This may be 64 with a 32
79 been selected with --enable-targets, or if --enable-64-bit-bfd. */
82 /* The word size of the default bfd target. */
107 typedef struct bfd bfd;
109 /* Boolean type used in bfd. Too many systems define their own
183 /* An offset into a file. BFD always uses the largest possible offset
188 extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
189 extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
210 /* Values that may appear in the flags field of a BFD. These also
220 /* BFD contains relocation entries. */
223 /* BFD is directly executable. */
226 /* BFD has line number information (basically used for F_LNNO in a
230 /* BFD has debugging information. */
233 /* BFD has symbols. */
236 /* BFD has local symbols (basically used for F_LSYMS in a COFF
240 /* BFD is a dynamic object. */
248 /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
252 /* BFD is relaxable (this means that bfd_relax_section may be able to
257 /* This may be set before writing out a BFD to request using a
263 /* This flag indicates that the BFD contents are actually cached in
267 /* The sections in this BFD specify a memory page. */
270 /* This BFD has been created by the linker and doesn't correspond
315 bfd *abfd;
316 } u; /* bfd* or file position. */
341 #define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
342 #define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
343 #define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
344 #define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
345 #define bfd_section_name(bfd, ptr) ((ptr)->name)
346 #define bfd_section_size(bfd, ptr) ((ptr)->size)
348 #define bfd_section_vma(bfd, ptr) ((ptr)->vma)
349 #define bfd_section_lma(bfd, ptr) ((ptr)->lma)
350 #define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
351 #define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
352 #define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
356 #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
357 #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
358 #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
360 #define bfd_get_section_limit(bfd, sec) \
362 / bfd_octets_per_byte (bfd))
503 /* User program access to BFD facilities. */
506 file than BFD does. Use higher level routines if possible. */
508 extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
509 extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
510 extern int bfd_seek (bfd *, file_ptr, int);
511 extern file_ptr bfd_tell (bfd *);
512 extern int bfd_flush (bfd *);
513 extern int bfd_stat (bfd *, struct stat *);
570 (bfd *abfd);
576 (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
621 (bfd * abfd);
623 (bfd *abfd, bfd_vma gp_value);
625 (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
628 (bfd *output_bfd, struct ecoff_debug_info *output_debug,
631 (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
634 (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
635 const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
639 (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
640 const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
643 (bfd *abfd, struct ecoff_debug_info *debug,
648 (bfd *abfd, struct ecoff_debug_info *debug,
652 (bfd *abfd, struct ecoff_debug_info *debug,
655 (bfd *abfd, struct ecoff_debug_info *debug,
658 (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
667 bfd *by;
686 (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
689 (bfd *, struct bfd_link_info *);
691 (bfd *, struct bfd_link_needed_list **);
693 (bfd *, const char *, const char *, const char *, const char * const *,
697 (bfd *, struct bfd_link_info *);
699 (bfd *, const char *);
701 (bfd *);
703 (bfd *, enum dynamic_lib_link_class);
705 (bfd *);
707 (bfd *, struct bfd_link_info *);
709 (bfd *, struct bfd_link_info *);
717 (bfd *abfd);
727 (bfd *abfd, void *phdrs);
729 /* Create a new BFD as if by bfd_openr. Rather than opening a file,
734 file headers (and hence BFD's idea of each section's VMA) put them at.
739 be a BFD for an ELF target with the word size and byte order found in
741 extern bfd *bfd_elf_bfd_from_remote_memory
742 (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
745 /* Return the arch_size field of an elf bfd, or -1 if not elf. */
747 (bfd *);
751 (bfd *);
754 (bfd *, struct bfd_link_info *);
757 (bfd *, struct bfd_link_info *);
764 (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
768 (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
774 (bfd *, struct bfd_link_info *);
776 (bfd *, struct bfd_link_info *, const char *);
778 (bfd *, struct bfd_link_info *, struct bfd_section **,
784 (bfd *, struct bfd_link_info *);
786 (bfd *, struct bfd_link_info *);
788 (bfd *, struct bfd_link_info *);
800 /* The actual window used by BFD. Small user-requested read-only
815 (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
820 (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
822 (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
825 (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
827 (bfd *, struct bfd_link_info *, const char *);
829 (bfd *, struct bfd_link_info *, const char *);
831 (bfd *, struct bfd_link_info *, const char *, const char *,
835 (bfd *, const char *, const char *, bfd_boolean);
839 (bfd *, char *);
849 (bfd *, struct bfd_symbol *, struct internal_syment *);
852 (bfd *, struct bfd_symbol *, int, union internal_auxent *);
855 (bfd *, struct bfd_symbol *, unsigned int);
858 (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
865 (bfd *, struct bfd_link_info *, int);
868 (bfd *, struct bfd_link_info *);
875 (bfd *, struct bfd_link_info *, int);
878 (bfd *, struct bfd_link_info *);
885 (bfd *, struct bfd_link_info *);
891 (bfd *, struct bfd_link_info *);
894 (bfd *, struct bfd_link_info *);
908 (bfd *, bfd *);
911 (bfd *, const char *);
914 (bfd *, const char *);
925 (bfd *, bfd_vma);
952 (bfd *, struct bfd_section *);
958 bfd *bfd_fopen (const char *filename, const char *target,
961 bfd *bfd_openr (const char *filename, const char *target);
963 bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
965 bfd *bfd_openstreamr (const char *, const char *, void *);
967 bfd *bfd_openr_iovec (const char *filename, const char *target,
968 void *(*open) (struct bfd *nbfd,
971 file_ptr (*pread) (struct bfd *nbfd,
976 int (*close) (struct bfd *nbfd,
979 bfd *bfd_openw (const char *filename, const char *target);
981 bfd_boolean bfd_close (bfd *abfd);
983 bfd_boolean bfd_close_all_done (bfd *);
985 bfd *bfd_create (const char *filename, bfd *templ);
987 bfd_boolean bfd_make_writable (bfd *abfd);
989 bfd_boolean bfd_make_readable (bfd *abfd);
994 char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
997 (bfd *abfd, const char *filename);
1000 (bfd *abfd, struct bfd_section *sect, const char *filename);
1116 long bfd_get_mtime (bfd *abfd);
1118 long bfd_get_size (bfd *abfd);
1131 /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
1134 /* The next section in the list belonging to the BFD, or NULL. */
1137 /* The previous section in the list belonging to the BFD, or NULL. */
1368 user_set_vma flag is maintained by bfd; if it's not set, the
1466 /* The BFD which owns the section. */
1467 bfd *owner;
1483 /* These sections are global, and are managed by BFD. The application
1515 /* Macros to handle insertion and deletion of a bfd's sections. These
1538 bfd *_abfd = ABFD; \
1557 bfd *_abfd = ABFD; \
1643 void bfd_section_list_clear (bfd *);
1645 asection *bfd_get_section_by_name (bfd *abfd, const char *name);
1648 (bfd *abfd,
1650 bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
1654 (bfd *abfd, const char *templat, int *count);
1656 asection *bfd_make_section_old_way (bfd *abfd, const char *name);
1659 (bfd *abfd, const char *name, flagword flags);
1661 asection *bfd_make_section_anyway (bfd *abfd, const char *name);
1664 (bfd *, const char *name, flagword flags);
1666 asection *bfd_make_section (bfd *, const char *name);
1669 (bfd *abfd, asection *sec, flagword flags);
1672 (bfd *abfd,
1673 void (*func) (bfd *abfd, asection *sect, void *obj),
1677 (bfd *abfd,
1678 bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
1682 (bfd *abfd, asection *sec, bfd_size_type val);
1685 (bfd *abfd, asection *section, const void *data,
1689 (bfd *abfd, asection *section, void *location, file_ptr offset,
1693 (bfd *abfd, asection *section, bfd_byte **buf);
1696 (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
1701 bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
1703 bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
2051 const char *bfd_printable_name (bfd *abfd);
2058 (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
2060 void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
2062 enum bfd_architecture bfd_get_arch (bfd *abfd);
2064 unsigned long bfd_get_mach (bfd *abfd);
2066 unsigned int bfd_arch_bits_per_byte (bfd *abfd);
2068 unsigned int bfd_arch_bits_per_address (bfd *abfd);
2070 const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
2078 unsigned int bfd_octets_per_byte (bfd *abfd);
2194 (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
2195 bfd *, char **);
2282 (bfd *abfd,
2286 bfd *output_bfd,
2290 (bfd *abfd,
4295 (bfd *abfd, bfd_reloc_code_real_type code);
4303 /* A pointer to the BFD which owns the symbol. This information
4311 these globals be per-bfd (or per-target-flavor). FIXME. */
4312 struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
4373 by the target BFD part to convey this information. */
4428 bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
4430 bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
4435 bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
4444 (bfd *abfd, asymbol **location, unsigned int count);
4446 void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
4451 asymbol *_bfd_generic_make_empty_symbol (bfd *);
4463 (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
4469 /* Extracted from bfd.c. */
4470 struct bfd
4472 /* A unique identifier of the BFD */
4475 /* The filename the application opened the BFD with. */
4482 to the file backing the BFD. */
4491 BFD was opened. This is used to select which matching algorithm
4497 struct bfd *lru_prev, *lru_next;
4499 /* When a file is closed by the caching routines, BFD retains
4516 /* The format which belongs to the BFD. (object, core, etc.) */
4519 /* The direction with which the BFD was opened. */
4560 /* Symbol table for output BFD (with symcount entries). */
4569 /* Flag set if symbols from this BFD should not be exported. */
4574 struct bfd *my_archive; /* The containing archive BFD. */
4575 struct bfd *next; /* The next BFD in the archive. */
4576 struct bfd *archive_head; /* The first BFD in the archive. */
4579 /* A chain of BFD structures involved in a link. */
4580 struct bfd *link_next;
4630 /* Where all the allocated stuff under this BFD goes. This is a
4678 long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
4681 (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
4684 (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
4686 bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
4688 int bfd_get_arch_size (bfd *abfd);
4690 int bfd_get_sign_extend_vma (bfd *abfd);
4692 bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
4694 unsigned int bfd_get_gp_size (bfd *abfd);
4696 void bfd_set_gp_size (bfd *abfd, unsigned int i);
4700 bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
4705 bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
4710 bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
4715 bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
4805 (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
4808 bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
4822 bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
4824 void bfd_preserve_restore (bfd *, struct bfd_preserve *);
4826 void bfd_preserve_finish (bfd *, struct bfd_preserve *);
4838 (bfd *abfd, symindex previous, carsym **sym);
4840 bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
4842 bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
4845 const char *bfd_core_file_failing_command (bfd *abfd);
4847 int bfd_core_file_failing_signal (bfd *abfd);
4850 (bfd *core_bfd, bfd *exec_bfd);
4853 (bfd *core_bfd, bfd *exec_bfd);
4856 #define BFD_SEND(bfd, message, arglist) \
4857 ((*((bfd)->xvec->message)) arglist)
4861 #define BFD_SEND(bfd, message, arglist) \
4862 (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
4863 ((*((bfd)->xvec->message)) arglist) : \
4866 #define BFD_SEND_FMT(bfd, message, arglist) \
4867 (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
4871 #define BFD_SEND_FMT(bfd, message, arglist) \
4872 (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
4873 (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
4943 other entry points, since they don't take a BFD as the first argument.
4970 const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
4973 bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
4976 bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
4987 /* Called when the BFD is being closed to do any necessary cleanup. */
4988 bfd_boolean (*_close_and_cleanup) (bfd *);
4989 /* Ask the BFD to free all cached information. */
4990 bfd_boolean (*_bfd_free_cached_info) (bfd *);
4992 bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
4995 (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
4997 (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
5010 /* Called to copy BFD general private data from one object file
5012 bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
5013 /* Called to merge BFD general private data from one object file
5015 bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
5016 /* Called to initialize BFD private section data from one object file
5021 (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *);
5022 /* Called to copy BFD private section data from one object file
5025 (bfd *, sec_ptr, bfd *, sec_ptr);
5026 /* Called to copy BFD private symbol data from one symbol
5029 (bfd *, asymbol *, bfd *, asymbol *);
5030 /* Called to copy BFD private header data from one object file
5033 (bfd *, bfd *);
5035 bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
5037 /* Called to print private BFD data. */
5038 bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
5046 char * (*_core_file_failing_command) (bfd *);
5047 int (*_core_file_failing_signal) (bfd *);
5048 bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
5063 bfd_boolean (*_bfd_slurp_armap) (bfd *);
5064 bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
5066 (bfd *, char **, bfd_size_type *, const char **);
5067 void (*_bfd_truncate_arname) (bfd *, const char *, char *);
5069 (bfd *, unsigned int, struct orl *, unsigned int, int);
5070 void * (*_bfd_read_ar_hdr_fn) (bfd *);
5071 bfd * (*openr_next_archived_file) (bfd *, bfd *);
5073 bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
5074 int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
5075 bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
5094 long (*_bfd_get_symtab_upper_bound) (bfd *);
5096 (bfd *, struct bfd_symbol **);
5098 (*_bfd_make_empty_symbol) (bfd *);
5100 (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
5103 (bfd *, struct bfd_symbol *, symbol_info *);
5105 bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
5106 bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
5107 alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
5109 (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
5112 (bfd *, struct bfd_symbol **, struct bfd_symbol *,
5115 (bfd *, const char **, const char **, unsigned int *);
5117 while using BFD for everything else. Currently used by the assembler
5120 (bfd *, void *, unsigned long size);
5124 (bfd *, bfd_boolean, void **, unsigned int *);
5128 (bfd *, bfd_boolean, const void *, asymbol *);
5136 long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
5138 (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
5141 (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
5149 (bfd *, enum bfd_architecture, unsigned long);
5151 (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
5170 int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
5172 (bfd *, struct bfd_link_info *, struct bfd_link_order *,
5176 (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
5181 (*_bfd_link_hash_table_create) (bfd *);
5187 bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
5193 section of the BFD. */
5194 bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
5197 bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
5200 bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
5203 bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
5206 bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
5209 bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
5213 void (*_section_already_linked) (bfd *, struct bfd_section *,
5225 long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
5228 (bfd *, struct bfd_symbol **);
5231 (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
5234 long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
5237 (bfd *, arelent **, struct bfd_symbol **);
5250 const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
5259 bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
5262 (bfd *abfd, bfd_format format, char ***matching);
5264 bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
5269 bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
5274 void bfd_section_already_linked (bfd *abfd, asection *sec,
5282 (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);