⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xcoff.h

📁 这个是LINUX下的GDB调度工具的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define XCOFF_NUMBER_OF_SPECIAL_SECTIONS 6#define XCOFF_SPECIAL_SECTION_TEXT       0#define XCOFF_SPECIAL_SECTION_ETEXT      1 #define XCOFF_SPECIAL_SECTION_DATA       2#define XCOFF_SPECIAL_SECTION_EDATA      3#define XCOFF_SPECIAL_SECTION_END        4#define XCOFF_SPECIAL_SECTION_END2       5struct xcoff_link_hash_table{  struct bfd_link_hash_table root;  /* The .debug string hash table.  We need to compute this while     reading the input files, so that we know how large the .debug     section will be before we assign section positions.  */  struct bfd_strtab_hash *debug_strtab;  /* The .debug section we will use for the final output.  */  asection *debug_section;  /* The .loader section we will use for the final output.  */  asection *loader_section;  /* A count of non TOC relative relocs which will need to be     allocated in the .loader section.  */  size_t ldrel_count;  /* The .loader section header.  */  struct internal_ldhdr ldhdr;  /* The .gl section we use to hold global linkage code.  */  asection *linkage_section;  /* The .tc section we use to hold toc entries we build for global     linkage code.  */  asection *toc_section;  /* The .ds section we use to hold function descriptors which we     create for exported symbols.  */  asection *descriptor_section;  /* The list of import files.  */  struct xcoff_import_file *imports;  /* Required alignment of sections within the output file.  */  unsigned long file_align;  /* Whether the .text section must be read-only.  */  bfd_boolean textro;  /* Whether garbage collection was done.  */  bfd_boolean gc;  /* A linked list of symbols for which we have size information.  */  struct xcoff_link_size_list  {    struct xcoff_link_size_list *next;    struct xcoff_link_hash_entry *h;    bfd_size_type size;  }   *size_list;  /* Magic sections: _text, _etext, _data, _edata, _end, end. */  asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS];};/* This structure is used to pass information through   xcoff_link_hash_traverse.  */struct xcoff_loader_info{  /* Set if a problem occurred.  */  bfd_boolean failed;  /* Output BFD.  */  bfd *output_bfd;  /* Link information structure.  */  struct bfd_link_info *info;  /* Whether all defined symbols should be exported.  */  bfd_boolean export_defineds;  /* Number of ldsym structures.  */  size_t ldsym_count;  /* Size of string table.  */  size_t string_size;  /* String table.  */  bfd_byte *strings;  /* Allocated size of string table.  */  size_t string_alc;};/* In case we're on a 32-bit machine, construct a 64-bit "-1" value   from smaller values.  Start with zero, widen, *then* decrement.  */#define MINUS_ONE       (((bfd_vma) 0) - 1)/* __rtinit, from /usr/include/rtinit.h.  */struct __rtinit {  /* Pointer to runtime linker.          XXX: Is the parameter really void?  */  int	(*rtl) (void);	  /* Offset to array of init functions, 0 if none. */  int	init_offset;  /* Offset to array of fini functions, 0 if none. */		     int	fini_offset;		  /* Size of __RTINIT_DESCRIPTOR. This value should be used instead of      sizeof(__RTINIT_DESCRIPTOR). */  int	__rtinit_descriptor_size; };#define RTINIT_DESCRIPTOR_SIZE (12)struct __rtinit_descriptor {  /* Init/fini function. */  int	f;  /* Offset, relative to the start of the __rtinit symbol, to name of the      function. */  int	name_offset;	  /* Flags */			     unsigned char	flags;	};/* Archive */#define XCOFFARMAG    "<aiaff>\012"#define XCOFFARMAGBIG "<bigaf>\012"#define SXCOFFARMAG   8/* The size of the ascii archive elements */#define XCOFFARMAG_ELEMENT_SIZE 12#define XCOFFARMAGBIG_ELEMENT_SIZE 20/* This terminates an XCOFF archive member name.  */#define XCOFFARFMAG "`\012"#define SXCOFFARFMAG 2/* XCOFF archives start with this (printable) structure.  */struct xcoff_ar_file_hdr{  /* Magic string.  */  char magic[SXCOFFARMAG];  /* Offset of the member table (decimal ASCII string).  */  char memoff[XCOFFARMAG_ELEMENT_SIZE];  /* Offset of the global symbol table (decimal ASCII string).  */  char symoff[XCOFFARMAG_ELEMENT_SIZE];  /* Offset of the first member in the archive (decimal ASCII string).  */  char firstmemoff[XCOFFARMAG_ELEMENT_SIZE];  /* Offset of the last member in the archive (decimal ASCII string).  */  char lastmemoff[XCOFFARMAG_ELEMENT_SIZE];  /* Offset of the first member on the free list (decimal ASCII     string).  */  char freeoff[XCOFFARMAG_ELEMENT_SIZE];};#define SIZEOF_AR_FILE_HDR (SXCOFFARMAG + 5 * XCOFFARMAG_ELEMENT_SIZE)/* This is the equivalent data structure for the big archive format.  */struct xcoff_ar_file_hdr_big{  /* Magic string.  */  char magic[SXCOFFARMAG];  /* Offset of the member table (decimal ASCII string).  */  char memoff[XCOFFARMAGBIG_ELEMENT_SIZE];  /* Offset of the global symbol table for 32-bit objects (decimal ASCII     string).  */  char symoff[XCOFFARMAGBIG_ELEMENT_SIZE];  /* Offset of the global symbol table for 64-bit objects (decimal ASCII     string).  */  char symoff64[XCOFFARMAGBIG_ELEMENT_SIZE];  /* Offset of the first member in the archive (decimal ASCII string).  */  char firstmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];  /* Offset of the last member in the archive (decimal ASCII string).  */  char lastmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];  /* Offset of the first member on the free list (decimal ASCII     string).  */  char freeoff[XCOFFARMAGBIG_ELEMENT_SIZE];};#define SIZEOF_AR_FILE_HDR_BIG (SXCOFFARMAG + 6 * XCOFFARMAGBIG_ELEMENT_SIZE)/* Each XCOFF archive member starts with this (printable) structure.  */struct xcoff_ar_hdr{  /* File size not including the header (decimal ASCII string).  */  char size[XCOFFARMAG_ELEMENT_SIZE];  /* File offset of next archive member (decimal ASCII string).  */  char nextoff[XCOFFARMAG_ELEMENT_SIZE];  /* File offset of previous archive member (decimal ASCII string).  */  char prevoff[XCOFFARMAG_ELEMENT_SIZE];  /* File mtime (decimal ASCII string).  */  char date[12];  /* File UID (decimal ASCII string).  */  char uid[12];  /* File GID (decimal ASCII string).  */  char gid[12];  /* File mode (octal ASCII string).  */  char mode[12];  /* Length of file name (decimal ASCII string).  */  char namlen[4];  /* This structure is followed by the file name.  The length of the     name is given in the namlen field.  If the length of the name is     odd, the name is followed by a null byte.  The name and optional     null byte are followed by XCOFFARFMAG, which is not included in     namlen.  The contents of the archive member follow; the number of     bytes is given in the size field.  */};#define SIZEOF_AR_HDR (3 * XCOFFARMAG_ELEMENT_SIZE + 4 * 12 + 4)/* The equivalent for the big archive format.  */struct xcoff_ar_hdr_big{  /* File size not including the header (decimal ASCII string).  */  char size[XCOFFARMAGBIG_ELEMENT_SIZE];  /* File offset of next archive member (decimal ASCII string).  */  char nextoff[XCOFFARMAGBIG_ELEMENT_SIZE];  /* File offset of previous archive member (decimal ASCII string).  */  char prevoff[XCOFFARMAGBIG_ELEMENT_SIZE];  /* File mtime (decimal ASCII string).  */  char date[12];  /* File UID (decimal ASCII string).  */  char uid[12];  /* File GID (decimal ASCII string).  */  char gid[12];  /* File mode (octal ASCII string).  */  char mode[12];  /* Length of file name (decimal ASCII string).  */  char namlen[4];  /* This structure is followed by the file name.  The length of the     name is given in the namlen field.  If the length of the name is     odd, the name is followed by a null byte.  The name and optional     null byte are followed by XCOFFARFMAG, which is not included in     namlen.  The contents of the archive member follow; the number of     bytes is given in the size field.  */};#define SIZEOF_AR_HDR_BIG (3 * XCOFFARMAGBIG_ELEMENT_SIZE + 4 * 12 + 4)/* We often have to distinguish between the old and big file format.   Make it a bit cleaner.  We can use `xcoff_ardata' here because the   `hdr' member has the same size and position in both formats.     <bigaf> is the default format, return TRUE even when xcoff_ardata is    NULL. */#ifndef SMALL_ARCHIVE/* Creates big archives by default */#define xcoff_big_format_p(abfd) \  ((NULL != bfd_ardata (abfd) && NULL == xcoff_ardata (abfd)) || \   ((NULL != bfd_ardata (abfd)) && \    (NULL != xcoff_ardata (abfd)) && \    (xcoff_ardata (abfd)->magic[1] == 'b')))#else/* Creates small archives by default. */#define xcoff_big_format_p(abfd) \  (((NULL != bfd_ardata (abfd)) && \    (NULL != xcoff_ardata (abfd)) && \    (xcoff_ardata (abfd)->magic[1] == 'b')))#endif/* We store a copy of the xcoff_ar_file_hdr in the tdata field of the   artdata structure.  Similar for the big archive.  */#define xcoff_ardata(abfd) \  ((struct xcoff_ar_file_hdr *) bfd_ardata (abfd)->tdata)#define xcoff_ardata_big(abfd) \  ((struct xcoff_ar_file_hdr_big *) bfd_ardata (abfd)->tdata)/* We store a copy of the xcoff_ar_hdr in the arelt_data field of an   archive element.  Similar for the big archive.  */#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))#define arch_xhdr(bfd) \  ((struct xcoff_ar_hdr *) arch_eltdata (bfd)->arch_header)#define arch_xhdr_big(bfd) \  ((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header)#endif /* _INTERNAL_XCOFF_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -