📄 targets.c
字号:
.. SDEF(void, _bfd_coff_swap_sym_in,(. bfd *abfd ,. PTR ext,. PTR in));.. SDEF(void, _bfd_coff_swap_lineno_in, (. bfd *abfd,. PTR ext,. PTR in));.Special entry points for gas to swap coff parts. SDEF(unsigned int, _bfd_coff_swap_aux_out,(. bfd *abfd,. PTR in,. int type,. int class,. PTR ext));.. SDEF(unsigned int, _bfd_coff_swap_sym_out,(. bfd *abfd,. PTR in,. PTR ext));.. SDEF(unsigned int, _bfd_coff_swap_lineno_out,(. bfd *abfd,. PTR in,. PTR ext));.. SDEF(unsigned int, _bfd_coff_swap_reloc_out,(. bfd *abfd,. PTR src,. PTR dst));.. SDEF(unsigned int, _bfd_coff_swap_filehdr_out,(. bfd *abfd,. PTR in,. PTR out));.. SDEF(unsigned int, _bfd_coff_swap_aouthdr_out,(. bfd *abfd,. PTR in,. PTR out));.. SDEF(unsigned int, _bfd_coff_swap_scnhdr_out,(. bfd *abfd,. PTR in,. PTR out));.. {* See documentation on reloc types. *}. SDEF (CONST struct reloc_howto_struct *,. reloc_type_lookup,. (bfd *abfd, bfd_reloc_code_real_type code));.. {* Complete and utter crock, currently used for the assembler. when creating COFF files. *}. SDEF (asymbol *, _bfd_make_debug_symbol, (. bfd *abfd,. void *ptr,. unsigned long size));Data for use by back-end routines; e.g., for a.out, includes whetherthis particular target maps ZMAGIC files contiguously or with text anddata separated. Could perhaps also be used to eliminate some of theabove COFF-specific fields.. PTR backend_data;.} bfd_target;*//* The default is to define a target_vector containing all the targets. By setting MINIMIZE=1 on the "make" command line, the user can change this to a vector containing just DEFAULT_VECTOR and any required traditional-core-file handler. (This is to save space in the executables.) The config files can also override the default large vector by giving an explicit SELECT_VECS macro. */#if MINIMIZE && defined(DEFAULT_VECTOR) && !defined(SELECT_VECS)#ifdef TRAD_CORE#define SELECT_VECS &DEFAULT_VECTOR,&trad_core_vec#else#define SELECT_VECS &DEFAULT_VECTOR#endif#endif/* All known xvecs. They are listed a second time below, since we can't intermix extern's and initializers. */extern bfd_target ecoff_little_vec;extern bfd_target ecoff_big_vec;extern bfd_target sunos_big_vec;extern bfd_target demo_64_vec;extern bfd_target srec_vec;extern bfd_target tekhex_vec;extern bfd_target a_out_adobe_vec;extern bfd_target b_out_vec_little_host;extern bfd_target b_out_vec_big_host;extern bfd_target icoff_little_vec;extern bfd_target icoff_big_vec;extern bfd_target elf_little_vec;extern bfd_target elf_big_vec;extern bfd_target ieee_vec;extern bfd_target oasys_vec;extern bfd_target m88kbcs_vec;extern bfd_target m68kcoff_vec;extern bfd_target i386coff_vec;extern bfd_target i386aout_vec;extern bfd_target i386linux_vec;extern bfd_target a29kcoff_big_vec;extern bfd_target trad_core_vec;extern bfd_target rs6000coff_vec;extern bfd_target h8300coff_vec;extern bfd_target z8kcoff_vec;extern bfd_target we32kcoff_vec;#ifdef hp9000s800extern bfd_target hppa_vec;#endif#ifdef DEFAULT_VECTORextern bfd_target DEFAULT_VECTOR;#endif#ifdef SELECT_VECSbfd_target *target_vector[] = { SELECT_VECS, 0};#elsebfd_target *target_vector[] = {#ifdef DEFAULT_VECTOR &DEFAULT_VECTOR,#endif &i386coff_vec, &i386aout_vec, &ecoff_little_vec, &ecoff_big_vec, &ieee_vec,#if 0 /* We have no oasys tools anymore, so we can't test any of this anymore. If you want to test the stuff yourself, go ahead... steve@cygnus.com Worse, since there is no magic number for archives, there can annoying target mis-matches. */ &oasys_vec,#endif#if BSD >= 199103 &sparcbsd_big_vec,#endif &sunos_big_vec,#ifdef HOST_64_BIT &demo_64_vec, /* Only compiled if host has long-long support */#endif &h8300coff_vec, &z8kcoff_vec, &m88kbcs_vec, &srec_vec,/* &tekhex_vec,*/ &icoff_little_vec, &icoff_big_vec, &elf_little_vec, &elf_big_vec, &a_out_adobe_vec, &b_out_vec_little_host, &b_out_vec_big_host, &m68kcoff_vec, &a29kcoff_big_vec, &rs6000coff_vec,#ifdef hp9000s800 &hppa_vec,#endif &we32kcoff_vec,#ifdef TRAD_CORE &trad_core_vec,#endif NULL, /* end of list marker */};#endif/* default_vector[0] contains either the address of the default vector, if there is one, or zero if there isn't. */bfd_target *default_vector[] = {#ifdef DEFAULT_VECTOR &DEFAULT_VECTOR,#endif 0,};/*FUNCTION bfd_find_targetDESCRIPTION Returns a pointer to the transfer vector for the object target named target_name. If target_name is NULL, chooses the one in the environment variable GNUTARGET; if that is null or not defined thenthe first entry in the target list is chosen. Passing in the string "default" or setting the environment variable to "default" will cause the first entry in the target list to be returned, and "target_defaulted" will be set in the BFD. This causes <<bfd_check_format>> to loop over all the targets to find the one that matches the file being read. SYNOPSIS bfd_target *bfd_find_target(CONST char *, bfd *);*/bfd_target *DEFUN(bfd_find_target,(target_name, abfd), CONST char *target_name AND bfd *abfd){ bfd_target **target; extern char *getenv (); CONST char *targname = (target_name ? target_name : (CONST char *) getenv ("GNUTARGET")); /* This is safe; the vector cannot be null */ if (targname == NULL || !strcmp (targname, "default")) { abfd->target_defaulted = true; return abfd->xvec = target_vector[0]; } abfd->target_defaulted = false; for (target = &target_vector[0]; *target != NULL; target++) { if (!strcmp (targname, (*target)->name)) return abfd->xvec = *target; } bfd_error = invalid_target; return NULL;}/*FUNCTION bfd_target_listDESCRIPTION This function returns a freshly malloced NULL-terminated vector of the names of all the valid BFD targets. Do not modify the names SYNOPSIS CONST char **bfd_target_list(void);*/CONST char **DEFUN_VOID(bfd_target_list){ int vec_length= 0;#ifdef NATIVE_HPPAHPUX_COMPILER /* The native compiler on the HP9000/700 has a bug which causes it to loop endlessly when compiling this file. This avoids it. */ volatile#endif bfd_target **target; CONST char **name_list, **name_ptr; for (target = &target_vector[0]; *target != NULL; target++) vec_length++; name_ptr = name_list = (CONST char **) zalloc ((vec_length + 1) * sizeof (char **)); if (name_list == NULL) { bfd_error = no_memory; return NULL; } for (target = &target_vector[0]; *target != NULL; target++) *(name_ptr++) = (*target)->name; return name_list;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -