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

📄 bfd.h

📁 MinGW+MSYS必备的开发工具链
💻 H
📖 第 1 页 / 共 5 页
字号:
  /* Points to the kept section if this section is a link-once section,     and is discarded.  */  struct bfd_section *kept_section;  /* When a section is being output, this value changes as more     linenumbers are written out.  */  file_ptr moving_line_filepos;  /* What the section number is in the target world.  */  int target_index;  void *used_by_bfd;  /* If this is a constructor section then here is a list of the     relocations created to relocate items within it.  */  struct relent_chain *constructor_chain;  /* The BFD which owns the section.  */  bfd *owner;  /* A symbol which points at this section only.  */  struct bfd_symbol *symbol;  struct bfd_symbol **symbol_ptr_ptr;  /* Early in the link process, map_head and map_tail are used to build     a list of input sections attached to an output section.  Later,     output sections use these fields for a list of bfd_link_order     structs.  */  union {    struct bfd_link_order *link_order;    struct bfd_section *s;  } map_head, map_tail;} asection;/* These sections are global, and are managed by BFD.  The application   and target back end are not permitted to change the values in   these sections.  New code should use the section_ptr macros rather   than referring directly to the const sections.  The const sections   may eventually vanish.  */#define BFD_ABS_SECTION_NAME "*ABS*"#define BFD_UND_SECTION_NAME "*UND*"#define BFD_COM_SECTION_NAME "*COM*"#define BFD_IND_SECTION_NAME "*IND*"/* The absolute section.  */extern asection bfd_abs_section;#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)/* Pointer to the undefined section.  */extern asection bfd_und_section;#define bfd_und_section_ptr ((asection *) &bfd_und_section)#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)/* Pointer to the common section.  */extern asection bfd_com_section;#define bfd_com_section_ptr ((asection *) &bfd_com_section)/* Pointer to the indirect section.  */extern asection bfd_ind_section;#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)#define bfd_is_const_section(SEC)              \ (   ((SEC) == bfd_abs_section_ptr)            \  || ((SEC) == bfd_und_section_ptr)            \  || ((SEC) == bfd_com_section_ptr)            \  || ((SEC) == bfd_ind_section_ptr))/* Macros to handle insertion and deletion of a bfd's sections.  These   only handle the list pointers, ie. do not adjust section_count,   target_index etc.  */#define bfd_section_list_remove(ABFD, S) \  do                                                   \    {                                                  \      asection *_s = S;                                \      asection *_next = _s->next;                      \      asection *_prev = _s->prev;                      \      if (_prev)                                       \        _prev->next = _next;                           \      else                                             \        (ABFD)->sections = _next;                      \      if (_next)                                       \        _next->prev = _prev;                           \      else                                             \        (ABFD)->section_last = _prev;                  \    }                                                  \  while (0)#define bfd_section_list_append(ABFD, S) \  do                                                   \    {                                                  \      asection *_s = S;                                \      bfd *_abfd = ABFD;                               \      _s->next = NULL;                                 \      if (_abfd->section_last)                         \        {                                              \          _s->prev = _abfd->section_last;              \          _abfd->section_last->next = _s;              \        }                                              \      else                                             \        {                                              \          _s->prev = NULL;                             \          _abfd->sections = _s;                        \        }                                              \      _abfd->section_last = _s;                        \    }                                                  \  while (0)#define bfd_section_list_prepend(ABFD, S) \  do                                                   \    {                                                  \      asection *_s = S;                                \      bfd *_abfd = ABFD;                               \      _s->prev = NULL;                                 \      if (_abfd->sections)                             \        {                                              \          _s->next = _abfd->sections;                  \          _abfd->sections->prev = _s;                  \        }                                              \      else                                             \        {                                              \          _s->next = NULL;                             \          _abfd->section_last = _s;                    \        }                                              \      _abfd->sections = _s;                            \    }                                                  \  while (0)#define bfd_section_list_insert_after(ABFD, A, S) \  do                                                   \    {                                                  \      asection *_a = A;                                \      asection *_s = S;                                \      asection *_next = _a->next;                      \      _s->next = _next;                                \      _s->prev = _a;                                   \      _a->next = _s;                                   \      if (_next)                                       \        _next->prev = _s;                              \      else                                             \        (ABFD)->section_last = _s;                     \    }                                                  \  while (0)#define bfd_section_list_insert_before(ABFD, B, S) \  do                                                   \    {                                                  \      asection *_b = B;                                \      asection *_s = S;                                \      asection *_prev = _b->prev;                      \      _s->prev = _prev;                                \      _s->next = _b;                                   \      _b->prev = _s;                                   \      if (_prev)                                       \        _prev->next = _s;                              \      else                                             \        (ABFD)->sections = _s;                         \    }                                                  \  while (0)#define bfd_section_removed_from_list(ABFD, S) \  ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX)                   \  /* name, id,  index, next, prev, flags, user_set_vma,            */  \  { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                           \                                                                       \  /* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh,      */  \     0,           0,                1,       0,                        \                                                                       \  /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc,       */  \     0,            0,             0,          0,                       \                                                                       \  /* has_gp_reloc, need_finalize_relax, reloc_done,                */  \     0,            0,                   0,                             \                                                                       \  /* vma, lma, size, rawsize                                       */  \     0,   0,   0,    0,                                                \                                                                       \  /* output_offset, output_section,              alignment_power,  */  \     0,             (struct bfd_section *) &SEC, 0,                    \                                                                       \  /* relocation, orelocation, reloc_count, filepos, rel_filepos,   */  \     NULL,       NULL,        0,           0,       0,                 \                                                                       \  /* line_filepos, userdata, contents, lineno, lineno_count,       */  \     0,            NULL,     NULL,     NULL,   0,                      \                                                                       \  /* entsize, kept_section, moving_line_filepos,                    */ \     0,       NULL,          0,                                        \                                                                       \  /* target_index, used_by_bfd, constructor_chain, owner,          */  \     0,            NULL,        NULL,              NULL,               \                                                                       \  /* symbol,                    symbol_ptr_ptr,                    */  \     (struct bfd_symbol *) SYM, &SEC.symbol,                           \                                                                       \  /* map_head, map_tail                                            */  \     { NULL }, { NULL }                                                \    }void bfd_section_list_clear (bfd *);asection *bfd_get_section_by_name (bfd *abfd, const char *name);asection *bfd_get_section_by_name_if   (bfd *abfd,    const char *name,    bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),    void *obj);char *bfd_get_unique_section_name   (bfd *abfd, const char *templat, int *count);asection *bfd_make_section_old_way (bfd *abfd, const char *name);asection *bfd_make_section_anyway_with_flags   (bfd *abfd, const char *name, flagword flags);asection *bfd_make_section_anyway (bfd *abfd, const char *name);asection *bfd_make_section_with_flags   (bfd *, const char *name, flagword flags);asection *bfd_make_section (bfd *, const char *name);bfd_boolean bfd_set_section_flags   (bfd *abfd, asection *sec, flagword flags);void bfd_map_over_sections   (bfd *abfd,    void (*func) (bfd *abfd, asection *sect, void *obj),    void *obj);asection *bfd_sections_find_if   (bfd *abfd,    bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),    void *obj);bfd_boolean bfd_set_section_size   (bfd *abfd, asection *sec, bfd_size_type val);bfd_boolean bfd_set_section_contents   (bfd *abfd, asection *section, const void *data,    file_ptr offset, bfd_size_type count);bfd_boolean bfd_get_section_contents   (bfd *abfd, asection *section, void *location, file_ptr offset,    bfd_size_type count);bfd_boolean bfd_malloc_and_get_section   (bfd *abfd, asection *section, bfd_byte **buf);bfd_boolean bfd_copy_private_section_data   (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \     BFD_SEND (obfd, _bfd_copy_private_section_data, \               (ibfd, isection, obfd, osection))bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);/* Extracted from archures.c.  */enum bfd_architecture{  bfd_arch_unknown,   /* File arch not known.  */  bfd_arch_obscure,   /* Arch known, not one of these.  */  bfd_arch_m68k,      /* Motorola 68xxx */#define bfd_mach_m68000 1#define bfd_mach_m68008 2#define bfd_mach_m68010 3#define bfd_mach_m68020 4#define bfd_mach_m68030 5#define bfd_mach_m68040 6#define bfd_mach_m68060 7#define bfd_mach_cpu32  8#define bfd_mach_mcf_isa_a_nodiv 9#define bfd_mach_mcf_isa_a 10#define bfd_mach_mcf_isa_a_mac 11#define bfd_mach_mcf_isa_a_emac 12#define bfd_mach_mcf_isa_aplus 13#define bfd_mach_mcf_isa_aplus_mac 14#define bfd_mach_mcf_isa_aplus_emac 15#define bfd_mach_mcf_isa_b_nousp 16#define bfd_mach_mcf_isa_b_nousp_mac 17#define bfd_mach_mcf_isa_b_nousp_emac 18#define bfd_mach_mcf_isa_b 19#define bfd_mach_mcf_isa_b_mac 20#define bfd_mach_mcf_isa_b_emac 21#define bfd_mach_mcf_isa_b_float 22#define bfd_mach_mcf_isa_b_float_mac 23#define bfd_mach_mcf_isa_b_float_emac 24  bfd_arch_vax,       /* DEC Vax */  bfd_arch_i960,      /* Intel 960 */    /* The order of the following is important.       lower number indicates a machine type that       only accepts a subset of the instructions       available to machines with higher numbers.       The exception is the "ca", which is       incompatible with all other machines except       "core".  */#define bfd_mach_i960_core      1#define bfd_mach_i960_ka_sa     2#define bfd_mach_i960_kb_sb     3#define bfd_mach_i960_mc        4#define bfd_mach_i960_xa        5#define bfd_mach_i960_ca        6#define bfd_mach_i960_jx        7#define bfd_mach_i960_hx        8  bfd_arch_or32,      /* OpenRISC 32 */  bfd_arch_sparc,     /* SPARC */#define bfd_mach_sparc                 1/* The difference between v8plus and v9 is that v9 is a true 64 bit env.  */#define bfd_mach_sparc_sparclet        2#define bfd_mach_sparc_sparclite       3#define bfd_mach_sparc_v8plus          4#define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns.  */#define bfd_mach_sparc_sparclite_le    6#define bfd_mach_sparc_v9              7#define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns.  */#define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns.  */#define bfd_mach_sparc_v9b             10 /* with cheetah add'ns.  *//* Nonzero if MACH has the v9 instruction set.  */#define bfd_mach_sparc_v9_p(mach) \  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \   && (mach) != bfd_mach_sparc_sparclite_le)/* Nonzero if MACH is a 64 bit sparc architecture.  */#define bfd_mach_sparc_64bit_p(mach) \  ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)  bfd_arch_mips,      /* MIPS Rxxxx */#define bfd_mach_mips3000              3000#define bfd_mach_mips3900              3900#define bfd_mach_mips4000              4000#define bfd_mach_mips4010              4010#define bfd_mach_mips4100              4100#define bfd_mach_mips4111              4111#define bfd_mach_mips4120              4120#define bfd_mach_mips4300              4300#define bfd_mach_mips4400              4400#define bfd_mach_mips4600              4600#define bfd_mach_mips4650              4650#define bfd_mach_mips5000              5000#define bfd_mach_mips5400              5400#define bfd_mach_mips5500              5500#define bfd_mach_mips6000              6000#define bfd_mach_mips7000              7000#define bfd_mach_mips8000              8000#define bfd_mach_mips9000              9000#define bfd_mach_mips10000             10000#define bfd_mach_mips12000             12000#define bfd_mach_mips16                16#define bfd_mach_mi

⌨️ 快捷键说明

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