Subversion Repositories Kolibri OS

Rev

Rev 5197 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5197 Rev 6324
Line 1... Line 1...
1
/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
1
/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
2
   generated from "libcoff-in.h" and "coffcode.h".
2
   generated from "libcoff-in.h" and "coffcode.h".
3
   Run "make headers" in your build bfd/ to regenerate.  */
3
   Run "make headers" in your build bfd/ to regenerate.  */
Line 4... Line 4...
4
 
4
 
5
/* BFD COFF object file private structure.
5
/* BFD COFF object file private structure.
6
   Copyright 1990-2013 Free Software Foundation, Inc.
6
   Copyright (C) 1990-2015 Free Software Foundation, Inc.
Line 7... Line 7...
7
   Written by Cygnus Support.
7
   Written by Cygnus Support.
Line 8... Line 8...
8
 
8
 
Line 22... Line 22...
22
   along with this program; if not, write to the Free Software
22
   along with this program; if not, write to the Free Software
23
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
24
   MA 02110-1301, USA.  */
24
   MA 02110-1301, USA.  */
Line 25... Line 25...
25
 
25
 
-
 
26
#include "bfdlink.h"
-
 
27
#include "coff-bfd.h"
-
 
28
 
-
 
29
#ifdef __cplusplus
-
 
30
extern "C" {
Line 26... Line 31...
26
#include "bfdlink.h"
31
#endif
Line 27... Line 32...
27
 
32
 
28
/* Object file tdata; access macros.  */
33
/* Object file tdata; access macros.  */
Line 37... Line 42...
37
#define obj_convert(bfd)	      (coff_data (bfd)->conversion_table)
42
#define obj_convert(bfd)	      (coff_data (bfd)->conversion_table)
38
#define obj_conv_table_size(bfd)      (coff_data (bfd)->conv_table_size)
43
#define obj_conv_table_size(bfd)      (coff_data (bfd)->conv_table_size)
39
#define obj_coff_external_syms(bfd)   (coff_data (bfd)->external_syms)
44
#define obj_coff_external_syms(bfd)   (coff_data (bfd)->external_syms)
40
#define obj_coff_keep_syms(bfd)	      (coff_data (bfd)->keep_syms)
45
#define obj_coff_keep_syms(bfd)	      (coff_data (bfd)->keep_syms)
41
#define obj_coff_strings(bfd)	      (coff_data (bfd)->strings)
46
#define obj_coff_strings(bfd)	      (coff_data (bfd)->strings)
-
 
47
#define obj_coff_strings_len(bfd)     (coff_data (bfd)->strings_len)
42
#define obj_coff_keep_strings(bfd)    (coff_data (bfd)->keep_strings)
48
#define obj_coff_keep_strings(bfd)    (coff_data (bfd)->keep_strings)
43
#define obj_coff_sym_hashes(bfd)      (coff_data (bfd)->sym_hashes)
49
#define obj_coff_sym_hashes(bfd)      (coff_data (bfd)->sym_hashes)
44
#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written)
50
#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written)
45
#define obj_coff_local_toc_table(bfd) (coff_data (bfd)->local_toc_sym_map)
51
#define obj_coff_local_toc_table(bfd) (coff_data (bfd)->local_toc_sym_map)
Line 55... Line 61...
55
 
61
 
56
  struct coff_ptr_struct *raw_syments;
62
  struct coff_ptr_struct *raw_syments;
Line 57... Line 63...
57
  unsigned long raw_syment_count;
63
  unsigned long raw_syment_count;
58
 
64
 
Line 59... Line 65...
59
  /* These are only valid once writing has begun.  */
65
  /* These are only valid once writing has begun.  */
60
  long int relocbase;
66
  unsigned long int relocbase;
61
 
67
 
62
  /* These members communicate important constants about the symbol table
68
  /* These members communicate important constants about the symbol table
Line 77... Line 83...
77
  bfd_boolean keep_syms;
83
  bfd_boolean keep_syms;
Line 78... Line 84...
78
 
84
 
79
  /* The string table.  May be NULL.  Read by
85
  /* The string table.  May be NULL.  Read by
80
     _bfd_coff_read_string_table.  */
86
     _bfd_coff_read_string_table.  */
-
 
87
  char *strings;
-
 
88
  /* The length of the strings table.  For error checking.  */
81
  char *strings;
89
  bfd_size_type strings_len;
82
  /* If this is TRUE, the strings may not be freed.  */
90
  /* If this is TRUE, the strings may not be freed.  */
83
  bfd_boolean keep_strings;
91
  bfd_boolean keep_strings;
84
  /* If this is TRUE, the strings have been written out already.  */
92
  /* If this is TRUE, the strings have been written out already.  */
Line 121... Line 129...
121
  int has_reloc_section;
129
  int has_reloc_section;
122
  int dont_strip_reloc;
130
  int dont_strip_reloc;
123
  bfd_boolean insert_timestamp;
131
  bfd_boolean insert_timestamp;
124
  bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
132
  bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
125
  flagword real_flags;
133
  flagword real_flags;
-
 
134
 
-
 
135
  /* Build-id info.  */
-
 
136
  struct
-
 
137
  {
-
 
138
    bfd_boolean (*after_write_object_contents) (bfd *);
-
 
139
    const char *style;
-
 
140
    asection *sec;
-
 
141
  } build_id;
126
} pe_data_type;
142
} pe_data_type;
Line 127... Line 143...
127
 
143
 
Line 128... Line 144...
128
#define pe_data(bfd)		((bfd)->tdata.pe_obj_data)
144
#define pe_data(bfd)		((bfd)->tdata.pe_obj_data)
Line 178... Line 194...
178
 
194
 
179
/* We take the address of the first element of an asymbol to ensure that the
195
/* We take the address of the first element of an asymbol to ensure that the
180
   macro is only ever applied to an asymbol.  */
196
   macro is only ever applied to an asymbol.  */
Line 181... Line -...
181
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
-
 
182
 
-
 
183
/* The used_by_bfd field of a section may be set to a pointer to this
-
 
184
   structure.  */
-
 
185
 
-
 
186
struct coff_section_tdata
-
 
187
{
-
 
188
  /* The relocs, swapped into COFF internal form.  This may be NULL.  */
-
 
189
  struct internal_reloc *relocs;
-
 
190
  /* If this is TRUE, the relocs entry may not be freed.  */
-
 
191
  bfd_boolean keep_relocs;
-
 
192
  /* The section contents.  This may be NULL.  */
-
 
193
  bfd_byte *contents;
-
 
194
  /* If this is TRUE, the contents entry may not be freed.  */
-
 
195
  bfd_boolean keep_contents;
-
 
196
  /* Information cached by coff_find_nearest_line.  */
-
 
197
  bfd_vma offset;
-
 
198
  unsigned int i;
-
 
199
  const char *function;
-
 
200
  /* Optional information about a COMDAT entry; NULL if not COMDAT. */
-
 
201
  struct coff_comdat_info *comdat;
-
 
202
  int line_base;
-
 
203
  /* A pointer used for .stab linking optimizations.  */
-
 
204
  void * stab_info;
-
 
205
  /* Available for individual backends.  */
-
 
206
  void * tdata;
-
 
207
};
-
 
208
 
-
 
209
/* An accessor macro for the coff_section_tdata structure.  */
-
 
210
#define coff_section_data(abfd, sec) \
-
 
211
  ((struct coff_section_tdata *) (sec)->used_by_bfd)
197
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
Line 212... Line 198...
212
 
198
 
213
/* Tdata for sections in XCOFF files.  This is used by the linker.  */
199
/* Tdata for sections in XCOFF files.  This is used by the linker.  */
214
 
200
 
Line 281... Line 267...
281
  struct bfd_link_hash_table root;
267
  struct bfd_link_hash_table root;
282
  /* A pointer to information used to link stabs in sections.  */
268
  /* A pointer to information used to link stabs in sections.  */
283
  struct stab_info stab_info;
269
  struct stab_info stab_info;
284
};
270
};
Line -... Line 271...
-
 
271
 
-
 
272
struct coff_reloc_cookie
-
 
273
{
-
 
274
  struct internal_reloc *         rels;
-
 
275
  struct internal_reloc *         rel;
-
 
276
  struct internal_reloc *         relend;
-
 
277
  struct coff_symbol_struct *     symbols;	/* Symtab for input bfd.  */
-
 
278
  bfd *                           abfd;
-
 
279
  struct coff_link_hash_entry **  sym_hashes;
-
 
280
};
285
 
281
 
Line 286... Line 282...
286
/* Look up an entry in a COFF linker hash table.  */
282
/* Look up an entry in a COFF linker hash table.  */
287
 
283
 
288
#define coff_link_hash_lookup(table, string, create, copy, follow)	\
284
#define coff_link_hash_lookup(table, string, create, copy, follow)	\
Line 311... Line 307...
311
  (bfd *);
307
  (bfd *);
312
extern long coff_canonicalize_symtab
308
extern long coff_canonicalize_symtab
313
  (bfd *, asymbol **);
309
  (bfd *, asymbol **);
314
extern int coff_count_linenumbers
310
extern int coff_count_linenumbers
315
  (bfd *);
311
  (bfd *);
316
extern struct coff_symbol_struct *coff_symbol_from
-
 
317
  (bfd *, asymbol *);
-
 
318
extern bfd_boolean coff_renumber_symbols
312
extern bfd_boolean coff_renumber_symbols
319
  (bfd *, int *);
313
  (bfd *, int *);
320
extern void coff_mangle_symbols
314
extern void coff_mangle_symbols
321
  (bfd *);
315
  (bfd *);
322
extern bfd_boolean coff_write_symbols
316
extern bfd_boolean coff_write_symbols
Line 344... Line 338...
344
  (bfd *);
338
  (bfd *);
345
extern void coff_print_symbol
339
extern void coff_print_symbol
346
  (bfd *, void * filep, asymbol *, bfd_print_symbol_type);
340
  (bfd *, void * filep, asymbol *, bfd_print_symbol_type);
347
extern void coff_get_symbol_info
341
extern void coff_get_symbol_info
348
  (bfd *, asymbol *, symbol_info *ret);
342
  (bfd *, asymbol *, symbol_info *ret);
-
 
343
#define coff_get_symbol_version_string \
-
 
344
  _bfd_nosymbols_get_symbol_version_string
349
extern bfd_boolean _bfd_coff_is_local_label_name
345
extern bfd_boolean _bfd_coff_is_local_label_name
350
  (bfd *, const char *);
346
  (bfd *, const char *);
351
extern asymbol *coff_bfd_make_debug_symbol
347
extern asymbol *coff_bfd_make_debug_symbol
352
  (bfd *, void *, unsigned long);
348
  (bfd *, void *, unsigned long);
353
extern bfd_boolean coff_find_nearest_line
349
extern bfd_boolean coff_find_nearest_line
354
  (bfd *, asection *, asymbol **, bfd_vma, const char **,
350
  (bfd *, asymbol **, asection *, bfd_vma,
355
   const char **, unsigned int *);
351
   const char **, const char **, unsigned int *, unsigned int *);
356
extern bfd_boolean coff_find_nearest_line_discriminator
352
#define coff_find_line _bfd_nosymbols_find_line
357
  (bfd *, asection *, asymbol **, bfd_vma, const char **,
-
 
358
   const char **, unsigned int *, unsigned int *);
-
 
359
struct dwarf_debug_section;
353
struct dwarf_debug_section;
360
extern bfd_boolean coff_find_nearest_line_with_names
354
extern bfd_boolean coff_find_nearest_line_with_names
361
  (bfd *, const struct dwarf_debug_section *, asection *, asymbol **,
355
  (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **,
362
   bfd_vma, const char **, const char **, unsigned int *);
356
   unsigned int *, const struct dwarf_debug_section *);
363
extern bfd_boolean coff_find_inliner_info
357
extern bfd_boolean coff_find_inliner_info
364
  (bfd *, const char **, const char **, unsigned int *);
358
  (bfd *, const char **, const char **, unsigned int *);
365
extern int coff_sizeof_headers
359
extern int coff_sizeof_headers
366
  (bfd *, struct bfd_link_info *);
360
  (bfd *, struct bfd_link_info *);
367
extern bfd_boolean bfd_coff_reloc16_relax_section
361
extern bfd_boolean bfd_coff_reloc16_relax_section
Line 580... Line 574...
580
extern bfd_boolean _bfd_coff_link_input_bfd
574
extern bfd_boolean _bfd_coff_link_input_bfd
581
  (struct coff_final_link_info *, bfd *);
575
  (struct coff_final_link_info *, bfd *);
582
extern bfd_boolean _bfd_coff_reloc_link_order
576
extern bfd_boolean _bfd_coff_reloc_link_order
583
  (bfd *, struct coff_final_link_info *, asection *,
577
  (bfd *, struct coff_final_link_info *, asection *,
584
   struct bfd_link_order *);
578
   struct bfd_link_order *);
-
 
579
extern bfd_boolean bfd_coff_gc_sections
-
 
580
  (bfd *, struct bfd_link_info *);
Line 585... Line 581...
585
 
581
 
586
 
582
 
Line 597... Line 593...
597
  (bfd *);
593
  (bfd *);
598
extern long _bfd_xcoff_canonicalize_dynamic_reloc
594
extern long _bfd_xcoff_canonicalize_dynamic_reloc
599
  (bfd *, arelent **, asymbol **);
595
  (bfd *, arelent **, asymbol **);
600
extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create
596
extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create
601
  (bfd *);
597
  (bfd *);
602
extern void _bfd_xcoff_bfd_link_hash_table_free
-
 
603
  (struct bfd_link_hash_table *);
-
 
604
extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols
598
extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols
605
  (bfd *, struct bfd_link_info *);
599
  (bfd *, struct bfd_link_info *);
606
extern bfd_boolean _bfd_xcoff_bfd_final_link
600
extern bfd_boolean _bfd_xcoff_bfd_final_link
607
  (bfd *, struct bfd_link_info *);
601
  (bfd *, struct bfd_link_info *);
608
extern bfd_boolean _bfd_xcoff_define_common_symbol
602
extern bfd_boolean _bfd_xcoff_define_common_symbol
Line 617... Line 611...
617
extern bfd_boolean ppc_allocate_toc_section
611
extern bfd_boolean ppc_allocate_toc_section
618
  (struct bfd_link_info *);
612
  (struct bfd_link_info *);
619
extern bfd_boolean ppc_process_before_allocation
613
extern bfd_boolean ppc_process_before_allocation
620
  (bfd *, struct bfd_link_info *);
614
  (bfd *, struct bfd_link_info *);
621
/* Extracted from coffcode.h.  */
615
/* Extracted from coffcode.h.  */
-
 
616
 
622
typedef struct coff_ptr_struct
617
typedef struct coff_ptr_struct
623
{
618
{
624
  /* Remembers the offset from the first symbol in the file for
619
  /* Remembers the offset from the first symbol in the file for
625
     this symbol. Generated by coff_renumber_symbols. */
620
     this symbol. Generated by coff_renumber_symbols. */
626
  unsigned int offset;
621
  unsigned int offset;
Line 650... Line 645...
650
  union
645
  union
651
  {
646
  {
652
    union internal_auxent auxent;
647
    union internal_auxent auxent;
653
    struct internal_syment syment;
648
    struct internal_syment syment;
654
  } u;
649
  } u;
-
 
650
 
-
 
651
 /* Selector for the union above.  */
-
 
652
 bfd_boolean is_sym;
655
} combined_entry_type;
653
} combined_entry_type;
Line 656... Line 654...
656
 
654
 
Line 685... Line 683...
685
  COFF_SYMBOL_LOCAL,
683
  COFF_SYMBOL_LOCAL,
686
  /* PE section symbol.  */
684
  /* PE section symbol.  */
687
  COFF_SYMBOL_PE_SECTION
685
  COFF_SYMBOL_PE_SECTION
688
};
686
};
Line -... Line 687...
-
 
687
 
-
 
688
typedef asection * (*coff_gc_mark_hook_fn)
-
 
689
  (asection *, struct bfd_link_info *, struct internal_reloc *,
-
 
690
   struct coff_link_hash_entry *, struct internal_syment *);
689
 
691
 
690
typedef struct
692
typedef struct
691
{
693
{
692
  void (*_bfd_coff_swap_aux_in)
694
  void (*_bfd_coff_swap_aux_in)
Line 734... Line 736...
734
    (bfd *, int);
736
    (bfd *, int);
Line 735... Line 737...
735
 
737
 
736
  unsigned int _bfd_coff_default_section_alignment_power;
738
  unsigned int _bfd_coff_default_section_alignment_power;
737
  bfd_boolean _bfd_coff_force_symnames_in_strings;
739
  bfd_boolean _bfd_coff_force_symnames_in_strings;
-
 
740
  unsigned int _bfd_coff_debug_string_prefix_length;
Line 738... Line 741...
738
  unsigned int _bfd_coff_debug_string_prefix_length;
741
  unsigned int _bfd_coff_max_nscns;
739
 
742
 
Line 740... Line 743...
740
  void (*_bfd_coff_swap_filehdr_in)
743
  void (*_bfd_coff_swap_filehdr_in)
Line 871... Line 874...
871
  (coff_backend_info (abfd)->_bfd_coff_long_section_names)
874
  (coff_backend_info (abfd)->_bfd_coff_long_section_names)
872
#define bfd_coff_set_long_section_names(abfd, enable) \
875
#define bfd_coff_set_long_section_names(abfd, enable) \
873
  ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable))
876
  ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable))
874
#define bfd_coff_default_section_alignment_power(abfd) \
877
#define bfd_coff_default_section_alignment_power(abfd) \
875
  (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
878
  (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
-
 
879
#define bfd_coff_max_nscns(abfd) \
-
 
880
  (coff_backend_info (abfd)->_bfd_coff_max_nscns)
-
 
881
 
876
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
882
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
877
  ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
883
  ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
Line 878... Line 884...
878
 
884
 
879
#define bfd_coff_swap_aouthdr_in(abfd, i,o) \
885
#define bfd_coff_swap_aouthdr_in(abfd, i,o) \
Line 963... Line 969...
963
 
969
 
964
/* Macro: Returns true if the bfd is a PE executable as opposed to a
970
/* Macro: Returns true if the bfd is a PE executable as opposed to a
965
   PE object file.  */
971
   PE object file.  */
966
#define bfd_pei_p(abfd) \
972
#define bfd_pei_p(abfd) \
-
 
973
  (CONST_STRNEQ ((abfd)->xvec->name, "pei-"))
-
 
974
#ifdef __cplusplus
-
 
975
}