00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef __BFD_H_SEEN__
00038 #define __BFD_H_SEEN__
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044 #include "ansidecl.h"
00045 #include "symcat.h"
00046 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
00047 #ifndef SABER
00048
00049
00050
00051
00052
00053 #undef CONCAT4
00054 #define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
00055 #endif
00056 #endif
00057
00058
00059
00060
00061 #define BFD_ARCH_SIZE @wordsize@
00062
00063
00064 #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
00065
00066 #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
00067 #define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@
00068 #if @BFD_HOST_64_BIT_DEFINED@
00069 #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
00070 #define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
00071 typedef BFD_HOST_64_BIT bfd_int64_t;
00072 typedef BFD_HOST_U_64_BIT bfd_uint64_t;
00073 #endif
00074
00075 #if BFD_ARCH_SIZE >= 64
00076 #define BFD64
00077 #endif
00078
00079 #ifndef INLINE
00080 #if __GNUC__ >= 2
00081 #define INLINE __inline__
00082 #else
00083 #define INLINE
00084 #endif
00085 #endif
00086
00087
00088 typedef struct bfd bfd;
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 typedef int bfd_boolean;
00100 #undef FALSE
00101 #undef TRUE
00102 #define FALSE 0
00103 #define TRUE 1
00104
00105 #ifdef BFD64
00106
00107 #ifndef BFD_HOST_64_BIT
00108 #error No 64 bit integer type available
00109 #endif
00110
00111 typedef BFD_HOST_U_64_BIT bfd_vma;
00112 typedef BFD_HOST_64_BIT bfd_signed_vma;
00113 typedef BFD_HOST_U_64_BIT bfd_size_type;
00114 typedef BFD_HOST_U_64_BIT symvalue;
00115
00116 #ifndef fprintf_vma
00117 #if BFD_HOST_64BIT_LONG
00118 #define sprintf_vma(s,x) sprintf (s, "%016lx", x)
00119 #define fprintf_vma(f,x) fprintf (f, "%016lx", x)
00120 #else
00121 #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
00122 #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
00123 #define fprintf_vma(s,x) \
00124 fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
00125 #define sprintf_vma(s,x) \
00126 sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
00127 #endif
00128 #endif
00129
00130 #else
00131
00132
00133
00134
00135 typedef unsigned long bfd_vma;
00136
00137
00138
00139
00140
00141 typedef long bfd_signed_vma;
00142
00143 typedef unsigned long symvalue;
00144 typedef unsigned long bfd_size_type;
00145
00146
00147 #define fprintf_vma(s,x) fprintf (s, "%08lx", x)
00148 #define sprintf_vma(s,x) sprintf (s, "%08lx", x)
00149
00150 #endif
00151
00152 #ifndef BFD_HOST_64_BIT
00153
00154
00155
00156
00157 typedef bfd_signed_vma bfd_int64_t;
00158 typedef bfd_vma bfd_uint64_t;
00159 #endif
00160
00161
00162
00163 typedef @bfd_file_ptr@ file_ptr;
00164 typedef unsigned @bfd_file_ptr@ ufile_ptr;
00165
00166 extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
00167 extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
00168
00169 #define printf_vma(x) fprintf_vma(stdout,x)
00170 #define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
00171
00172 typedef unsigned int flagword;
00173 typedef unsigned char bfd_byte;
00174
00175
00176
00177 typedef enum bfd_format
00178 {
00179 bfd_unknown = 0,
00180 bfd_object,
00181 bfd_archive,
00182 bfd_core,
00183 bfd_type_end
00184 }
00185 bfd_format;
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195 #define BFD_NO_FLAGS 0x00
00196
00197
00198 #define HAS_RELOC 0x01
00199
00200
00201 #define EXEC_P 0x02
00202
00203
00204
00205 #define HAS_LINENO 0x04
00206
00207
00208 #define HAS_DEBUG 0x08
00209
00210
00211 #define HAS_SYMS 0x10
00212
00213
00214
00215 #define HAS_LOCALS 0x20
00216
00217
00218 #define DYNAMIC 0x40
00219
00220
00221
00222
00223 #define WP_TEXT 0x80
00224
00225
00226
00227 #define D_PAGED 0x100
00228
00229
00230
00231
00232 #define BFD_IS_RELAXABLE 0x200
00233
00234
00235
00236
00237
00238 #define BFD_TRADITIONAL_FORMAT 0x400
00239
00240
00241
00242 #define BFD_IN_MEMORY 0x800
00243
00244
00245 #define HAS_LOAD_PAGE 0x1000
00246
00247
00248
00249 #define BFD_LINKER_CREATED 0x2000
00250
00251
00252
00253
00254 typedef unsigned long symindex;
00255
00256
00257 typedef const struct reloc_howto_struct reloc_howto_type;
00258
00259 #define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
00260
00261
00262
00263
00264 #define bfd_get_section(x) ((x)->section)
00265 #define bfd_get_output_section(x) ((x)->section->output_section)
00266 #define bfd_set_section(x,y) ((x)->section) = (y)
00267 #define bfd_asymbol_base(x) ((x)->section->vma)
00268 #define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
00269 #define bfd_asymbol_name(x) ((x)->name)
00270
00271 #define bfd_asymbol_bfd(x) ((x)->the_bfd)
00272 #define bfd_asymbol_flavour(x) (bfd_asymbol_bfd(x)->xvec->flavour)
00273
00274
00275
00276 typedef struct carsym
00277 {
00278 char *name;
00279 file_ptr file_offset;
00280 }
00281 carsym;
00282
00283
00284
00285 struct orl
00286 {
00287 char **name;
00288 union
00289 {
00290 file_ptr pos;
00291 bfd *abfd;
00292 } u;
00293 int namidx;
00294 };
00295
00296
00297 typedef struct lineno_cache_entry
00298 {
00299 unsigned int line_number;
00300 union
00301 {
00302 struct bfd_symbol *sym;
00303 bfd_vma offset;
00304 } u;
00305 }
00306 alent;
00307
00308
00309
00310 #define align_power(addr, align) \
00311 (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
00312
00313 typedef struct bfd_section *sec_ptr;
00314
00315 #define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
00316 #define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
00317 #define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
00318 #define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
00319 #define bfd_section_name(bfd, ptr) ((ptr)->name)
00320 #define bfd_section_size(bfd, ptr) ((ptr)->size)
00321 #define bfd_get_section_size(ptr) ((ptr)->size)
00322 #define bfd_section_vma(bfd, ptr) ((ptr)->vma)
00323 #define bfd_section_lma(bfd, ptr) ((ptr)->lma)
00324 #define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
00325 #define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
00326 #define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
00327
00328 #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
00329
00330 #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
00331 #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
00332 #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
00333
00334 #define bfd_get_section_limit(bfd, sec) \
00335 (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
00336 / bfd_octets_per_byte (bfd))
00337
00338 typedef struct stat stat_type;
00339
00340 typedef enum bfd_print_symbol
00341 {
00342 bfd_print_symbol_name,
00343 bfd_print_symbol_more,
00344 bfd_print_symbol_all
00345 } bfd_print_symbol_type;
00346
00347
00348
00349 typedef struct _symbol_info
00350 {
00351 symvalue value;
00352 char type;
00353 const char *name;
00354 unsigned char stab_type;
00355 char stab_other;
00356 short stab_desc;
00357 const char *stab_name;
00358 } symbol_info;
00359
00360
00361
00362 extern const char *bfd_get_stab_name (int);
00363
00364
00365
00366
00367
00368
00369 struct bfd_hash_entry
00370 {
00371
00372 struct bfd_hash_entry *next;
00373
00374 const char *string;
00375
00376
00377 unsigned long hash;
00378 };
00379
00380
00381
00382 struct bfd_hash_table
00383 {
00384
00385 struct bfd_hash_entry **table;
00386
00387 unsigned int size;
00388
00389
00390
00391
00392
00393
00394
00395 struct bfd_hash_entry *(*newfunc)
00396 (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
00397
00398
00399 void *memory;
00400 };
00401
00402
00403 extern bfd_boolean bfd_hash_table_init
00404 (struct bfd_hash_table *,
00405 struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
00406 struct bfd_hash_table *,
00407 const char *));
00408
00409
00410 extern bfd_boolean bfd_hash_table_init_n
00411 (struct bfd_hash_table *,
00412 struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
00413 struct bfd_hash_table *,
00414 const char *),
00415 unsigned int size);
00416
00417
00418 extern void bfd_hash_table_free
00419 (struct bfd_hash_table *);
00420
00421
00422
00423
00424
00425 extern struct bfd_hash_entry *bfd_hash_lookup
00426 (struct bfd_hash_table *, const char *, bfd_boolean create,
00427 bfd_boolean copy);
00428
00429
00430 extern void bfd_hash_replace
00431 (struct bfd_hash_table *, struct bfd_hash_entry *old,
00432 struct bfd_hash_entry *nw);
00433
00434
00435 extern struct bfd_hash_entry *bfd_hash_newfunc
00436 (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
00437
00438
00439 extern void *bfd_hash_allocate
00440 (struct bfd_hash_table *, unsigned int);
00441
00442
00443
00444
00445 extern void bfd_hash_traverse
00446 (struct bfd_hash_table *,
00447 bfd_boolean (*) (struct bfd_hash_entry *, void *),
00448 void *info);
00449
00450
00451
00452
00453 extern void bfd_hash_set_default_size (bfd_size_type);
00454
00455
00456
00457
00458 struct stab_info
00459 {
00460
00461 struct bfd_strtab_hash *strings;
00462
00463 struct bfd_hash_table includes;
00464
00465 struct bfd_section *stabstr;
00466 };
00467
00468 #define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
00469
00470
00471
00472
00473
00474
00475 extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
00476 extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
00477 extern int bfd_seek (bfd *, file_ptr, int);
00478 extern file_ptr bfd_tell (bfd *);
00479 extern int bfd_flush (bfd *);
00480 extern int bfd_stat (bfd *, struct stat *);
00481
00482
00483 #if __GNUC__
00484 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
00485 (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
00486 bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
00487 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
00488 (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
00489 bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
00490 #else
00491 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
00492 (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
00493 bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
00494 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
00495 (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
00496 bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
00497 #endif
00498 extern void warn_deprecated (const char *, const char *, int, const char *);
00499
00500
00501
00502 #define bfd_get_filename(abfd) ((char *) (abfd)->filename)
00503 #define bfd_get_cacheable(abfd) ((abfd)->cacheable)
00504 #define bfd_get_format(abfd) ((abfd)->format)
00505 #define bfd_get_target(abfd) ((abfd)->xvec->name)
00506 #define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
00507 #define bfd_family_coff(abfd) \
00508 (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
00509 bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
00510 #define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
00511 #define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
00512 #define bfd_header_big_endian(abfd) \
00513 ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
00514 #define bfd_header_little_endian(abfd) \
00515 ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
00516 #define bfd_get_file_flags(abfd) ((abfd)->flags)
00517 #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
00518 #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
00519 #define bfd_my_archive(abfd) ((abfd)->my_archive)
00520 #define bfd_has_map(abfd) ((abfd)->has_armap)
00521
00522 #define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
00523 #define bfd_usrdata(abfd) ((abfd)->usrdata)
00524
00525 #define bfd_get_start_address(abfd) ((abfd)->start_address)
00526 #define bfd_get_symcount(abfd) ((abfd)->symcount)
00527 #define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
00528 #define bfd_count_sections(abfd) ((abfd)->section_count)
00529
00530 #define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
00531
00532 #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
00533
00534 #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
00535
00536 extern bfd_boolean bfd_cache_close
00537 (bfd *abfd);
00538
00539
00540 extern bfd_boolean bfd_cache_close_all (void);
00541
00542 extern bfd_boolean bfd_record_phdr
00543 (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
00544 bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
00545
00546
00547
00548 bfd_uint64_t bfd_getb64 (const void *);
00549 bfd_uint64_t bfd_getl64 (const void *);
00550 bfd_int64_t bfd_getb_signed_64 (const void *);
00551 bfd_int64_t bfd_getl_signed_64 (const void *);
00552 bfd_vma bfd_getb32 (const void *);
00553 bfd_vma bfd_getl32 (const void *);
00554 bfd_signed_vma bfd_getb_signed_32 (const void *);
00555 bfd_signed_vma bfd_getl_signed_32 (const void *);
00556 bfd_vma bfd_getb16 (const void *);
00557 bfd_vma bfd_getl16 (const void *);
00558 bfd_signed_vma bfd_getb_signed_16 (const void *);
00559 bfd_signed_vma bfd_getl_signed_16 (const void *);
00560 void bfd_putb64 (bfd_uint64_t, void *);
00561 void bfd_putl64 (bfd_uint64_t, void *);
00562 void bfd_putb32 (bfd_vma, void *);
00563 void bfd_putl32 (bfd_vma, void *);
00564 void bfd_putb16 (bfd_vma, void *);
00565 void bfd_putl16 (bfd_vma, void *);
00566
00567
00568
00569 bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
00570 void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
00571
00572 extern bfd_boolean bfd_section_already_linked_table_init (void);
00573 extern void bfd_section_already_linked_table_free (void);
00574
00575
00576
00577 #if defined(__STDC__) || defined(ALMOST_STDC)
00578 struct ecoff_debug_info;
00579 struct ecoff_debug_swap;
00580 struct ecoff_extr;
00581 struct bfd_symbol;
00582 struct bfd_link_info;
00583 struct bfd_link_hash_entry;
00584 struct bfd_elf_version_tree;
00585 #endif
00586 extern bfd_vma bfd_ecoff_get_gp_value
00587 (bfd * abfd);
00588 extern bfd_boolean bfd_ecoff_set_gp_value
00589 (bfd *abfd, bfd_vma gp_value);
00590 extern bfd_boolean bfd_ecoff_set_regmasks
00591 (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
00592 unsigned long *cprmask);
00593 extern void *bfd_ecoff_debug_init
00594 (bfd *output_bfd, struct ecoff_debug_info *output_debug,
00595 const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
00596 extern void bfd_ecoff_debug_free
00597 (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
00598 const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
00599 extern bfd_boolean bfd_ecoff_debug_accumulate
00600 (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
00601 const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
00602 struct ecoff_debug_info *input_debug,
00603 const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
00604 extern bfd_boolean bfd_ecoff_debug_accumulate_other
00605 (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
00606 const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
00607 struct bfd_link_info *);
00608 extern bfd_boolean bfd_ecoff_debug_externals
00609 (bfd *abfd, struct ecoff_debug_info *debug,
00610 const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
00611 bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
00612 void (*set_index) (struct bfd_symbol *, bfd_size_type));
00613 extern bfd_boolean bfd_ecoff_debug_one_external
00614 (bfd *abfd, struct ecoff_debug_info *debug,
00615 const struct ecoff_debug_swap *swap, const char *name,
00616 struct ecoff_extr *esym);
00617 extern bfd_size_type bfd_ecoff_debug_size
00618 (bfd *abfd, struct ecoff_debug_info *debug,
00619 const struct ecoff_debug_swap *swap);
00620 extern bfd_boolean bfd_ecoff_write_debug
00621 (bfd *abfd, struct ecoff_debug_info *debug,
00622 const struct ecoff_debug_swap *swap, file_ptr where);
00623 extern bfd_boolean bfd_ecoff_write_accumulated_debug
00624 (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
00625 const struct ecoff_debug_swap *swap,
00626 struct bfd_link_info *info, file_ptr where);
00627
00628
00629
00630 struct bfd_link_needed_list
00631 {
00632 struct bfd_link_needed_list *next;
00633 bfd *by;
00634 const char *name;
00635 };
00636
00637 enum dynamic_lib_link_class {
00638 DYN_NORMAL = 0,
00639 DYN_AS_NEEDED = 1,
00640 DYN_DT_NEEDED = 2,
00641 DYN_NO_ADD_NEEDED = 4,
00642 DYN_NO_NEEDED = 8
00643 };
00644
00645 extern bfd_boolean bfd_elf_record_link_assignment
00646 (bfd *, struct bfd_link_info *, const char *, bfd_boolean);
00647 extern struct bfd_link_needed_list *bfd_elf_get_needed_list
00648 (bfd *, struct bfd_link_info *);
00649 extern bfd_boolean bfd_elf_get_bfd_needed_list
00650 (bfd *, struct bfd_link_needed_list **);
00651 extern bfd_boolean bfd_elf_size_dynamic_sections
00652 (bfd *, const char *, const char *, const char *, const char * const *,
00653 struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
00654 extern void bfd_elf_set_dt_needed_name
00655 (bfd *, const char *);
00656 extern const char *bfd_elf_get_dt_soname
00657 (bfd *);
00658 extern void bfd_elf_set_dyn_lib_class
00659 (bfd *, int);
00660 extern int bfd_elf_get_dyn_lib_class
00661 (bfd *);
00662 extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
00663 (bfd *, struct bfd_link_info *);
00664 extern bfd_boolean bfd_elf_discard_info
00665 (bfd *, struct bfd_link_info *);
00666
00667
00668
00669
00670 extern long bfd_get_elf_phdr_upper_bound
00671 (bfd *abfd);
00672
00673
00674
00675
00676
00677
00678
00679
00680 extern int bfd_get_elf_phdrs
00681 (bfd *abfd, void *phdrs);
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695 extern bfd *bfd_elf_bfd_from_remote_memory
00696 (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
00697 int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
00698
00699
00700 extern int bfd_get_arch_size
00701 (bfd *);
00702
00703
00704 extern int bfd_get_sign_extend_vma
00705 (bfd *);
00706
00707 extern struct bfd_section *_bfd_elf_tls_setup
00708 (bfd *, struct bfd_link_info *);
00709
00710 extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
00711 (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
00712
00713
00714
00715 extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
00716 (bfd *, struct bfd_link_info *);
00717 extern bfd_boolean bfd_sunos_record_link_assignment
00718 (bfd *, struct bfd_link_info *, const char *);
00719 extern bfd_boolean bfd_sunos_size_dynamic_sections
00720 (bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **);
00721
00722
00723
00724 extern bfd_boolean bfd_i386linux_size_dynamic_sections
00725 (bfd *, struct bfd_link_info *);
00726 extern bfd_boolean bfd_m68klinux_size_dynamic_sections
00727 (bfd *, struct bfd_link_info *);
00728 extern bfd_boolean bfd_sparclinux_size_dynamic_sections
00729 (bfd *, struct bfd_link_info *);
00730
00731
00732
00733 struct _bfd_window_internal;
00734 typedef struct _bfd_window_internal bfd_window_internal;
00735
00736 typedef struct _bfd_window
00737 {
00738
00739 void *data;
00740 bfd_size_type size;
00741
00742
00743
00744
00745
00746
00747 struct _bfd_window_internal *i;
00748 }
00749 bfd_window;
00750
00751 extern void bfd_init_window
00752 (bfd_window *);
00753 extern void bfd_free_window
00754 (bfd_window *);
00755 extern bfd_boolean bfd_get_file_window
00756 (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
00757
00758
00759
00760 extern bfd_boolean bfd_xcoff_link_record_set
00761 (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
00762 extern bfd_boolean bfd_xcoff_import_symbol
00763 (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
00764 const char *, const char *, const char *, unsigned int);
00765 extern bfd_boolean bfd_xcoff_export_symbol
00766 (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
00767 extern bfd_boolean bfd_xcoff_link_count_reloc
00768 (bfd *, struct bfd_link_info *, const char *);
00769 extern bfd_boolean bfd_xcoff_record_link_assignment
00770 (bfd *, struct bfd_link_info *, const char *);
00771 extern bfd_boolean bfd_xcoff_size_dynamic_sections
00772 (bfd *, struct bfd_link_info *, const char *, const char *,
00773 unsigned long, unsigned long, unsigned long, bfd_boolean,
00774 int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean);
00775 extern bfd_boolean bfd_xcoff_link_generate_rtinit
00776 (bfd *, const char *, const char *, bfd_boolean);
00777
00778
00779 extern bfd_boolean bfd_xcoff_ar_archive_set_magic
00780 (bfd *, char *);
00781
00782
00783
00784 #if defined(__STDC__) || defined(ALMOST_STDC)
00785 struct internal_syment;
00786 union internal_auxent;
00787 #endif
00788
00789 extern bfd_boolean bfd_coff_get_syment
00790 (bfd *, struct bfd_symbol *, struct internal_syment *);
00791
00792 extern bfd_boolean bfd_coff_get_auxent
00793 (bfd *, struct bfd_symbol *, int, union internal_auxent *);
00794
00795 extern bfd_boolean bfd_coff_set_symbol_class
00796 (bfd *, struct bfd_symbol *, unsigned int);
00797
00798 extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
00799 (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
00800
00801
00802 extern bfd_boolean bfd_arm_allocate_interworking_sections
00803 (struct bfd_link_info *);
00804
00805 extern bfd_boolean bfd_arm_process_before_allocation
00806 (bfd *, struct bfd_link_info *, int);
00807
00808 extern bfd_boolean bfd_arm_get_bfd_for_interworking
00809 (bfd *, struct bfd_link_info *);
00810
00811
00812 extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
00813 (struct bfd_link_info *);
00814
00815 extern bfd_boolean bfd_arm_pe_process_before_allocation
00816 (bfd *, struct bfd_link_info *, int);
00817
00818 extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
00819 (bfd *, struct bfd_link_info *);
00820
00821
00822 extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
00823 (struct bfd_link_info *);
00824
00825 extern bfd_boolean bfd_elf32_arm_process_before_allocation
00826 (bfd *, struct bfd_link_info *, int);
00827
00828 void bfd_elf32_arm_set_target_relocs
00829 (struct bfd_link_info *, int, char *, int);
00830
00831 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
00832 (bfd *, struct bfd_link_info *);
00833
00834 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
00835 (bfd *, struct bfd_link_info *);
00836
00837
00838 extern bfd_boolean bfd_arm_merge_machines
00839 (bfd *, bfd *);
00840
00841 extern bfd_boolean bfd_arm_update_notes
00842 (bfd *, const char *);
00843
00844 extern unsigned int bfd_arm_get_mach_from_notes
00845 (bfd *, const char *);
00846
00847
00848 extern void bfd_ticoff_set_section_load_page
00849 (struct bfd_section *, int);
00850
00851 extern int bfd_ticoff_get_section_load_page
00852 (struct bfd_section *);
00853
00854
00855 extern bfd_vma bfd_h8300_pad_address
00856 (bfd *, bfd_vma);
00857
00858
00859 extern void bfd_elf32_ia64_after_parse
00860 (int);
00861
00862 extern void bfd_elf64_ia64_after_parse
00863 (int);
00864
00865
00866
00867
00868
00869
00870 struct coff_comdat_info
00871 {
00872
00873 const char *name;
00874
00875
00876
00877
00878
00879 long symbol;
00880 };
00881
00882 extern struct coff_comdat_info *bfd_coff_get_comdat_section
00883 (bfd *, struct bfd_section *);
00884
00885
00886 void bfd_init (void);
00887
00888
00889 bfd *bfd_openr (const char *filename, const char *target);
00890
00891 bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
00892
00893 bfd *bfd_openstreamr (const char *, const char *, void *);
00894
00895 bfd *bfd_openr_iovec (const char *filename, const char *target,
00896 void *(*open) (struct bfd *nbfd,
00897 void *open_closure),
00898 void *open_closure,
00899 file_ptr (*pread) (struct bfd *nbfd,
00900 void *stream,
00901 void *buf,
00902 file_ptr nbytes,
00903 file_ptr offset),
00904 int (*close) (struct bfd *nbfd,
00905 void *stream));
00906
00907 bfd *bfd_openw (const char *filename, const char *target);
00908
00909 bfd_boolean bfd_close (bfd *abfd);
00910
00911 bfd_boolean bfd_close_all_done (bfd *);
00912
00913 bfd *bfd_create (const char *filename, bfd *templ);
00914
00915 bfd_boolean bfd_make_writable (bfd *abfd);
00916
00917 bfd_boolean bfd_make_readable (bfd *abfd);
00918
00919 unsigned long bfd_calc_gnu_debuglink_crc32
00920 (unsigned long crc, const unsigned char *buf, bfd_size_type len);
00921
00922 char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
00923
00924 struct bfd_section *bfd_create_gnu_debuglink_section
00925 (bfd *abfd, const char *filename);
00926
00927 bfd_boolean bfd_fill_in_gnu_debuglink_section
00928 (bfd *abfd, struct bfd_section *sect, const char *filename);
00929
00930
00931
00932
00933
00934 #define bfd_put_8(abfd, val, ptr) \
00935 ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
00936 #define bfd_put_signed_8 \
00937 bfd_put_8
00938 #define bfd_get_8(abfd, ptr) \
00939 (*(unsigned char *) (ptr) & 0xff)
00940 #define bfd_get_signed_8(abfd, ptr) \
00941 (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
00942
00943 #define bfd_put_16(abfd, val, ptr) \
00944 BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
00945 #define bfd_put_signed_16 \
00946 bfd_put_16
00947 #define bfd_get_16(abfd, ptr) \
00948 BFD_SEND (abfd, bfd_getx16, (ptr))
00949 #define bfd_get_signed_16(abfd, ptr) \
00950 BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
00951
00952 #define bfd_put_32(abfd, val, ptr) \
00953 BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
00954 #define bfd_put_signed_32 \
00955 bfd_put_32
00956 #define bfd_get_32(abfd, ptr) \
00957 BFD_SEND (abfd, bfd_getx32, (ptr))
00958 #define bfd_get_signed_32(abfd, ptr) \
00959 BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
00960
00961 #define bfd_put_64(abfd, val, ptr) \
00962 BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
00963 #define bfd_put_signed_64 \
00964 bfd_put_64
00965 #define bfd_get_64(abfd, ptr) \
00966 BFD_SEND (abfd, bfd_getx64, (ptr))
00967 #define bfd_get_signed_64(abfd, ptr) \
00968 BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
00969
00970 #define bfd_get(bits, abfd, ptr) \
00971 ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
00972 : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
00973 : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
00974 : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
00975 : (abort (), (bfd_vma) - 1))
00976
00977 #define bfd_put(bits, abfd, val, ptr) \
00978 ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
00979 : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
00980 : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
00981 : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
00982 : (abort (), (void) 0))
00983
00984
00985
00986
00987 #define bfd_h_put_8(abfd, val, ptr) \
00988 bfd_put_8 (abfd, val, ptr)
00989 #define bfd_h_put_signed_8(abfd, val, ptr) \
00990 bfd_put_8 (abfd, val, ptr)
00991 #define bfd_h_get_8(abfd, ptr) \
00992 bfd_get_8 (abfd, ptr)
00993 #define bfd_h_get_signed_8(abfd, ptr) \
00994 bfd_get_signed_8 (abfd, ptr)
00995
00996 #define bfd_h_put_16(abfd, val, ptr) \
00997 BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
00998 #define bfd_h_put_signed_16 \
00999 bfd_h_put_16
01000 #define bfd_h_get_16(abfd, ptr) \
01001 BFD_SEND (abfd, bfd_h_getx16, (ptr))
01002 #define bfd_h_get_signed_16(abfd, ptr) \
01003 BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
01004
01005 #define bfd_h_put_32(abfd, val, ptr) \
01006 BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
01007 #define bfd_h_put_signed_32 \
01008 bfd_h_put_32
01009 #define bfd_h_get_32(abfd, ptr) \
01010 BFD_SEND (abfd, bfd_h_getx32, (ptr))
01011 #define bfd_h_get_signed_32(abfd, ptr) \
01012 BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
01013
01014 #define bfd_h_put_64(abfd, val, ptr) \
01015 BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
01016 #define bfd_h_put_signed_64 \
01017 bfd_h_put_64
01018 #define bfd_h_get_64(abfd, ptr) \
01019 BFD_SEND (abfd, bfd_h_getx64, (ptr))
01020 #define bfd_h_get_signed_64(abfd, ptr) \
01021 BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
01022
01023
01024
01025 #define H_PUT_64 bfd_h_put_64
01026 #define H_PUT_32 bfd_h_put_32
01027 #define H_PUT_16 bfd_h_put_16
01028 #define H_PUT_8 bfd_h_put_8
01029 #define H_PUT_S64 bfd_h_put_signed_64
01030 #define H_PUT_S32 bfd_h_put_signed_32
01031 #define H_PUT_S16 bfd_h_put_signed_16
01032 #define H_PUT_S8 bfd_h_put_signed_8
01033 #define H_GET_64 bfd_h_get_64
01034 #define H_GET_32 bfd_h_get_32
01035 #define H_GET_16 bfd_h_get_16
01036 #define H_GET_8 bfd_h_get_8
01037 #define H_GET_S64 bfd_h_get_signed_64
01038 #define H_GET_S32 bfd_h_get_signed_32
01039 #define H_GET_S16 bfd_h_get_signed_16
01040 #define H_GET_S8 bfd_h_get_signed_8
01041
01042
01043
01044 long bfd_get_mtime (bfd *abfd);
01045
01046 long bfd_get_size (bfd *abfd);
01047
01048
01049
01050 typedef struct bfd_section
01051 {
01052
01053
01054 const char *name;
01055
01056
01057 int id;
01058
01059
01060 int index;
01061
01062
01063 struct bfd_section *next;
01064
01065
01066
01067
01068 flagword flags;
01069
01070 #define SEC_NO_FLAGS 0x000
01071
01072
01073
01074 #define SEC_ALLOC 0x001
01075
01076
01077
01078 #define SEC_LOAD 0x002
01079
01080
01081
01082 #define SEC_RELOC 0x004
01083
01084
01085 #define SEC_READONLY 0x008
01086
01087
01088 #define SEC_CODE 0x010
01089
01090
01091 #define SEC_DATA 0x020
01092
01093
01094 #define SEC_ROM 0x040
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106 #define SEC_CONSTRUCTOR 0x080
01107
01108
01109
01110
01111 #define SEC_HAS_CONTENTS 0x100
01112
01113
01114
01115 #define SEC_NEVER_LOAD 0x200
01116
01117
01118 #define SEC_THREAD_LOCAL 0x400
01119
01120
01121
01122
01123
01124
01125
01126 #define SEC_HAS_GOT_REF 0x800
01127
01128
01129
01130
01131
01132
01133 #define SEC_IS_COMMON 0x1000
01134
01135
01136
01137
01138
01139 #define SEC_DEBUGGING 0x2000
01140
01141
01142
01143
01144 #define SEC_IN_MEMORY 0x4000
01145
01146
01147
01148
01149 #define SEC_EXCLUDE 0x8000
01150
01151
01152
01153
01154
01155 #define SEC_SORT_ENTRIES 0x10000
01156
01157
01158
01159
01160
01161 #define SEC_LINK_ONCE 0x20000
01162
01163
01164
01165 #define SEC_LINK_DUPLICATES 0x40000
01166
01167
01168
01169 #define SEC_LINK_DUPLICATES_DISCARD 0x0
01170
01171
01172
01173
01174 #define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
01175
01176
01177
01178 #define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
01179
01180
01181
01182
01183 #define SEC_LINK_DUPLICATES_SAME_CONTENTS \
01184 (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
01185
01186
01187
01188
01189
01190 #define SEC_LINKER_CREATED 0x200000
01191
01192
01193 #define SEC_KEEP 0x400000
01194
01195
01196
01197 #define SEC_SMALL_DATA 0x800000
01198
01199
01200
01201 #define SEC_MERGE 0x1000000
01202
01203
01204
01205
01206 #define SEC_STRINGS 0x2000000
01207
01208
01209 #define SEC_GROUP 0x4000000
01210
01211
01212
01213
01214
01215
01216
01217
01218
01219
01220 #define SEC_COFF_SHARED_LIBRARY 0x10000000
01221
01222
01223
01224 #define SEC_COFF_SHARED 0x20000000
01225
01226
01227
01228
01229
01230
01231 #define SEC_TIC54X_BLOCK 0x40000000
01232
01233
01234
01235
01236 #define SEC_TIC54X_CLINK 0x80000000
01237
01238
01239
01240
01241
01242
01243 unsigned int user_set_vma : 1;
01244
01245
01246 unsigned int linker_mark : 1;
01247
01248
01249
01250 unsigned int linker_has_input : 1;
01251
01252
01253 unsigned int gc_mark : 1;
01254
01255
01256
01257
01258 unsigned int segment_mark : 1;
01259
01260
01261 unsigned int sec_info_type:3;
01262 #define ELF_INFO_TYPE_NONE 0
01263 #define ELF_INFO_TYPE_STABS 1
01264 #define ELF_INFO_TYPE_MERGE 2
01265 #define ELF_INFO_TYPE_EH_FRAME 3
01266 #define ELF_INFO_TYPE_JUST_SYMS 4
01267
01268
01269 unsigned int use_rela_p:1;
01270
01271
01272
01273
01274
01275 unsigned int has_tls_reloc:1;
01276
01277
01278 unsigned int has_gp_reloc:1;
01279
01280
01281 unsigned int need_finalize_relax:1;
01282
01283
01284 unsigned int reloc_done : 1;
01285
01286
01287
01288
01289
01290
01291
01292
01293
01294 bfd_vma vma;
01295
01296
01297
01298
01299 bfd_vma lma;
01300
01301
01302
01303
01304 bfd_size_type size;
01305
01306
01307
01308
01309
01310
01311
01312
01313
01314 bfd_size_type rawsize;
01315
01316
01317
01318
01319
01320
01321
01322
01323 bfd_vma output_offset;
01324
01325
01326 struct bfd_section *output_section;
01327
01328
01329
01330 unsigned int alignment_power;
01331
01332
01333
01334 struct reloc_cache_entry *relocation;
01335
01336
01337
01338 struct reloc_cache_entry **orelocation;
01339
01340
01341 unsigned reloc_count;
01342
01343
01344
01345
01346
01347 file_ptr filepos;
01348
01349
01350 file_ptr rel_filepos;
01351
01352
01353 file_ptr line_filepos;
01354
01355
01356 void *userdata;
01357
01358
01359
01360 unsigned char *contents;
01361
01362
01363 alent *lineno;
01364
01365
01366 unsigned int lineno_count;
01367
01368
01369 unsigned int entsize;
01370
01371
01372
01373 struct bfd_section *kept_section;
01374
01375
01376
01377 file_ptr moving_line_filepos;
01378
01379
01380 int target_index;
01381
01382 void *used_by_bfd;
01383
01384
01385
01386 struct relent_chain *constructor_chain;
01387
01388
01389 bfd *owner;
01390
01391
01392 struct bfd_symbol *symbol;
01393 struct bfd_symbol **symbol_ptr_ptr;
01394
01395 struct bfd_link_order *link_order_head;
01396 struct bfd_link_order *link_order_tail;
01397 } asection;
01398
01399
01400
01401
01402
01403
01404 #define BFD_ABS_SECTION_NAME "*ABS*"
01405 #define BFD_UND_SECTION_NAME "*UND*"
01406 #define BFD_COM_SECTION_NAME "*COM*"
01407 #define BFD_IND_SECTION_NAME "*IND*"
01408
01409 #ifdef IPA_LINK
01410 #define BFD_WHD_SECTION_NAME "*WHD*"
01411 #define BFD_WHT_SECTION_NAME "*WHT*"
01412 #endif
01413
01414
01415 extern asection bfd_abs_section;
01416 #define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
01417 #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
01418
01419 extern asection bfd_und_section;
01420 #define bfd_und_section_ptr ((asection *) &bfd_und_section)
01421 #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
01422
01423 extern asection bfd_com_section;
01424 #define bfd_com_section_ptr ((asection *) &bfd_com_section)
01425
01426 extern asection bfd_ind_section;
01427 #define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
01428 #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
01429
01430 #ifdef IPA_LINK
01431
01432 extern asection bfd_whirl_data_section;
01433 #define bfd_whirl_data_section_ptr ((asection *) &bfd_whirl_data_section)
01434 #define bfd_is_whirl_data_section(sec) ((sec) == bfd_whirl_data_section_ptr)
01435
01436 extern asection bfd_whirl_text_section;
01437 #define bfd_whirl_text_section_ptr ((asection *) &bfd_whirl_text_section)
01438 #define bfd_is_whirl_text_section(sec) ((sec) == bfd_whirl_text_section_ptr)
01439 #endif
01440
01441 #define bfd_is_const_section(SEC) \
01442 ( ((SEC) == bfd_abs_section_ptr) \
01443 || ((SEC) == bfd_und_section_ptr) \
01444 || ((SEC) == bfd_com_section_ptr) \
01445 || ((SEC) == bfd_ind_section_ptr))
01446
01447 extern const struct bfd_symbol * const bfd_abs_symbol;
01448 extern const struct bfd_symbol * const bfd_com_symbol;
01449 extern const struct bfd_symbol * const bfd_und_symbol;
01450 extern const struct bfd_symbol * const bfd_ind_symbol;
01451 #ifdef IPA_LINK
01452 extern const struct bfd_symbol * const bfd_whirl_data_symbol;
01453 extern const struct bfd_symbol * const bfd_whirl_text_symbol;
01454 #endif
01455
01456
01457
01458
01459 #define bfd_section_list_remove(ABFD, PS) \
01460 do \
01461 { \
01462 asection **_ps = PS; \
01463 asection *_s = *_ps; \
01464 *_ps = _s->next; \
01465 if (_s->next == NULL) \
01466 (ABFD)->section_tail = _ps; \
01467 } \
01468 while (0)
01469 #define bfd_section_list_insert(ABFD, PS, S) \
01470 do \
01471 { \
01472 asection **_ps = PS; \
01473 asection *_s = S; \
01474 _s->next = *_ps; \
01475 *_ps = _s; \
01476 if (_s->next == NULL) \
01477 (ABFD)->section_tail = &_s->next; \
01478 } \
01479 while (0)
01480
01481 void bfd_section_list_clear (bfd *);
01482
01483 asection *bfd_get_section_by_name (bfd *abfd, const char *name);
01484
01485 asection *bfd_get_section_by_name_if
01486 (bfd *abfd,
01487 const char *name,
01488 bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
01489 void *obj);
01490
01491 char *bfd_get_unique_section_name
01492 (bfd *abfd, const char *templat, int *count);
01493
01494 asection *bfd_make_section_old_way (bfd *abfd, const char *name);
01495
01496 asection *bfd_make_section_anyway (bfd *abfd, const char *name);
01497
01498 asection *bfd_make_section (bfd *, const char *name);
01499
01500 bfd_boolean bfd_set_section_flags
01501 (bfd *abfd, asection *sec, flagword flags);
01502
01503 void bfd_map_over_sections
01504 (bfd *abfd,
01505 void (*func) (bfd *abfd, asection *sect, void *obj),
01506 void *obj);
01507
01508 asection *bfd_sections_find_if
01509 (bfd *abfd,
01510 bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
01511 void *obj);
01512
01513 bfd_boolean bfd_set_section_size
01514 (bfd *abfd, asection *sec, bfd_size_type val);
01515
01516 bfd_boolean bfd_set_section_contents
01517 (bfd *abfd, asection *section, const void *data,
01518 file_ptr offset, bfd_size_type count);
01519
01520 bfd_boolean bfd_get_section_contents
01521 (bfd *abfd, asection *section, void *location, file_ptr offset,
01522 bfd_size_type count);
01523
01524 bfd_boolean bfd_malloc_and_get_section
01525 (bfd *abfd, asection *section, bfd_byte **buf);
01526
01527 bfd_boolean bfd_copy_private_section_data
01528 (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
01529
01530 #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
01531 BFD_SEND (obfd, _bfd_copy_private_section_data, \
01532 (ibfd, isection, obfd, osection))
01533 void _bfd_strip_section_from_output
01534 (struct bfd_link_info *info, asection *section);
01535
01536 bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
01537
01538 bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
01539
01540
01541 enum bfd_architecture
01542 {
01543 bfd_arch_unknown,
01544 bfd_arch_obscure,
01545 bfd_arch_m68k,
01546 #define bfd_mach_m68000 1
01547 #define bfd_mach_m68008 2
01548 #define bfd_mach_m68010 3
01549 #define bfd_mach_m68020 4
01550 #define bfd_mach_m68030 5
01551 #define bfd_mach_m68040 6
01552 #define bfd_mach_m68060 7
01553 #define bfd_mach_cpu32 8
01554 #define bfd_mach_mcf5200 9
01555 #define bfd_mach_mcf5206e 10
01556 #define bfd_mach_mcf5307 11
01557 #define bfd_mach_mcf5407 12
01558 #define bfd_mach_mcf528x 13
01559 #define bfd_mach_mcfv4e 14
01560 #define bfd_mach_mcf521x 15
01561 #define bfd_mach_mcf5249 16
01562 #define bfd_mach_mcf547x 17
01563 #define bfd_mach_mcf548x 18
01564 bfd_arch_vax,
01565 bfd_arch_i960,
01566
01567
01568
01569
01570
01571
01572
01573
01574 #define bfd_mach_i960_core 1
01575 #define bfd_mach_i960_ka_sa 2
01576 #define bfd_mach_i960_kb_sb 3
01577 #define bfd_mach_i960_mc 4
01578 #define bfd_mach_i960_xa 5
01579 #define bfd_mach_i960_ca 6
01580 #define bfd_mach_i960_jx 7
01581 #define bfd_mach_i960_hx 8
01582
01583 bfd_arch_or32,
01584
01585 bfd_arch_a29k,
01586 bfd_arch_sparc,
01587 #define bfd_mach_sparc 1
01588
01589 #define bfd_mach_sparc_sparclet 2
01590 #define bfd_mach_sparc_sparclite 3
01591 #define bfd_mach_sparc_v8plus 4
01592 #define bfd_mach_sparc_v8plusa 5
01593 #define bfd_mach_sparc_sparclite_le 6
01594 #define bfd_mach_sparc_v9 7
01595 #define bfd_mach_sparc_v9a 8
01596 #define bfd_mach_sparc_v8plusb 9
01597 #define bfd_mach_sparc_v9b 10
01598
01599 #define bfd_mach_sparc_v9_p(mach) \
01600 ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
01601 && (mach) != bfd_mach_sparc_sparclite_le)
01602
01603 #define bfd_mach_sparc_64bit_p(mach) \
01604 ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
01605 bfd_arch_mips,
01606 #define bfd_mach_mips3000 3000
01607 #define bfd_mach_mips3900 3900
01608 #define bfd_mach_mips4000 4000
01609 #define bfd_mach_mips4010 4010
01610 #define bfd_mach_mips4100 4100
01611 #define bfd_mach_mips4111 4111
01612 #define bfd_mach_mips4120 4120
01613 #define bfd_mach_mips4300 4300
01614 #define bfd_mach_mips4400 4400
01615 #define bfd_mach_mips4600 4600
01616 #define bfd_mach_mips4650 4650
01617 #define bfd_mach_mips5000 5000
01618 #define bfd_mach_mips5400 5400
01619 #define bfd_mach_mips5500 5500
01620 #define bfd_mach_mips6000 6000
01621 #define bfd_mach_mips7000 7000
01622 #define bfd_mach_mips8000 8000
01623 #define bfd_mach_mips9000 9000
01624 #define bfd_mach_mips10000 10000
01625 #define bfd_mach_mips12000 12000
01626 #define bfd_mach_mips16 16
01627 #define bfd_mach_mips5 5
01628 #define bfd_mach_mips_sb1 12310201
01629 #define bfd_mach_mipsisa32 32
01630 #define bfd_mach_mipsisa32r2 33
01631 #define bfd_mach_mipsisa64 64
01632 #define bfd_mach_mipsisa64r2 65
01633 bfd_arch_i386,
01634 #define bfd_mach_i386_i386 1
01635 #define bfd_mach_i386_i8086 2
01636 #define bfd_mach_i386_i386_intel_syntax 3
01637 #define bfd_mach_x86_64 64
01638 #define bfd_mach_x86_64_intel_syntax 65
01639 bfd_arch_we32k,
01640 bfd_arch_tahoe,
01641 bfd_arch_i860,
01642 bfd_arch_i370,
01643 bfd_arch_romp,
01644 bfd_arch_alliant,
01645 bfd_arch_convex,
01646 bfd_arch_m88k,
01647 bfd_arch_m98k,
01648 bfd_arch_pyramid,
01649 bfd_arch_h8300,
01650 #define bfd_mach_h8300 1
01651 #define bfd_mach_h8300h 2
01652 #define bfd_mach_h8300s 3
01653 #define bfd_mach_h8300hn 4
01654 #define bfd_mach_h8300sn 5
01655 #define bfd_mach_h8300sx 6
01656 #define bfd_mach_h8300sxn 7
01657 bfd_arch_pdp11,
01658 bfd_arch_powerpc,
01659 #define bfd_mach_ppc 32
01660 #define bfd_mach_ppc64 64
01661 #define bfd_mach_ppc_403 403
01662 #define bfd_mach_ppc_403gc 4030
01663 #define bfd_mach_ppc_505 505
01664 #define bfd_mach_ppc_601 601
01665 #define bfd_mach_ppc_602 602
01666 #define bfd_mach_ppc_603 603
01667 #define bfd_mach_ppc_ec603e 6031
01668 #define bfd_mach_ppc_604 604
01669 #define bfd_mach_ppc_620 620
01670 #define bfd_mach_ppc_630 630
01671 #define bfd_mach_ppc_750 750
01672 #define bfd_mach_ppc_860 860
01673 #define bfd_mach_ppc_a35 35
01674 #define bfd_mach_ppc_rs64ii 642
01675 #define bfd_mach_ppc_rs64iii 643
01676 #define bfd_mach_ppc_7400 7400
01677 #define bfd_mach_ppc_e500 500
01678 bfd_arch_rs6000,
01679 #define bfd_mach_rs6k 6000
01680 #define bfd_mach_rs6k_rs1 6001
01681 #define bfd_mach_rs6k_rsc 6003
01682 #define bfd_mach_rs6k_rs2 6002
01683 bfd_arch_hppa,
01684 #define bfd_mach_hppa10 10
01685 #define bfd_mach_hppa11 11
01686 #define bfd_mach_hppa20 20
01687 #define bfd_mach_hppa20w 25
01688 bfd_arch_d10v,
01689 #define bfd_mach_d10v 1
01690 #define bfd_mach_d10v_ts2 2
01691 #define bfd_mach_d10v_ts3 3
01692 bfd_arch_d30v,
01693 bfd_arch_dlx,
01694 bfd_arch_m68hc11,
01695 bfd_arch_m68hc12,
01696 #define bfd_mach_m6812_default 0
01697 #define bfd_mach_m6812 1
01698 #define bfd_mach_m6812s 2
01699 bfd_arch_z8k,
01700 #define bfd_mach_z8001 1
01701 #define bfd_mach_z8002 2
01702 bfd_arch_h8500,
01703 bfd_arch_sh,
01704 #define bfd_mach_sh 1
01705 #define bfd_mach_sh2 0x20
01706 #define bfd_mach_sh_dsp 0x2d
01707 #define bfd_mach_sh2a 0x2a
01708 #define bfd_mach_sh2a_nofpu 0x2b
01709 #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
01710 #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
01711 #define bfd_mach_sh2a_or_sh4 0x2a3
01712 #define bfd_mach_sh2a_or_sh3e 0x2a4
01713 #define bfd_mach_sh2e 0x2e
01714 #define bfd_mach_sh3 0x30
01715 #define bfd_mach_sh3_nommu 0x31
01716 #define bfd_mach_sh3_dsp 0x3d
01717 #define bfd_mach_sh3e 0x3e
01718 #define bfd_mach_sh4 0x40
01719 #define bfd_mach_sh4_nofpu 0x41
01720 #define bfd_mach_sh4_nommu_nofpu 0x42
01721 #define bfd_mach_sh4a 0x4a
01722 #define bfd_mach_sh4a_nofpu 0x4b
01723 #define bfd_mach_sh4al_dsp 0x4d
01724 #define bfd_mach_sh5 0x50
01725 bfd_arch_alpha,
01726 #define bfd_mach_alpha_ev4 0x10
01727 #define bfd_mach_alpha_ev5 0x20
01728 #define bfd_mach_alpha_ev6 0x30
01729 bfd_arch_arm,
01730 #define bfd_mach_arm_unknown 0
01731 #define bfd_mach_arm_2 1
01732 #define bfd_mach_arm_2a 2
01733 #define bfd_mach_arm_3 3
01734 #define bfd_mach_arm_3M 4
01735 #define bfd_mach_arm_4 5
01736 #define bfd_mach_arm_4T 6
01737 #define bfd_mach_arm_5 7
01738 #define bfd_mach_arm_5T 8
01739 #define bfd_mach_arm_5TE 9
01740 #define bfd_mach_arm_XScale 10
01741 #define bfd_mach_arm_ep9312 11
01742 #define bfd_mach_arm_iWMMXt 12
01743 bfd_arch_ns32k,
01744 bfd_arch_w65,
01745 bfd_arch_tic30,
01746 bfd_arch_tic4x,
01747 #define bfd_mach_tic3x 30
01748 #define bfd_mach_tic4x 40
01749 bfd_arch_tic54x,
01750 bfd_arch_tic80,
01751 bfd_arch_v850,
01752 #define bfd_mach_v850 1
01753 #define bfd_mach_v850e 'E'
01754 #define bfd_mach_v850e1 '1'
01755 bfd_arch_arc,
01756 #define bfd_mach_arc_5 5
01757 #define bfd_mach_arc_6 6
01758 #define bfd_mach_arc_7 7
01759 #define bfd_mach_arc_8 8
01760 bfd_arch_m32r,
01761 #define bfd_mach_m32r 1
01762 #define bfd_mach_m32rx 'x'
01763 #define bfd_mach_m32r2 '2'
01764 bfd_arch_mn10200,
01765 bfd_arch_mn10300,
01766 #define bfd_mach_mn10300 300
01767 #define bfd_mach_am33 330
01768 #define bfd_mach_am33_2 332
01769 bfd_arch_fr30,
01770 #define bfd_mach_fr30 0x46523330
01771 bfd_arch_frv,
01772 #define bfd_mach_frv 1
01773 #define bfd_mach_frvsimple 2
01774 #define bfd_mach_fr300 300
01775 #define bfd_mach_fr400 400
01776 #define bfd_mach_fr450 450
01777 #define bfd_mach_frvtomcat 499
01778 #define bfd_mach_fr500 500
01779 #define bfd_mach_fr550 550
01780 bfd_arch_mcore,
01781 bfd_arch_ia64,
01782 #define bfd_mach_ia64_elf64 64
01783 #define bfd_mach_ia64_elf32 32
01784 bfd_arch_ip2k,
01785 #define bfd_mach_ip2022 1
01786 #define bfd_mach_ip2022ext 2
01787 bfd_arch_iq2000,
01788 #define bfd_mach_iq2000 1
01789 #define bfd_mach_iq10 2
01790 bfd_arch_pj,
01791 bfd_arch_avr,
01792 #define bfd_mach_avr1 1
01793 #define bfd_mach_avr2 2
01794 #define bfd_mach_avr3 3
01795 #define bfd_mach_avr4 4
01796 #define bfd_mach_avr5 5
01797 bfd_arch_cr16c,
01798 #define bfd_mach_cr16c 1
01799 bfd_arch_crx,
01800 #define bfd_mach_crx 1
01801 bfd_arch_cris,
01802 #define bfd_mach_cris_v0_v10 255
01803 #define bfd_mach_cris_v32 32
01804 #define bfd_mach_cris_v10_v32 1032
01805 bfd_arch_s390,
01806 #define bfd_mach_s390_31 31
01807 #define bfd_mach_s390_64 64
01808 bfd_arch_openrisc,
01809 bfd_arch_mmix,
01810 bfd_arch_xstormy16,
01811 #define bfd_mach_xstormy16 1
01812 bfd_arch_msp430,
01813 #define bfd_mach_msp11 11
01814 #define bfd_mach_msp110 110
01815 #define bfd_mach_msp12 12
01816 #define bfd_mach_msp13 13
01817 #define bfd_mach_msp14 14
01818 #define bfd_mach_msp15 15
01819 #define bfd_mach_msp16 16
01820 #define bfd_mach_msp31 31
01821 #define bfd_mach_msp32 32
01822 #define bfd_mach_msp33 33
01823 #define bfd_mach_msp41 41
01824 #define bfd_mach_msp42 42
01825 #define bfd_mach_msp43 43
01826 #define bfd_mach_msp44 44
01827 bfd_arch_xtensa,
01828 #define bfd_mach_xtensa 1
01829 bfd_arch_maxq,
01830 #define bfd_mach_maxq10 10
01831 #define bfd_mach_maxq20 20
01832 bfd_arch_last
01833 };
01834
01835 typedef struct bfd_arch_info
01836 {
01837 int bits_per_word;
01838 int bits_per_address;
01839 int bits_per_byte;
01840 enum bfd_architecture arch;
01841 unsigned long mach;
01842 const char *arch_name;
01843 const char *printable_name;
01844 unsigned int section_align_power;
01845
01846
01847
01848 bfd_boolean the_default;
01849 const struct bfd_arch_info * (*compatible)
01850 (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
01851
01852 bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
01853
01854 const struct bfd_arch_info *next;
01855 }
01856 bfd_arch_info_type;
01857
01858 const char *bfd_printable_name (bfd *abfd);
01859
01860 const bfd_arch_info_type *bfd_scan_arch (const char *string);
01861
01862 const char **bfd_arch_list (void);
01863
01864 const bfd_arch_info_type *bfd_arch_get_compatible
01865 (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
01866
01867 void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
01868
01869 enum bfd_architecture bfd_get_arch (bfd *abfd);
01870
01871 unsigned long bfd_get_mach (bfd *abfd);
01872
01873 unsigned int bfd_arch_bits_per_byte (bfd *abfd);
01874
01875 unsigned int bfd_arch_bits_per_address (bfd *abfd);
01876
01877 const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
01878
01879 const bfd_arch_info_type *bfd_lookup_arch
01880 (enum bfd_architecture arch, unsigned long machine);
01881
01882 const char *bfd_printable_arch_mach
01883 (enum bfd_architecture arch, unsigned long machine);
01884
01885 unsigned int bfd_octets_per_byte (bfd *abfd);
01886
01887 unsigned int bfd_arch_mach_octets_per_byte
01888 (enum bfd_architecture arch, unsigned long machine);
01889
01890
01891 typedef enum bfd_reloc_status
01892 {
01893
01894 bfd_reloc_ok,
01895
01896
01897 bfd_reloc_overflow,
01898
01899
01900 bfd_reloc_outofrange,
01901
01902
01903 bfd_reloc_continue,
01904
01905
01906 bfd_reloc_notsupported,
01907
01908
01909 bfd_reloc_other,
01910
01911
01912 bfd_reloc_undefined,
01913
01914
01915
01916
01917
01918 bfd_reloc_dangerous
01919 }
01920 bfd_reloc_status_type;
01921
01922
01923 typedef struct reloc_cache_entry
01924 {
01925
01926 struct bfd_symbol **sym_ptr_ptr;
01927
01928
01929 bfd_size_type address;
01930
01931
01932 bfd_vma addend;
01933
01934
01935 reloc_howto_type *howto;
01936
01937 }
01938 arelent;
01939
01940 enum complain_overflow
01941 {
01942
01943 complain_overflow_dont,
01944
01945
01946
01947 complain_overflow_bitfield,
01948
01949
01950
01951 complain_overflow_signed,
01952
01953
01954
01955 complain_overflow_unsigned
01956 };
01957
01958 struct reloc_howto_struct
01959 {
01960
01961
01962
01963
01964
01965
01966 unsigned int type;
01967
01968
01969
01970 unsigned int rightshift;
01971
01972
01973
01974
01975 int size;
01976
01977
01978
01979 unsigned int bitsize;
01980
01981
01982
01983
01984
01985 bfd_boolean pc_relative;
01986
01987
01988
01989 unsigned int bitpos;
01990
01991
01992
01993 enum complain_overflow complain_on_overflow;
01994
01995
01996
01997
01998
01999 bfd_reloc_status_type (*special_function)
02000 (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
02001 bfd *, char **);
02002
02003
02004 char *name;
02005
02006
02007
02008
02009
02010
02011
02012
02013
02014
02015
02016
02017
02018
02019
02020
02021 bfd_boolean partial_inplace;
02022
02023
02024
02025
02026
02027
02028
02029
02030
02031 bfd_vma src_mask;
02032
02033
02034
02035 bfd_vma dst_mask;
02036
02037
02038
02039
02040
02041
02042
02043 bfd_boolean pcrel_offset;
02044 };
02045
02046 #define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
02047 { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
02048 #define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
02049 HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
02050 NAME, FALSE, 0, 0, IN)
02051
02052 #define EMPTY_HOWTO(C) \
02053 HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
02054 NULL, FALSE, 0, 0, FALSE)
02055
02056 #define HOWTO_PREPARE(relocation, symbol) \
02057 { \
02058 if (symbol != NULL) \
02059 { \
02060 if (bfd_is_com_section (symbol->section)) \
02061 { \
02062 relocation = 0; \
02063 } \
02064 else \
02065 { \
02066 relocation = symbol->value; \
02067 } \
02068 } \
02069 }
02070
02071 unsigned int bfd_get_reloc_size (reloc_howto_type *);
02072
02073 typedef struct relent_chain
02074 {
02075 arelent relent;
02076 struct relent_chain *next;
02077 }
02078 arelent_chain;
02079
02080 bfd_reloc_status_type bfd_check_overflow
02081 (enum complain_overflow how,
02082 unsigned int bitsize,
02083 unsigned int rightshift,
02084 unsigned int addrsize,
02085 bfd_vma relocation);
02086
02087 bfd_reloc_status_type bfd_perform_relocation
02088 (bfd *abfd,
02089 arelent *reloc_entry,
02090 void *data,
02091 asection *input_section,
02092 bfd *output_bfd,
02093 char **error_message);
02094
02095 bfd_reloc_status_type bfd_install_relocation
02096 (bfd *abfd,
02097 arelent *reloc_entry,
02098 void *data, bfd_vma data_start,
02099 asection *input_section,
02100 char **error_message);
02101
02102 enum bfd_reloc_code_real {
02103 _dummy_first_bfd_reloc_code_real,
02104
02105
02106
02107 BFD_RELOC_64,
02108 BFD_RELOC_32,
02109 BFD_RELOC_26,
02110 BFD_RELOC_24,
02111 BFD_RELOC_16,
02112 BFD_RELOC_14,
02113 BFD_RELOC_8,
02114
02115
02116
02117
02118
02119
02120 BFD_RELOC_64_PCREL,
02121 BFD_RELOC_32_PCREL,
02122 BFD_RELOC_24_PCREL,
02123 BFD_RELOC_16_PCREL,
02124 BFD_RELOC_12_PCREL,
02125 BFD_RELOC_8_PCREL,
02126
02127
02128 BFD_RELOC_32_SECREL,
02129
02130
02131 BFD_RELOC_32_GOT_PCREL,
02132 BFD_RELOC_16_GOT_PCREL,
02133 BFD_RELOC_8_GOT_PCREL,
02134 BFD_RELOC_32_GOTOFF,
02135 BFD_RELOC_16_GOTOFF,
02136 BFD_RELOC_LO16_GOTOFF,
02137 BFD_RELOC_HI16_GOTOFF,
02138 BFD_RELOC_HI16_S_GOTOFF,
02139 BFD_RELOC_8_GOTOFF,
02140 BFD_RELOC_64_PLT_PCREL,
02141 BFD_RELOC_32_PLT_PCREL,
02142 BFD_RELOC_24_PLT_PCREL,
02143 BFD_RELOC_16_PLT_PCREL,
02144 BFD_RELOC_8_PLT_PCREL,
02145 BFD_RELOC_64_PLTOFF,
02146 BFD_RELOC_32_PLTOFF,
02147 BFD_RELOC_16_PLTOFF,
02148 BFD_RELOC_LO16_PLTOFF,
02149 BFD_RELOC_HI16_PLTOFF,
02150 BFD_RELOC_HI16_S_PLTOFF,
02151 BFD_RELOC_8_PLTOFF,
02152
02153
02154 BFD_RELOC_68K_GLOB_DAT,
02155 BFD_RELOC_68K_JMP_SLOT,
02156 BFD_RELOC_68K_RELATIVE,
02157
02158
02159 BFD_RELOC_32_BASEREL,
02160 BFD_RELOC_16_BASEREL,
02161 BFD_RELOC_LO16_BASEREL,
02162 BFD_RELOC_HI16_BASEREL,
02163 BFD_RELOC_HI16_S_BASEREL,
02164 BFD_RELOC_8_BASEREL,
02165 BFD_RELOC_RVA,
02166
02167
02168 BFD_RELOC_8_FFnn,
02169
02170
02171
02172
02173
02174
02175
02176 BFD_RELOC_32_PCREL_S2,
02177 BFD_RELOC_16_PCREL_S2,
02178 BFD_RELOC_23_PCREL_S2,
02179
02180
02181
02182 BFD_RELOC_HI22,
02183 BFD_RELOC_LO10,
02184
02185
02186
02187
02188
02189 BFD_RELOC_GPREL16,
02190 BFD_RELOC_GPREL32,
02191
02192
02193 BFD_RELOC_I960_CALLJ,
02194
02195
02196
02197 BFD_RELOC_NONE,
02198 BFD_RELOC_SPARC_WDISP22,
02199 BFD_RELOC_SPARC22,
02200 BFD_RELOC_SPARC13,
02201 BFD_RELOC_SPARC_GOT10,
02202 BFD_RELOC_SPARC_GOT13,
02203 BFD_RELOC_SPARC_GOT22,
02204 BFD_RELOC_SPARC_PC10,
02205 BFD_RELOC_SPARC_PC22,
02206 BFD_RELOC_SPARC_WPLT30,
02207 BFD_RELOC_SPARC_COPY,
02208 BFD_RELOC_SPARC_GLOB_DAT,
02209 BFD_RELOC_SPARC_JMP_SLOT,
02210 BFD_RELOC_SPARC_RELATIVE,
02211 BFD_RELOC_SPARC_UA16,
02212 BFD_RELOC_SPARC_UA32,
02213 BFD_RELOC_SPARC_UA64,
02214
02215
02216 BFD_RELOC_SPARC_BASE13,
02217 BFD_RELOC_SPARC_BASE22,
02218
02219
02220 #define BFD_RELOC_SPARC_64 BFD_RELOC_64
02221 BFD_RELOC_SPARC_10,
02222 BFD_RELOC_SPARC_11,
02223 BFD_RELOC_SPARC_OLO10,
02224 BFD_RELOC_SPARC_HH22,
02225 BFD_RELOC_SPARC_HM10,
02226 BFD_RELOC_SPARC_LM22,
02227 BFD_RELOC_SPARC_PC_HH22,
02228 BFD_RELOC_SPARC_PC_HM10,
02229 BFD_RELOC_SPARC_PC_LM22,
02230 BFD_RELOC_SPARC_WDISP16,
02231 BFD_RELOC_SPARC_WDISP19,
02232 BFD_RELOC_SPARC_7,
02233 BFD_RELOC_SPARC_6,
02234 BFD_RELOC_SPARC_5,
02235 #define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
02236 BFD_RELOC_SPARC_PLT32,
02237 BFD_RELOC_SPARC_PLT64,
02238 BFD_RELOC_SPARC_HIX22,
02239 BFD_RELOC_SPARC_LOX10,
02240 BFD_RELOC_SPARC_H44,
02241 BFD_RELOC_SPARC_M44,
02242 BFD_RELOC_SPARC_L44,
02243 BFD_RELOC_SPARC_REGISTER,
02244
02245
02246 BFD_RELOC_SPARC_REV32,
02247
02248
02249 BFD_RELOC_SPARC_TLS_GD_HI22,
02250 BFD_RELOC_SPARC_TLS_GD_LO10,
02251 BFD_RELOC_SPARC_TLS_GD_ADD,
02252 BFD_RELOC_SPARC_TLS_GD_CALL,
02253 BFD_RELOC_SPARC_TLS_LDM_HI22,
02254 BFD_RELOC_SPARC_TLS_LDM_LO10,
02255 BFD_RELOC_SPARC_TLS_LDM_ADD,
02256 BFD_RELOC_SPARC_TLS_LDM_CALL,
02257 BFD_RELOC_SPARC_TLS_LDO_HIX22,
02258 BFD_RELOC_SPARC_TLS_LDO_LOX10,
02259 BFD_RELOC_SPARC_TLS_LDO_ADD,
02260 BFD_RELOC_SPARC_TLS_IE_HI22,
02261 BFD_RELOC_SPARC_TLS_IE_LO10,
02262 BFD_RELOC_SPARC_TLS_IE_LD,
02263 BFD_RELOC_SPARC_TLS_IE_LDX,
02264 BFD_RELOC_SPARC_TLS_IE_ADD,
02265 BFD_RELOC_SPARC_TLS_LE_HIX22,
02266 BFD_RELOC_SPARC_TLS_LE_LOX10,
02267 BFD_RELOC_SPARC_TLS_DTPMOD32,
02268 BFD_RELOC_SPARC_TLS_DTPMOD64,
02269 BFD_RELOC_SPARC_TLS_DTPOFF32,
02270 BFD_RELOC_SPARC_TLS_DTPOFF64,
02271 BFD_RELOC_SPARC_TLS_TPOFF32,
02272 BFD_RELOC_SPARC_TLS_TPOFF64,
02273
02274
02275
02276
02277
02278
02279
02280 BFD_RELOC_ALPHA_GPDISP_HI16,
02281
02282
02283
02284
02285
02286 BFD_RELOC_ALPHA_GPDISP_LO16,
02287
02288
02289
02290
02291 BFD_RELOC_ALPHA_GPDISP,
02292
02293
02294
02295
02296
02297
02298
02299
02300
02301
02302
02303
02304
02305
02306
02307
02308
02309
02310
02311
02312
02313
02314
02315
02316 BFD_RELOC_ALPHA_LITERAL,
02317 BFD_RELOC_ALPHA_ELF_LITERAL,
02318 BFD_RELOC_ALPHA_LITUSE,
02319
02320
02321
02322
02323 BFD_RELOC_ALPHA_HINT,
02324
02325
02326
02327 BFD_RELOC_ALPHA_LINKAGE,
02328
02329
02330
02331 BFD_RELOC_ALPHA_CODEADDR,
02332
02333
02334
02335 BFD_RELOC_ALPHA_GPREL_HI16,
02336 BFD_RELOC_ALPHA_GPREL_LO16,
02337
02338
02339
02340
02341 BFD_RELOC_ALPHA_BRSGP,
02342
02343
02344 BFD_RELOC_ALPHA_TLSGD,
02345 BFD_RELOC_ALPHA_TLSLDM,
02346 BFD_RELOC_ALPHA_DTPMOD64,
02347 BFD_RELOC_ALPHA_GOTDTPREL16,
02348 BFD_RELOC_ALPHA_DTPREL64,
02349 BFD_RELOC_ALPHA_DTPREL_HI16,
02350 BFD_RELOC_ALPHA_DTPREL_LO16,
02351 BFD_RELOC_ALPHA_DTPREL16,
02352 BFD_RELOC_ALPHA_GOTTPREL16,
02353 BFD_RELOC_ALPHA_TPREL64,
02354 BFD_RELOC_ALPHA_TPREL_HI16,
02355 BFD_RELOC_ALPHA_TPREL_LO16,
02356 BFD_RELOC_ALPHA_TPREL16,
02357
02358
02359
02360 BFD_RELOC_MIPS_JMP,
02361
02362
02363 BFD_RELOC_MIPS16_JMP,
02364
02365
02366 BFD_RELOC_MIPS16_GPREL,
02367
02368
02369 BFD_RELOC_HI16,
02370
02371
02372
02373
02374
02375 BFD_RELOC_HI16_S,
02376
02377
02378 BFD_RELOC_LO16,
02379
02380
02381 BFD_RELOC_MIPS16_HI16,
02382
02383
02384
02385
02386
02387 BFD_RELOC_MIPS16_HI16_S,
02388
02389
02390 BFD_RELOC_MIPS16_LO16,
02391
02392
02393 BFD_RELOC_MIPS_LITERAL,
02394
02395
02396 BFD_RELOC_MIPS_GOT16,
02397 BFD_RELOC_MIPS_CALL16,
02398 BFD_RELOC_MIPS_GOT_HI16,
02399 BFD_RELOC_MIPS_GOT_LO16,
02400 BFD_RELOC_MIPS_CALL_HI16,
02401 BFD_RELOC_MIPS_CALL_LO16,
02402 BFD_RELOC_MIPS_SUB,
02403 BFD_RELOC_MIPS_GOT_PAGE,
02404 BFD_RELOC_MIPS_GOT_OFST,
02405 BFD_RELOC_MIPS_GOT_DISP,
02406 BFD_RELOC_MIPS_SHIFT5,
02407 BFD_RELOC_MIPS_SHIFT6,
02408 BFD_RELOC_MIPS_INSERT_A,
02409 BFD_RELOC_MIPS_INSERT_B,
02410 BFD_RELOC_MIPS_DELETE,
02411 BFD_RELOC_MIPS_HIGHEST,
02412 BFD_RELOC_MIPS_HIGHER,
02413 BFD_RELOC_MIPS_SCN_DISP,
02414 BFD_RELOC_MIPS_REL16,
02415 BFD_RELOC_MIPS_RELGOT,
02416 BFD_RELOC_MIPS_JALR,
02417 BFD_RELOC_MIPS_TLS_DTPMOD32,
02418 BFD_RELOC_MIPS_TLS_DTPREL32,
02419 BFD_RELOC_MIPS_TLS_DTPMOD64,
02420 BFD_RELOC_MIPS_TLS_DTPREL64,
02421 BFD_RELOC_MIPS_TLS_GD,
02422 BFD_RELOC_MIPS_TLS_LDM,
02423 BFD_RELOC_MIPS_TLS_DTPREL_HI16,
02424 BFD_RELOC_MIPS_TLS_DTPREL_LO16,
02425 BFD_RELOC_MIPS_TLS_GOTTPREL,
02426 BFD_RELOC_MIPS_TLS_TPREL32,
02427 BFD_RELOC_MIPS_TLS_TPREL64,
02428 BFD_RELOC_MIPS_TLS_TPREL_HI16,
02429 BFD_RELOC_MIPS_TLS_TPREL_LO16,
02430
02431
02432
02433 BFD_RELOC_FRV_LABEL16,
02434 BFD_RELOC_FRV_LABEL24,
02435 BFD_RELOC_FRV_LO16,
02436 BFD_RELOC_FRV_HI16,
02437 BFD_RELOC_FRV_GPREL12,
02438 BFD_RELOC_FRV_GPRELU12,
02439 BFD_RELOC_FRV_GPREL32,
02440 BFD_RELOC_FRV_GPRELHI,
02441 BFD_RELOC_FRV_GPRELLO,
02442 BFD_RELOC_FRV_GOT12,
02443 BFD_RELOC_FRV_GOTHI,
02444 BFD_RELOC_FRV_GOTLO,
02445 BFD_RELOC_FRV_FUNCDESC,
02446 BFD_RELOC_FRV_FUNCDESC_GOT12,
02447 BFD_RELOC_FRV_FUNCDESC_GOTHI,
02448 BFD_RELOC_FRV_FUNCDESC_GOTLO,
02449 BFD_RELOC_FRV_FUNCDESC_VALUE,
02450 BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
02451 BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
02452 BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
02453 BFD_RELOC_FRV_GOTOFF12,
02454 BFD_RELOC_FRV_GOTOFFHI,
02455 BFD_RELOC_FRV_GOTOFFLO,
02456 BFD_RELOC_FRV_GETTLSOFF,
02457 BFD_RELOC_FRV_TLSDESC_VALUE,
02458 BFD_RELOC_FRV_GOTTLSDESC12,
02459 BFD_RELOC_FRV_GOTTLSDESCHI,
02460 BFD_RELOC_FRV_GOTTLSDESCLO,
02461 BFD_RELOC_FRV_TLSMOFF12,
02462 BFD_RELOC_FRV_TLSMOFFHI,
02463 BFD_RELOC_FRV_TLSMOFFLO,
02464 BFD_RELOC_FRV_GOTTLSOFF12,
02465 BFD_RELOC_FRV_GOTTLSOFFHI,
02466 BFD_RELOC_FRV_GOTTLSOFFLO,
02467 BFD_RELOC_FRV_TLSOFF,
02468 BFD_RELOC_FRV_TLSDESC_RELAX,
02469 BFD_RELOC_FRV_GETTLSOFF_RELAX,
02470 BFD_RELOC_FRV_TLSOFF_RELAX,
02471 BFD_RELOC_FRV_TLSMOFF,
02472
02473
02474
02475 BFD_RELOC_MN10300_GOTOFF24,
02476
02477
02478
02479 BFD_RELOC_MN10300_GOT32,
02480
02481
02482
02483 BFD_RELOC_MN10300_GOT24,
02484
02485
02486
02487 BFD_RELOC_MN10300_GOT16,
02488
02489
02490 BFD_RELOC_MN10300_COPY,
02491
02492
02493 BFD_RELOC_MN10300_GLOB_DAT,
02494
02495
02496 BFD_RELOC_MN10300_JMP_SLOT,
02497
02498
02499 BFD_RELOC_MN10300_RELATIVE,
02500
02501
02502
02503 BFD_RELOC_386_GOT32,
02504 BFD_RELOC_386_PLT32,
02505 BFD_RELOC_386_COPY,
02506 BFD_RELOC_386_GLOB_DAT,
02507 BFD_RELOC_386_JUMP_SLOT,
02508 BFD_RELOC_386_RELATIVE,
02509 BFD_RELOC_386_GOTOFF,
02510 BFD_RELOC_386_GOTPC,
02511 BFD_RELOC_386_TLS_TPOFF,
02512 BFD_RELOC_386_TLS_IE,
02513 BFD_RELOC_386_TLS_GOTIE,
02514 BFD_RELOC_386_TLS_LE,
02515 BFD_RELOC_386_TLS_GD,
02516 BFD_RELOC_386_TLS_LDM,
02517 BFD_RELOC_386_TLS_LDO_32,
02518 BFD_RELOC_386_TLS_IE_32,
02519 BFD_RELOC_386_TLS_LE_32,
02520 BFD_RELOC_386_TLS_DTPMOD32,
02521 BFD_RELOC_386_TLS_DTPOFF32,
02522 BFD_RELOC_386_TLS_TPOFF32,
02523
02524
02525 BFD_RELOC_X86_64_GOT32,
02526 BFD_RELOC_X86_64_PLT32,
02527 BFD_RELOC_X86_64_COPY,
02528 BFD_RELOC_X86_64_GLOB_DAT,
02529 BFD_RELOC_X86_64_JUMP_SLOT,
02530 BFD_RELOC_X86_64_RELATIVE,
02531 BFD_RELOC_X86_64_GOTPCREL,
02532 BFD_RELOC_X86_64_32S,
02533 BFD_RELOC_X86_64_DTPMOD64,
02534 BFD_RELOC_X86_64_DTPOFF64,
02535 BFD_RELOC_X86_64_TPOFF64,
02536 BFD_RELOC_X86_64_TLSGD,
02537 BFD_RELOC_X86_64_TLSLD,
02538 BFD_RELOC_X86_64_DTPOFF32,
02539 BFD_RELOC_X86_64_GOTTPOFF,
02540 BFD_RELOC_X86_64_TPOFF32,
02541
02542
02543 BFD_RELOC_NS32K_IMM_8,
02544 BFD_RELOC_NS32K_IMM_16,
02545 BFD_RELOC_NS32K_IMM_32,
02546 BFD_RELOC_NS32K_IMM_8_PCREL,
02547 BFD_RELOC_NS32K_IMM_16_PCREL,
02548 BFD_RELOC_NS32K_IMM_32_PCREL,
02549 BFD_RELOC_NS32K_DISP_8,
02550 BFD_RELOC_NS32K_DISP_16,
02551 BFD_RELOC_NS32K_DISP_32,
02552 BFD_RELOC_NS32K_DISP_8_PCREL,
02553 BFD_RELOC_NS32K_DISP_16_PCREL,
02554 BFD_RELOC_NS32K_DISP_32_PCREL,
02555
02556
02557 BFD_RELOC_PDP11_DISP_8_PCREL,
02558 BFD_RELOC_PDP11_DISP_6_PCREL,
02559
02560
02561 BFD_RELOC_PJ_CODE_HI16,
02562 BFD_RELOC_PJ_CODE_LO16,
02563 BFD_RELOC_PJ_CODE_DIR16,
02564 BFD_RELOC_PJ_CODE_DIR32,
02565 BFD_RELOC_PJ_CODE_REL16,
02566 BFD_RELOC_PJ_CODE_REL32,
02567
02568
02569 BFD_RELOC_PPC_B26,
02570 BFD_RELOC_PPC_BA26,
02571 BFD_RELOC_PPC_TOC16,
02572 BFD_RELOC_PPC_B16,
02573 BFD_RELOC_PPC_B16_BRTAKEN,
02574 BFD_RELOC_PPC_B16_BRNTAKEN,
02575 BFD_RELOC_PPC_BA16,
02576 BFD_RELOC_PPC_BA16_BRTAKEN,
02577 BFD_RELOC_PPC_BA16_BRNTAKEN,
02578 BFD_RELOC_PPC_COPY,
02579 BFD_RELOC_PPC_GLOB_DAT,
02580 BFD_RELOC_PPC_JMP_SLOT,
02581 BFD_RELOC_PPC_RELATIVE,
02582 BFD_RELOC_PPC_LOCAL24PC,
02583 BFD_RELOC_PPC_EMB_NADDR32,
02584 BFD_RELOC_PPC_EMB_NADDR16,
02585 BFD_RELOC_PPC_EMB_NADDR16_LO,
02586 BFD_RELOC_PPC_EMB_NADDR16_HI,
02587 BFD_RELOC_PPC_EMB_NADDR16_HA,
02588 BFD_RELOC_PPC_EMB_SDAI16,
02589 BFD_RELOC_PPC_EMB_SDA2I16,
02590 BFD_RELOC_PPC_EMB_SDA2REL,
02591 BFD_RELOC_PPC_EMB_SDA21,
02592 BFD_RELOC_PPC_EMB_MRKREF,
02593 BFD_RELOC_PPC_EMB_RELSEC16,
02594 BFD_RELOC_PPC_EMB_RELST_LO,
02595 BFD_RELOC_PPC_EMB_RELST_HI,
02596 BFD_RELOC_PPC_EMB_RELST_HA,
02597 BFD_RELOC_PPC_EMB_BIT_FLD,
02598 BFD_RELOC_PPC_EMB_RELSDA,
02599 BFD_RELOC_PPC64_HIGHER,
02600 BFD_RELOC_PPC64_HIGHER_S,
02601 BFD_RELOC_PPC64_HIGHEST,
02602 BFD_RELOC_PPC64_HIGHEST_S,
02603 BFD_RELOC_PPC64_TOC16_LO,
02604 BFD_RELOC_PPC64_TOC16_HI,
02605 BFD_RELOC_PPC64_TOC16_HA,
02606 BFD_RELOC_PPC64_TOC,
02607 BFD_RELOC_PPC64_PLTGOT16,
02608 BFD_RELOC_PPC64_PLTGOT16_LO,
02609 BFD_RELOC_PPC64_PLTGOT16_HI,
02610 BFD_RELOC_PPC64_PLTGOT16_HA,
02611 BFD_RELOC_PPC64_ADDR16_DS,
02612 BFD_RELOC_PPC64_ADDR16_LO_DS,
02613 BFD_RELOC_PPC64_GOT16_DS,
02614 BFD_RELOC_PPC64_GOT16_LO_DS,
02615 BFD_RELOC_PPC64_PLT16_LO_DS,
02616 BFD_RELOC_PPC64_SECTOFF_DS,
02617 BFD_RELOC_PPC64_SECTOFF_LO_DS,
02618 BFD_RELOC_PPC64_TOC16_DS,
02619 BFD_RELOC_PPC64_TOC16_LO_DS,
02620 BFD_RELOC_PPC64_PLTGOT16_DS,
02621 BFD_RELOC_PPC64_PLTGOT16_LO_DS,
02622
02623
02624 BFD_RELOC_PPC_TLS,
02625 BFD_RELOC_PPC_DTPMOD,
02626 BFD_RELOC_PPC_TPREL16,
02627 BFD_RELOC_PPC_TPREL16_LO,
02628 BFD_RELOC_PPC_TPREL16_HI,
02629 BFD_RELOC_PPC_TPREL16_HA,
02630 BFD_RELOC_PPC_TPREL,
02631 BFD_RELOC_PPC_DTPREL16,
02632 BFD_RELOC_PPC_DTPREL16_LO,
02633 BFD_RELOC_PPC_DTPREL16_HI,
02634 BFD_RELOC_PPC_DTPREL16_HA,
02635 BFD_RELOC_PPC_DTPREL,
02636 BFD_RELOC_PPC_GOT_TLSGD16,
02637 BFD_RELOC_PPC_GOT_TLSGD16_LO,
02638 BFD_RELOC_PPC_GOT_TLSGD16_HI,
02639 BFD_RELOC_PPC_GOT_TLSGD16_HA,
02640 BFD_RELOC_PPC_GOT_TLSLD16,
02641 BFD_RELOC_PPC_GOT_TLSLD16_LO,
02642 BFD_RELOC_PPC_GOT_TLSLD16_HI,
02643 BFD_RELOC_PPC_GOT_TLSLD16_HA,
02644 BFD_RELOC_PPC_GOT_TPREL16,
02645 BFD_RELOC_PPC_GOT_TPREL16_LO,
02646 BFD_RELOC_PPC_GOT_TPREL16_HI,
02647 BFD_RELOC_PPC_GOT_TPREL16_HA,
02648 BFD_RELOC_PPC_GOT_DTPREL16,
02649 BFD_RELOC_PPC_GOT_DTPREL16_LO,
02650 BFD_RELOC_PPC_GOT_DTPREL16_HI,
02651 BFD_RELOC_PPC_GOT_DTPREL16_HA,
02652 BFD_RELOC_PPC64_TPREL16_DS,
02653 BFD_RELOC_PPC64_TPREL16_LO_DS,
02654 BFD_RELOC_PPC64_TPREL16_HIGHER,
02655 BFD_RELOC_PPC64_TPREL16_HIGHERA,
02656 BFD_RELOC_PPC64_TPREL16_HIGHEST,
02657 BFD_RELOC_PPC64_TPREL16_HIGHESTA,
02658 BFD_RELOC_PPC64_DTPREL16_DS,
02659 BFD_RELOC_PPC64_DTPREL16_LO_DS,
02660 BFD_RELOC_PPC64_DTPREL16_HIGHER,
02661 BFD_RELOC_PPC64_DTPREL16_HIGHERA,
02662 BFD_RELOC_PPC64_DTPREL16_HIGHEST,
02663 BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
02664
02665
02666 BFD_RELOC_I370_D12,
02667
02668
02669
02670
02671 BFD_RELOC_CTOR,
02672
02673
02674
02675 BFD_RELOC_ARM_PCREL_BRANCH,
02676
02677
02678
02679
02680 BFD_RELOC_ARM_PCREL_BLX,
02681
02682
02683
02684
02685 BFD_RELOC_THUMB_PCREL_BLX,
02686
02687
02688
02689 BFD_RELOC_ARM_IMMEDIATE,
02690 BFD_RELOC_ARM_ADRL_IMMEDIATE,
02691 BFD_RELOC_ARM_OFFSET_IMM,
02692 BFD_RELOC_ARM_SHIFT_IMM,
02693 BFD_RELOC_ARM_SMI,
02694 BFD_RELOC_ARM_SWI,
02695 BFD_RELOC_ARM_MULTI,
02696 BFD_RELOC_ARM_CP_OFF_IMM,
02697 BFD_RELOC_ARM_CP_OFF_IMM_S2,
02698 BFD_RELOC_ARM_ADR_IMM,
02699 BFD_RELOC_ARM_LDR_IMM,
02700 BFD_RELOC_ARM_LITERAL,
02701 BFD_RELOC_ARM_IN_POOL,
02702 BFD_RELOC_ARM_OFFSET_IMM8,
02703 BFD_RELOC_ARM_HWLITERAL,
02704 BFD_RELOC_ARM_THUMB_ADD,
02705 BFD_RELOC_ARM_THUMB_IMM,
02706 BFD_RELOC_ARM_THUMB_SHIFT,
02707 BFD_RELOC_ARM_THUMB_OFFSET,
02708 BFD_RELOC_ARM_GOT12,
02709 BFD_RELOC_ARM_GOT32,
02710 BFD_RELOC_ARM_JUMP_SLOT,
02711 BFD_RELOC_ARM_COPY,
02712 BFD_RELOC_ARM_GLOB_DAT,
02713 BFD_RELOC_ARM_PLT32,
02714 BFD_RELOC_ARM_RELATIVE,
02715 BFD_RELOC_ARM_GOTOFF,
02716 BFD_RELOC_ARM_GOTPC,
02717
02718
02719
02720 BFD_RELOC_ARM_TARGET1,
02721
02722
02723 BFD_RELOC_ARM_ROSEGREL32,
02724
02725
02726 BFD_RELOC_ARM_SBREL32,
02727
02728
02729
02730
02731 BFD_RELOC_ARM_TARGET2,
02732
02733
02734 BFD_RELOC_ARM_PREL31,
02735
02736
02737 BFD_RELOC_SH_PCDISP8BY2,
02738 BFD_RELOC_SH_PCDISP12BY2,
02739 BFD_RELOC_SH_IMM3,
02740 BFD_RELOC_SH_IMM3U,
02741 BFD_RELOC_SH_DISP12,
02742 BFD_RELOC_SH_DISP12BY2,
02743 BFD_RELOC_SH_DISP12BY4,
02744 BFD_RELOC_SH_DISP12BY8,
02745 BFD_RELOC_SH_DISP20,
02746 BFD_RELOC_SH_DISP20BY8,
02747 BFD_RELOC_SH_IMM4,
02748 BFD_RELOC_SH_IMM4BY2,
02749 BFD_RELOC_SH_IMM4BY4,
02750 BFD_RELOC_SH_IMM8,
02751 BFD_RELOC_SH_IMM8BY2,
02752 BFD_RELOC_SH_IMM8BY4,
02753 BFD_RELOC_SH_PCRELIMM8BY2,
02754 BFD_RELOC_SH_PCRELIMM8BY4,
02755 BFD_RELOC_SH_SWITCH16,
02756 BFD_RELOC_SH_SWITCH32,
02757 BFD_RELOC_SH_USES,
02758 BFD_RELOC_SH_COUNT,
02759 BFD_RELOC_SH_ALIGN,
02760 BFD_RELOC_SH_CODE,
02761 BFD_RELOC_SH_DATA,
02762 BFD_RELOC_SH_LABEL,
02763 BFD_RELOC_SH_LOOP_START,
02764 BFD_RELOC_SH_LOOP_END,
02765 BFD_RELOC_SH_COPY,
02766 BFD_RELOC_SH_GLOB_DAT,
02767 BFD_RELOC_SH_JMP_SLOT,
02768 BFD_RELOC_SH_RELATIVE,
02769 BFD_RELOC_SH_GOTPC,
02770 BFD_RELOC_SH_GOT_LOW16,
02771 BFD_RELOC_SH_GOT_MEDLOW16,
02772 BFD_RELOC_SH_GOT_MEDHI16,
02773 BFD_RELOC_SH_GOT_HI16,
02774 BFD_RELOC_SH_GOTPLT_LOW16,
02775 BFD_RELOC_SH_GOTPLT_MEDLOW16,
02776 BFD_RELOC_SH_GOTPLT_MEDHI16,
02777 BFD_RELOC_SH_GOTPLT_HI16,
02778 BFD_RELOC_SH_PLT_LOW16,
02779 BFD_RELOC_SH_PLT_MEDLOW16,
02780 BFD_RELOC_SH_PLT_MEDHI16,
02781 BFD_RELOC_SH_PLT_HI16,
02782 BFD_RELOC_SH_GOTOFF_LOW16,
02783 BFD_RELOC_SH_GOTOFF_MEDLOW16,
02784 BFD_RELOC_SH_GOTOFF_MEDHI16,
02785 BFD_RELOC_SH_GOTOFF_HI16,
02786 BFD_RELOC_SH_GOTPC_LOW16,
02787 BFD_RELOC_SH_GOTPC_MEDLOW16,
02788 BFD_RELOC_SH_GOTPC_MEDHI16,
02789 BFD_RELOC_SH_GOTPC_HI16,
02790 BFD_RELOC_SH_COPY64,
02791 BFD_RELOC_SH_GLOB_DAT64,
02792 BFD_RELOC_SH_JMP_SLOT64,
02793 BFD_RELOC_SH_RELATIVE64,
02794 BFD_RELOC_SH_GOT10BY4,
02795 BFD_RELOC_SH_GOT10BY8,
02796 BFD_RELOC_SH_GOTPLT10BY4,
02797 BFD_RELOC_SH_GOTPLT10BY8,
02798 BFD_RELOC_SH_GOTPLT32,
02799 BFD_RELOC_SH_SHMEDIA_CODE,
02800 BFD_RELOC_SH_IMMU5,
02801 BFD_RELOC_SH_IMMS6,
02802 BFD_RELOC_SH_IMMS6BY32,
02803 BFD_RELOC_SH_IMMU6,
02804 BFD_RELOC_SH_IMMS10,
02805 BFD_RELOC_SH_IMMS10BY2,
02806 BFD_RELOC_SH_IMMS10BY4,
02807 BFD_RELOC_SH_IMMS10BY8,
02808 BFD_RELOC_SH_IMMS16,
02809 BFD_RELOC_SH_IMMU16,
02810 BFD_RELOC_SH_IMM_LOW16,
02811 BFD_RELOC_SH_IMM_LOW16_PCREL,
02812 BFD_RELOC_SH_IMM_MEDLOW16,
02813 BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
02814 BFD_RELOC_SH_IMM_MEDHI16,
02815 BFD_RELOC_SH_IMM_MEDHI16_PCREL,
02816 BFD_RELOC_SH_IMM_HI16,
02817 BFD_RELOC_SH_IMM_HI16_PCREL,
02818 BFD_RELOC_SH_PT_16,
02819 BFD_RELOC_SH_TLS_GD_32,
02820 BFD_RELOC_SH_TLS_LD_32,
02821 BFD_RELOC_SH_TLS_LDO_32,
02822 BFD_RELOC_SH_TLS_IE_32,
02823 BFD_RELOC_SH_TLS_LE_32,
02824 BFD_RELOC_SH_TLS_DTPMOD32,
02825 BFD_RELOC_SH_TLS_DTPOFF32,
02826 BFD_RELOC_SH_TLS_TPOFF32,
02827
02828
02829
02830 BFD_RELOC_THUMB_PCREL_BRANCH9,
02831 BFD_RELOC_THUMB_PCREL_BRANCH12,
02832 BFD_RELOC_THUMB_PCREL_BRANCH23,
02833
02834
02835
02836
02837
02838 BFD_RELOC_ARC_B22_PCREL,
02839
02840
02841
02842
02843 BFD_RELOC_ARC_B26,
02844
02845
02846
02847
02848 BFD_RELOC_D10V_10_PCREL_R,
02849
02850
02851
02852
02853
02854
02855 BFD_RELOC_D10V_10_PCREL_L,
02856
02857
02858
02859 BFD_RELOC_D10V_18,
02860
02861
02862
02863 BFD_RELOC_D10V_18_PCREL,
02864
02865
02866
02867 BFD_RELOC_D30V_6,
02868
02869
02870
02871 BFD_RELOC_D30V_9_PCREL,
02872
02873
02874
02875
02876
02877 BFD_RELOC_D30V_9_PCREL_R,
02878
02879
02880
02881 BFD_RELOC_D30V_15,
02882
02883
02884
02885 BFD_RELOC_D30V_15_PCREL,
02886
02887
02888
02889
02890
02891 BFD_RELOC_D30V_15_PCREL_R,
02892
02893
02894
02895 BFD_RELOC_D30V_21,
02896
02897
02898
02899 BFD_RELOC_D30V_21_PCREL,
02900
02901
02902
02903
02904
02905 BFD_RELOC_D30V_21_PCREL_R,
02906
02907
02908 BFD_RELOC_D30V_32,
02909
02910
02911 BFD_RELOC_D30V_32_PCREL,
02912
02913
02914 BFD_RELOC_DLX_HI16_S,
02915
02916
02917 BFD_RELOC_DLX_LO16,
02918
02919
02920 BFD_RELOC_DLX_JMP26,
02921
02922
02923
02924 BFD_RELOC_M32R_24,
02925
02926
02927 BFD_RELOC_M32R_10_PCREL,
02928
02929
02930 BFD_RELOC_M32R_18_PCREL,
02931
02932
02933 BFD_RELOC_M32R_26_PCREL,
02934
02935
02936
02937 BFD_RELOC_M32R_HI16_ULO,
02938
02939
02940
02941 BFD_RELOC_M32R_HI16_SLO,
02942
02943
02944 BFD_RELOC_M32R_LO16,
02945
02946
02947
02948 BFD_RELOC_M32R_SDA16,
02949
02950
02951 BFD_RELOC_M32R_GOT24,
02952 BFD_RELOC_M32R_26_PLTREL,
02953 BFD_RELOC_M32R_COPY,
02954 BFD_RELOC_M32R_GLOB_DAT,
02955 BFD_RELOC_M32R_JMP_SLOT,
02956 BFD_RELOC_M32R_RELATIVE,
02957 BFD_RELOC_M32R_GOTOFF,
02958 BFD_RELOC_M32R_GOTOFF_HI_ULO,
02959 BFD_RELOC_M32R_GOTOFF_HI_SLO,
02960 BFD_RELOC_M32R_GOTOFF_LO,
02961 BFD_RELOC_M32R_GOTPC24,
02962 BFD_RELOC_M32R_GOT16_HI_ULO,
02963 BFD_RELOC_M32R_GOT16_HI_SLO,
02964 BFD_RELOC_M32R_GOT16_LO,
02965 BFD_RELOC_M32R_GOTPC_HI_ULO,
02966 BFD_RELOC_M32R_GOTPC_HI_SLO,
02967 BFD_RELOC_M32R_GOTPC_LO,
02968
02969
02970 BFD_RELOC_V850_9_PCREL,
02971
02972
02973 BFD_RELOC_V850_22_PCREL,
02974
02975
02976 BFD_RELOC_V850_SDA_16_16_OFFSET,
02977
02978
02979
02980 BFD_RELOC_V850_SDA_15_16_OFFSET,
02981
02982
02983 BFD_RELOC_V850_ZDA_16_16_OFFSET,
02984
02985
02986
02987 BFD_RELOC_V850_ZDA_15_16_OFFSET,
02988
02989
02990
02991 BFD_RELOC_V850_TDA_6_8_OFFSET,
02992
02993
02994
02995 BFD_RELOC_V850_TDA_7_8_OFFSET,
02996
02997
02998 BFD_RELOC_V850_TDA_7_7_OFFSET,
02999
03000
03001 BFD_RELOC_V850_TDA_16_16_OFFSET,
03002
03003
03004
03005 BFD_RELOC_V850_TDA_4_5_OFFSET,
03006
03007
03008 BFD_RELOC_V850_TDA_4_4_OFFSET,
03009
03010
03011
03012 BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
03013
03014
03015
03016 BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
03017
03018
03019 BFD_RELOC_V850_CALLT_6_7_OFFSET,
03020
03021
03022 BFD_RELOC_V850_CALLT_16_16_OFFSET,
03023
03024
03025 BFD_RELOC_V850_LONGCALL,
03026
03027
03028 BFD_RELOC_V850_LONGJUMP,
03029
03030
03031 BFD_RELOC_V850_ALIGN,
03032
03033
03034
03035 BFD_RELOC_V850_LO16_SPLIT_OFFSET,
03036
03037
03038
03039 BFD_RELOC_MN10300_32_PCREL,
03040
03041
03042
03043 BFD_RELOC_MN10300_16_PCREL,
03044
03045
03046
03047
03048 BFD_RELOC_TIC30_LDP,
03049
03050
03051
03052
03053 BFD_RELOC_TIC54X_PARTLS7,
03054
03055
03056
03057
03058 BFD_RELOC_TIC54X_PARTMS9,
03059
03060
03061 BFD_RELOC_TIC54X_23,
03062
03063
03064
03065
03066 BFD_RELOC_TIC54X_16_OF_23,
03067
03068
03069
03070
03071 BFD_RELOC_TIC54X_MS7_OF_23,
03072
03073
03074 BFD_RELOC_FR30_48,
03075
03076
03077
03078 BFD_RELOC_FR30_20,
03079
03080
03081
03082 BFD_RELOC_FR30_6_IN_4,
03083
03084
03085
03086 BFD_RELOC_FR30_8_IN_8,
03087
03088
03089
03090 BFD_RELOC_FR30_9_IN_8,
03091
03092
03093
03094 BFD_RELOC_FR30_10_IN_8,
03095
03096
03097
03098 BFD_RELOC_FR30_9_PCREL,
03099
03100
03101
03102 BFD_RELOC_FR30_12_PCREL,
03103
03104
03105 BFD_RELOC_MCORE_PCREL_IMM8BY4,
03106 BFD_RELOC_MCORE_PCREL_IMM11BY2,
03107 BFD_RELOC_MCORE_PCREL_IMM4BY2,
03108 BFD_RELOC_MCORE_PCREL_32,
03109 BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
03110 BFD_RELOC_MCORE_RVA,
03111
03112
03113 BFD_RELOC_MMIX_GETA,
03114 BFD_RELOC_MMIX_GETA_1,
03115 BFD_RELOC_MMIX_GETA_2,
03116 BFD_RELOC_MMIX_GETA_3,
03117
03118
03119 BFD_RELOC_MMIX_CBRANCH,
03120 BFD_RELOC_MMIX_CBRANCH_J,
03121 BFD_RELOC_MMIX_CBRANCH_1,
03122 BFD_RELOC_MMIX_CBRANCH_2,
03123 BFD_RELOC_MMIX_CBRANCH_3,
03124
03125
03126 BFD_RELOC_MMIX_PUSHJ,
03127 BFD_RELOC_MMIX_PUSHJ_1,
03128 BFD_RELOC_MMIX_PUSHJ_2,
03129 BFD_RELOC_MMIX_PUSHJ_3,
03130 BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
03131
03132
03133 BFD_RELOC_MMIX_JMP,
03134 BFD_RELOC_MMIX_JMP_1,
03135 BFD_RELOC_MMIX_JMP_2,
03136 BFD_RELOC_MMIX_JMP_3,
03137
03138
03139
03140 BFD_RELOC_MMIX_ADDR19,
03141
03142
03143 BFD_RELOC_MMIX_ADDR27,
03144
03145
03146
03147 BFD_RELOC_MMIX_REG_OR_BYTE,
03148
03149
03150
03151 BFD_RELOC_MMIX_REG,
03152
03153
03154
03155 BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
03156
03157
03158
03159 BFD_RELOC_MMIX_LOCAL,
03160
03161
03162
03163 BFD_RELOC_AVR_7_PCREL,
03164
03165
03166
03167 BFD_RELOC_AVR_13_PCREL,
03168
03169
03170
03171 BFD_RELOC_AVR_16_PM,
03172
03173
03174
03175 BFD_RELOC_AVR_LO8_LDI,
03176
03177
03178
03179 BFD_RELOC_AVR_HI8_LDI,
03180
03181
03182
03183 BFD_RELOC_AVR_HH8_LDI,
03184
03185
03186
03187 BFD_RELOC_AVR_LO8_LDI_NEG,
03188
03189
03190
03191
03192 BFD_RELOC_AVR_HI8_LDI_NEG,
03193
03194
03195
03196
03197 BFD_RELOC_AVR_HH8_LDI_NEG,
03198
03199
03200
03201 BFD_RELOC_AVR_LO8_LDI_PM,
03202
03203
03204
03205 BFD_RELOC_AVR_HI8_LDI_PM,
03206
03207
03208
03209 BFD_RELOC_AVR_HH8_LDI_PM,
03210
03211
03212
03213 BFD_RELOC_AVR_LO8_LDI_PM_NEG,
03214
03215
03216
03217
03218 BFD_RELOC_AVR_HI8_LDI_PM_NEG,
03219
03220
03221
03222
03223 BFD_RELOC_AVR_HH8_LDI_PM_NEG,
03224
03225
03226
03227 BFD_RELOC_AVR_CALL,
03228
03229
03230
03231 BFD_RELOC_AVR_LDI,
03232
03233
03234
03235 BFD_RELOC_AVR_6,
03236
03237
03238
03239 BFD_RELOC_AVR_6_ADIW,
03240
03241
03242 BFD_RELOC_390_12,
03243
03244
03245 BFD_RELOC_390_GOT12,
03246
03247
03248 BFD_RELOC_390_PLT32,
03249
03250
03251 BFD_RELOC_390_COPY,
03252
03253
03254 BFD_RELOC_390_GLOB_DAT,
03255
03256
03257 BFD_RELOC_390_JMP_SLOT,
03258
03259
03260 BFD_RELOC_390_RELATIVE,
03261
03262
03263 BFD_RELOC_390_GOTPC,
03264
03265
03266 BFD_RELOC_390_GOT16,
03267
03268
03269 BFD_RELOC_390_PC16DBL,
03270
03271
03272 BFD_RELOC_390_PLT16DBL,
03273
03274
03275 BFD_RELOC_390_PC32DBL,
03276
03277
03278 BFD_RELOC_390_PLT32DBL,
03279
03280
03281 BFD_RELOC_390_GOTPCDBL,
03282
03283
03284 BFD_RELOC_390_GOT64,
03285
03286
03287 BFD_RELOC_390_PLT64,
03288
03289
03290 BFD_RELOC_390_GOTENT,
03291
03292
03293 BFD_RELOC_390_GOTOFF64,
03294
03295
03296 BFD_RELOC_390_GOTPLT12,
03297
03298
03299 BFD_RELOC_390_GOTPLT16,
03300
03301
03302 BFD_RELOC_390_GOTPLT32,
03303
03304
03305 BFD_RELOC_390_GOTPLT64,
03306
03307
03308 BFD_RELOC_390_GOTPLTENT,
03309
03310
03311 BFD_RELOC_390_PLTOFF16,
03312
03313
03314 BFD_RELOC_390_PLTOFF32,
03315
03316
03317 BFD_RELOC_390_PLTOFF64,
03318
03319
03320 BFD_RELOC_390_TLS_LOAD,
03321 BFD_RELOC_390_TLS_GDCALL,
03322 BFD_RELOC_390_TLS_LDCALL,
03323 BFD_RELOC_390_TLS_GD32,
03324 BFD_RELOC_390_TLS_GD64,
03325 BFD_RELOC_390_TLS_GOTIE12,
03326 BFD_RELOC_390_TLS_GOTIE32,
03327 BFD_RELOC_390_TLS_GOTIE64,
03328 BFD_RELOC_390_TLS_LDM32,
03329 BFD_RELOC_390_TLS_LDM64,
03330 BFD_RELOC_390_TLS_IE32,
03331 BFD_RELOC_390_TLS_IE64,
03332 BFD_RELOC_390_TLS_IEENT,
03333 BFD_RELOC_390_TLS_LE32,
03334 BFD_RELOC_390_TLS_LE64,
03335 BFD_RELOC_390_TLS_LDO32,
03336 BFD_RELOC_390_TLS_LDO64,
03337 BFD_RELOC_390_TLS_DTPMOD,
03338 BFD_RELOC_390_TLS_DTPOFF,
03339 BFD_RELOC_390_TLS_TPOFF,
03340
03341
03342 BFD_RELOC_390_20,
03343 BFD_RELOC_390_GOT20,
03344 BFD_RELOC_390_GOTPLT20,
03345 BFD_RELOC_390_TLS_GOTIE20,
03346
03347
03348 BFD_RELOC_IP2K_FR9,
03349
03350
03351 BFD_RELOC_IP2K_BANK,
03352
03353
03354 BFD_RELOC_IP2K_ADDR16CJP,
03355
03356
03357 BFD_RELOC_IP2K_PAGE3,
03358
03359
03360 BFD_RELOC_IP2K_LO8DATA,
03361 BFD_RELOC_IP2K_HI8DATA,
03362 BFD_RELOC_IP2K_EX8DATA,
03363
03364
03365 BFD_RELOC_IP2K_LO8INSN,
03366 BFD_RELOC_IP2K_HI8INSN,
03367
03368
03369 BFD_RELOC_IP2K_PC_SKIP,
03370
03371
03372 BFD_RELOC_IP2K_TEXT,
03373
03374
03375 BFD_RELOC_IP2K_FR_OFFSET,
03376
03377
03378 BFD_RELOC_VPE4KMATH_DATA,
03379 BFD_RELOC_VPE4KMATH_INSN,
03380
03381
03382
03383
03384
03385
03386
03387
03388
03389
03390
03391
03392
03393
03394
03395
03396
03397
03398 BFD_RELOC_VTABLE_INHERIT,
03399 BFD_RELOC_VTABLE_ENTRY,
03400
03401
03402 BFD_RELOC_IA64_IMM14,
03403 BFD_RELOC_IA64_IMM22,
03404 BFD_RELOC_IA64_IMM64,
03405 BFD_RELOC_IA64_DIR32MSB,
03406 BFD_RELOC_IA64_DIR32LSB,
03407 BFD_RELOC_IA64_DIR64MSB,
03408 BFD_RELOC_IA64_DIR64LSB,
03409 BFD_RELOC_IA64_GPREL22,
03410 BFD_RELOC_IA64_GPREL64I,
03411 BFD_RELOC_IA64_GPREL32MSB,
03412 BFD_RELOC_IA64_GPREL32LSB,
03413 BFD_RELOC_IA64_GPREL64MSB,
03414 BFD_RELOC_IA64_GPREL64LSB,
03415 BFD_RELOC_IA64_LTOFF22,
03416 BFD_RELOC_IA64_LTOFF64I,
03417 BFD_RELOC_IA64_PLTOFF22,
03418 BFD_RELOC_IA64_PLTOFF64I,
03419 BFD_RELOC_IA64_PLTOFF64MSB,
03420 BFD_RELOC_IA64_PLTOFF64LSB,
03421 BFD_RELOC_IA64_FPTR64I,
03422 BFD_RELOC_IA64_FPTR32MSB,
03423 BFD_RELOC_IA64_FPTR32LSB,
03424 BFD_RELOC_IA64_FPTR64MSB,
03425 BFD_RELOC_IA64_FPTR64LSB,
03426 BFD_RELOC_IA64_PCREL21B,
03427 BFD_RELOC_IA64_PCREL21BI,
03428 BFD_RELOC_IA64_PCREL21M,
03429 BFD_RELOC_IA64_PCREL21F,
03430 BFD_RELOC_IA64_PCREL22,
03431 BFD_RELOC_IA64_PCREL60B,
03432 BFD_RELOC_IA64_PCREL64I,
03433 BFD_RELOC_IA64_PCREL32MSB,
03434 BFD_RELOC_IA64_PCREL32LSB,
03435 BFD_RELOC_IA64_PCREL64MSB,
03436 BFD_RELOC_IA64_PCREL64LSB,
03437 BFD_RELOC_IA64_LTOFF_FPTR22,
03438 BFD_RELOC_IA64_LTOFF_FPTR64I,
03439 BFD_RELOC_IA64_LTOFF_FPTR32MSB,
03440 BFD_RELOC_IA64_LTOFF_FPTR32LSB,
03441 BFD_RELOC_IA64_LTOFF_FPTR64MSB,
03442 BFD_RELOC_IA64_LTOFF_FPTR64LSB,
03443 BFD_RELOC_IA64_SEGREL32MSB,
03444 BFD_RELOC_IA64_SEGREL32LSB,
03445 BFD_RELOC_IA64_SEGREL64MSB,
03446 BFD_RELOC_IA64_SEGREL64LSB,
03447 BFD_RELOC_IA64_SECREL32MSB,
03448 BFD_RELOC_IA64_SECREL32LSB,
03449 BFD_RELOC_IA64_SECREL64MSB,
03450 BFD_RELOC_IA64_SECREL64LSB,
03451 BFD_RELOC_IA64_REL32MSB,
03452 BFD_RELOC_IA64_REL32LSB,
03453 BFD_RELOC_IA64_REL64MSB,
03454 BFD_RELOC_IA64_REL64LSB,
03455 BFD_RELOC_IA64_LTV32MSB,
03456 BFD_RELOC_IA64_LTV32LSB,
03457 BFD_RELOC_IA64_LTV64MSB,
03458 BFD_RELOC_IA64_LTV64LSB,
03459 BFD_RELOC_IA64_IPLTMSB,
03460 BFD_RELOC_IA64_IPLTLSB,
03461 BFD_RELOC_IA64_COPY,
03462 BFD_RELOC_IA64_LTOFF22X,
03463 BFD_RELOC_IA64_LDXMOV,
03464 BFD_RELOC_IA64_TPREL14,
03465 BFD_RELOC_IA64_TPREL22,
03466 BFD_RELOC_IA64_TPREL64I,
03467 BFD_RELOC_IA64_TPREL64MSB,
03468 BFD_RELOC_IA64_TPREL64LSB,
03469 BFD_RELOC_IA64_LTOFF_TPREL22,
03470 BFD_RELOC_IA64_DTPMOD64MSB,
03471 BFD_RELOC_IA64_DTPMOD64LSB,
03472 BFD_RELOC_IA64_LTOFF_DTPMOD22,
03473 BFD_RELOC_IA64_DTPREL14,
03474 BFD_RELOC_IA64_DTPREL22,
03475 BFD_RELOC_IA64_DTPREL64I,
03476 BFD_RELOC_IA64_DTPREL32MSB,
03477 BFD_RELOC_IA64_DTPREL32LSB,
03478 BFD_RELOC_IA64_DTPREL64MSB,
03479 BFD_RELOC_IA64_DTPREL64LSB,
03480 BFD_RELOC_IA64_LTOFF_DTPREL22,
03481
03482
03483
03484 BFD_RELOC_M68HC11_HI8,
03485
03486
03487
03488 BFD_RELOC_M68HC11_LO8,
03489
03490
03491
03492 BFD_RELOC_M68HC11_3B,
03493
03494
03495
03496
03497
03498
03499 BFD_RELOC_M68HC11_RL_JUMP,
03500
03501
03502
03503
03504
03505 BFD_RELOC_M68HC11_RL_GROUP,
03506
03507
03508
03509
03510
03511 BFD_RELOC_M68HC11_LO16,
03512
03513
03514
03515
03516
03517 BFD_RELOC_M68HC11_PAGE,
03518
03519
03520
03521
03522
03523 BFD_RELOC_M68HC11_24,
03524
03525
03526
03527 BFD_RELOC_M68HC12_5B,
03528
03529
03530 BFD_RELOC_16C_NUM08,
03531 BFD_RELOC_16C_NUM08_C,
03532 BFD_RELOC_16C_NUM16,
03533 BFD_RELOC_16C_NUM16_C,
03534 BFD_RELOC_16C_NUM32,
03535 BFD_RELOC_16C_NUM32_C,
03536 BFD_RELOC_16C_DISP04,
03537 BFD_RELOC_16C_DISP04_C,
03538 BFD_RELOC_16C_DISP08,
03539 BFD_RELOC_16C_DISP08_C,
03540 BFD_RELOC_16C_DISP16,
03541 BFD_RELOC_16C_DISP16_C,
03542 BFD_RELOC_16C_DISP24,
03543 BFD_RELOC_16C_DISP24_C,
03544 BFD_RELOC_16C_DISP24a,
03545 BFD_RELOC_16C_DISP24a_C,
03546 BFD_RELOC_16C_REG04,
03547 BFD_RELOC_16C_REG04_C,
03548 BFD_RELOC_16C_REG04a,
03549 BFD_RELOC_16C_REG04a_C,
03550 BFD_RELOC_16C_REG14,
03551 BFD_RELOC_16C_REG14_C,
03552 BFD_RELOC_16C_REG16,
03553 BFD_RELOC_16C_REG16_C,
03554 BFD_RELOC_16C_REG20,
03555 BFD_RELOC_16C_REG20_C,
03556 BFD_RELOC_16C_ABS20,
03557 BFD_RELOC_16C_ABS20_C,
03558 BFD_RELOC_16C_ABS24,
03559 BFD_RELOC_16C_ABS24_C,
03560 BFD_RELOC_16C_IMM04,
03561 BFD_RELOC_16C_IMM04_C,
03562 BFD_RELOC_16C_IMM16,
03563 BFD_RELOC_16C_IMM16_C,
03564 BFD_RELOC_16C_IMM20,
03565 BFD_RELOC_16C_IMM20_C,
03566 BFD_RELOC_16C_IMM24,
03567 BFD_RELOC_16C_IMM24_C,
03568 BFD_RELOC_16C_IMM32,
03569 BFD_RELOC_16C_IMM32_C,
03570
03571
03572 BFD_RELOC_CRX_REL4,
03573 BFD_RELOC_CRX_REL8,
03574 BFD_RELOC_CRX_REL8_CMP,
03575 BFD_RELOC_CRX_REL16,
03576 BFD_RELOC_CRX_REL24,
03577 BFD_RELOC_CRX_REL32,
03578 BFD_RELOC_CRX_REGREL12,
03579 BFD_RELOC_CRX_REGREL22,
03580 BFD_RELOC_CRX_REGREL28,
03581 BFD_RELOC_CRX_REGREL32,
03582 BFD_RELOC_CRX_ABS16,
03583 BFD_RELOC_CRX_ABS32,
03584 BFD_RELOC_CRX_NUM8,
03585 BFD_RELOC_CRX_NUM16,
03586 BFD_RELOC_CRX_NUM32,
03587 BFD_RELOC_CRX_IMM16,
03588 BFD_RELOC_CRX_IMM32,
03589 BFD_RELOC_CRX_SWITCH8,
03590 BFD_RELOC_CRX_SWITCH16,
03591 BFD_RELOC_CRX_SWITCH32,
03592
03593
03594
03595 BFD_RELOC_CRIS_BDISP8,
03596 BFD_RELOC_CRIS_UNSIGNED_5,
03597 BFD_RELOC_CRIS_SIGNED_6,
03598 BFD_RELOC_CRIS_UNSIGNED_6,
03599 BFD_RELOC_CRIS_SIGNED_8,
03600 BFD_RELOC_CRIS_UNSIGNED_8,
03601 BFD_RELOC_CRIS_SIGNED_16,
03602 BFD_RELOC_CRIS_UNSIGNED_16,
03603 BFD_RELOC_CRIS_LAPCQ_OFFSET,
03604 BFD_RELOC_CRIS_UNSIGNED_4,
03605
03606
03607 BFD_RELOC_CRIS_COPY,
03608 BFD_RELOC_CRIS_GLOB_DAT,
03609 BFD_RELOC_CRIS_JUMP_SLOT,
03610 BFD_RELOC_CRIS_RELATIVE,
03611
03612
03613 BFD_RELOC_CRIS_32_GOT,
03614
03615
03616 BFD_RELOC_CRIS_16_GOT,
03617
03618
03619 BFD_RELOC_CRIS_32_GOTPLT,
03620
03621
03622 BFD_RELOC_CRIS_16_GOTPLT,
03623
03624
03625 BFD_RELOC_CRIS_32_GOTREL,
03626
03627
03628 BFD_RELOC_CRIS_32_PLT_GOTREL,
03629
03630
03631 BFD_RELOC_CRIS_32_PLT_PCREL,
03632
03633
03634 BFD_RELOC_860_COPY,
03635 BFD_RELOC_860_GLOB_DAT,
03636 BFD_RELOC_860_JUMP_SLOT,
03637 BFD_RELOC_860_RELATIVE,
03638 BFD_RELOC_860_PC26,
03639 BFD_RELOC_860_PLT26,
03640 BFD_RELOC_860_PC16,
03641 BFD_RELOC_860_LOW0,
03642 BFD_RELOC_860_SPLIT0,
03643 BFD_RELOC_860_LOW1,
03644 BFD_RELOC_860_SPLIT1,
03645 BFD_RELOC_860_LOW2,
03646 BFD_RELOC_860_SPLIT2,
03647 BFD_RELOC_860_LOW3,
03648 BFD_RELOC_860_LOGOT0,
03649 BFD_RELOC_860_SPGOT0,
03650 BFD_RELOC_860_LOGOT1,
03651 BFD_RELOC_860_SPGOT1,
03652 BFD_RELOC_860_LOGOTOFF0,
03653 BFD_RELOC_860_SPGOTOFF0,
03654 BFD_RELOC_860_LOGOTOFF1,
03655 BFD_RELOC_860_SPGOTOFF1,
03656 BFD_RELOC_860_LOGOTOFF2,
03657 BFD_RELOC_860_LOGOTOFF3,
03658 BFD_RELOC_860_LOPC,
03659 BFD_RELOC_860_HIGHADJ,
03660 BFD_RELOC_860_HAGOT,
03661 BFD_RELOC_860_HAGOTOFF,
03662 BFD_RELOC_860_HAPC,
03663 BFD_RELOC_860_HIGH,
03664 BFD_RELOC_860_HIGOT,
03665 BFD_RELOC_860_HIGOTOFF,
03666
03667
03668 BFD_RELOC_OPENRISC_ABS_26,
03669 BFD_RELOC_OPENRISC_REL_26,
03670
03671
03672 BFD_RELOC_H8_DIR16A8,
03673 BFD_RELOC_H8_DIR16R8,
03674 BFD_RELOC_H8_DIR24A8,
03675 BFD_RELOC_H8_DIR24R8,
03676 BFD_RELOC_H8_DIR32A16,
03677
03678
03679 BFD_RELOC_XSTORMY16_REL_12,
03680 BFD_RELOC_XSTORMY16_12,
03681 BFD_RELOC_XSTORMY16_24,
03682 BFD_RELOC_XSTORMY16_FPTR16,
03683
03684
03685 BFD_RELOC_VAX_GLOB_DAT,
03686 BFD_RELOC_VAX_JMP_SLOT,
03687 BFD_RELOC_VAX_RELATIVE,
03688
03689
03690 BFD_RELOC_MSP430_10_PCREL,
03691 BFD_RELOC_MSP430_16_PCREL,
03692 BFD_RELOC_MSP430_16,
03693 BFD_RELOC_MSP430_16_PCREL_BYTE,
03694 BFD_RELOC_MSP430_16_BYTE,
03695 BFD_RELOC_MSP430_2X_PCREL,
03696 BFD_RELOC_MSP430_RL_PCREL,
03697
03698
03699 BFD_RELOC_IQ2000_OFFSET_16,
03700 BFD_RELOC_IQ2000_OFFSET_21,
03701 BFD_RELOC_IQ2000_UHI16,
03702
03703
03704
03705
03706 BFD_RELOC_XTENSA_RTLD,
03707
03708
03709 BFD_RELOC_XTENSA_GLOB_DAT,
03710 BFD_RELOC_XTENSA_JMP_SLOT,
03711 BFD_RELOC_XTENSA_RELATIVE,
03712
03713
03714
03715 BFD_RELOC_XTENSA_PLT,
03716
03717
03718
03719
03720
03721
03722
03723 BFD_RELOC_XTENSA_DIFF8,
03724 BFD_RELOC_XTENSA_DIFF16,
03725 BFD_RELOC_XTENSA_DIFF32,
03726
03727
03728
03729
03730
03731 BFD_RELOC_XTENSA_SLOT0_OP,
03732 BFD_RELOC_XTENSA_SLOT1_OP,
03733 BFD_RELOC_XTENSA_SLOT2_OP,
03734 BFD_RELOC_XTENSA_SLOT3_OP,
03735 BFD_RELOC_XTENSA_SLOT4_OP,
03736 BFD_RELOC_XTENSA_SLOT5_OP,
03737 BFD_RELOC_XTENSA_SLOT6_OP,
03738 BFD_RELOC_XTENSA_SLOT7_OP,
03739 BFD_RELOC_XTENSA_SLOT8_OP,
03740 BFD_RELOC_XTENSA_SLOT9_OP,
03741 BFD_RELOC_XTENSA_SLOT10_OP,
03742 BFD_RELOC_XTENSA_SLOT11_OP,
03743 BFD_RELOC_XTENSA_SLOT12_OP,
03744 BFD_RELOC_XTENSA_SLOT13_OP,
03745 BFD_RELOC_XTENSA_SLOT14_OP,
03746
03747
03748
03749 BFD_RELOC_XTENSA_SLOT0_ALT,
03750 BFD_RELOC_XTENSA_SLOT1_ALT,
03751 BFD_RELOC_XTENSA_SLOT2_ALT,
03752 BFD_RELOC_XTENSA_SLOT3_ALT,
03753 BFD_RELOC_XTENSA_SLOT4_ALT,
03754 BFD_RELOC_XTENSA_SLOT5_ALT,
03755 BFD_RELOC_XTENSA_SLOT6_ALT,
03756 BFD_RELOC_XTENSA_SLOT7_ALT,
03757 BFD_RELOC_XTENSA_SLOT8_ALT,
03758 BFD_RELOC_XTENSA_SLOT9_ALT,
03759 BFD_RELOC_XTENSA_SLOT10_ALT,
03760 BFD_RELOC_XTENSA_SLOT11_ALT,
03761 BFD_RELOC_XTENSA_SLOT12_ALT,
03762 BFD_RELOC_XTENSA_SLOT13_ALT,
03763 BFD_RELOC_XTENSA_SLOT14_ALT,
03764
03765
03766
03767 BFD_RELOC_XTENSA_OP0,
03768 BFD_RELOC_XTENSA_OP1,
03769 BFD_RELOC_XTENSA_OP2,
03770
03771
03772
03773
03774 BFD_RELOC_XTENSA_ASM_EXPAND,
03775
03776
03777
03778
03779
03780 BFD_RELOC_XTENSA_ASM_SIMPLIFY,
03781 BFD_RELOC_UNUSED };
03782 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
03783 reloc_howto_type *bfd_reloc_type_lookup
03784 (bfd *abfd, bfd_reloc_code_real_type code);
03785
03786 const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
03787
03788
03789
03790 typedef struct bfd_symbol
03791 {
03792
03793
03794
03795
03796
03797
03798
03799
03800
03801 struct bfd *the_bfd;
03802
03803
03804
03805 const char *name;
03806
03807
03808
03809
03810 symvalue value;
03811
03812
03813 #define BSF_NO_FLAGS 0x00
03814
03815
03816
03817 #define BSF_LOCAL 0x01
03818
03819
03820
03821 #define BSF_GLOBAL 0x02
03822
03823
03824
03825 #define BSF_EXPORT BSF_GLOBAL
03826
03827
03828
03829
03830
03831
03832
03833 #define BSF_DEBUGGING 0x08
03834
03835
03836
03837 #define BSF_FUNCTION 0x10
03838
03839
03840 #define BSF_KEEP 0x20
03841 #define BSF_KEEP_G 0x40
03842
03843
03844
03845 #define BSF_WEAK 0x80
03846
03847
03848
03849 #define BSF_SECTION_SYM 0x100
03850
03851
03852
03853 #define BSF_OLD_COMMON 0x200
03854
03855
03856 #define BFD_FORT_COMM_DEFAULT_VALUE 0
03857
03858
03859
03860
03861
03862
03863 #define BSF_NOT_AT_END 0x400
03864
03865
03866 #define BSF_CONSTRUCTOR 0x800
03867
03868
03869
03870
03871
03872 #define BSF_WARNING 0x1000
03873
03874
03875
03876 #define BSF_INDIRECT 0x2000
03877
03878
03879
03880 #define BSF_FILE 0x4000
03881
03882
03883 #define BSF_DYNAMIC 0x8000
03884
03885
03886
03887 #define BSF_OBJECT 0x10000
03888
03889
03890
03891
03892 #define BSF_DEBUGGING_RELOC 0x20000
03893
03894
03895 #define BSF_THREAD_LOCAL 0x40000
03896
03897 flagword flags;
03898
03899
03900
03901
03902 struct bfd_section *section;
03903
03904
03905 union
03906 {
03907 void *p;
03908 bfd_vma i;
03909 }
03910 udata;
03911 }
03912 asymbol;
03913
03914 #define bfd_get_symtab_upper_bound(abfd) \
03915 BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
03916
03917 bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
03918
03919 bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
03920
03921 #define bfd_is_local_label_name(abfd, name) \
03922 BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
03923
03924 bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
03925
03926 #define bfd_is_target_special_symbol(abfd, sym) \
03927 BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
03928
03929 #define bfd_canonicalize_symtab(abfd, location) \
03930 BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
03931
03932 bfd_boolean bfd_set_symtab
03933 (bfd *abfd, asymbol **location, unsigned int count);
03934
03935 void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
03936
03937 #define bfd_make_empty_symbol(abfd) \
03938 BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
03939
03940 asymbol *_bfd_generic_make_empty_symbol (bfd *);
03941
03942 #define bfd_make_debug_symbol(abfd,ptr,size) \
03943 BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
03944
03945 int bfd_decode_symclass (asymbol *symbol);
03946
03947 bfd_boolean bfd_is_undefined_symclass (int symclass);
03948
03949 void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
03950
03951 bfd_boolean bfd_copy_private_symbol_data
03952 (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
03953
03954 #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
03955 BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
03956 (ibfd, isymbol, obfd, osymbol))
03957
03958
03959 struct bfd
03960 {
03961
03962 unsigned int id;
03963
03964
03965 const char *filename;
03966
03967
03968 const struct bfd_target *xvec;
03969
03970
03971
03972 void *iostream;
03973 const struct bfd_iovec *iovec;
03974
03975
03976
03977 bfd_boolean cacheable;
03978
03979
03980
03981
03982 bfd_boolean target_defaulted;
03983
03984
03985
03986 struct bfd *lru_prev, *lru_next;
03987
03988
03989
03990 ufile_ptr where;
03991
03992
03993 bfd_boolean opened_once;
03994
03995
03996
03997 bfd_boolean mtime_set;
03998
03999
04000 long mtime;
04001
04002
04003 int ifd;
04004
04005
04006 bfd_format format;
04007
04008
04009 enum bfd_direction
04010 {
04011 no_direction = 0,
04012 read_direction = 1,
04013 write_direction = 2,
04014 both_direction = 3
04015 }
04016 direction;
04017
04018
04019 flagword flags;
04020
04021
04022
04023
04024 ufile_ptr origin;
04025
04026
04027
04028 bfd_boolean output_has_begun;
04029
04030
04031 struct bfd_hash_table section_htab;
04032
04033
04034 struct bfd_section *sections;
04035
04036
04037 struct bfd_section **section_tail;
04038
04039
04040 unsigned int section_count;
04041
04042
04043
04044 bfd_vma start_address;
04045
04046
04047 unsigned int symcount;
04048
04049
04050 struct bfd_symbol **outsymbols;
04051
04052
04053 unsigned int dynsymcount;
04054
04055
04056 const struct bfd_arch_info *arch_info;
04057
04058
04059 bfd_boolean no_export;
04060
04061
04062 void *arelt_data;
04063 struct bfd *my_archive;
04064 struct bfd *next;
04065 struct bfd *archive_head;
04066 bfd_boolean has_armap;
04067
04068
04069 struct bfd *link_next;
04070
04071
04072
04073 int archive_pass;
04074
04075
04076 union
04077 {
04078 struct aout_data_struct *aout_data;
04079 struct artdata *aout_ar_data;
04080 struct _oasys_data *oasys_obj_data;
04081 struct _oasys_ar_data *oasys_ar_data;
04082 struct coff_tdata *coff_obj_data;
04083 struct pe_tdata *pe_obj_data;
04084 struct xcoff_tdata *xcoff_obj_data;
04085 struct ecoff_tdata *ecoff_obj_data;
04086 struct ieee_data_struct *ieee_data;
04087 struct ieee_ar_data_struct *ieee_ar_data;
04088 struct srec_data_struct *srec_data;
04089 struct ihex_data_struct *ihex_data;
04090 struct tekhex_data_struct *tekhex_data;
04091 struct elf_obj_tdata *elf_obj_data;
04092 struct nlm_obj_tdata *nlm_obj_data;
04093 struct bout_data_struct *bout_data;
04094 struct mmo_data_struct *mmo_data;
04095 struct sun_core_struct *sun_core_data;
04096 struct sco5_core_struct *sco5_core_data;
04097 struct trad_core_struct *trad_core_data;
04098 struct som_data_struct *som_data;
04099 struct hpux_core_struct *hpux_core_data;
04100 struct hppabsd_core_struct *hppabsd_core_data;
04101 struct sgi_core_struct *sgi_core_data;
04102 struct lynx_core_struct *lynx_core_data;
04103 struct osf_core_struct *osf_core_data;
04104 struct cisco_core_struct *cisco_core_data;
04105 struct versados_data_struct *versados_data;
04106 struct netbsd_core_struct *netbsd_core_data;
04107 struct mach_o_data_struct *mach_o_data;
04108 struct mach_o_fat_data_struct *mach_o_fat_data;
04109 struct bfd_pef_data_struct *pef_data;
04110 struct bfd_pef_xlib_data_struct *pef_xlib_data;
04111 struct bfd_sym_data_struct *sym_data;
04112 void *any;
04113 }
04114 tdata;
04115
04116
04117 void *usrdata;
04118
04119
04120
04121
04122 void *memory;
04123 };
04124
04125 typedef enum bfd_error
04126 {
04127 bfd_error_no_error = 0,
04128 bfd_error_system_call,
04129 bfd_error_invalid_target,
04130 bfd_error_wrong_format,
04131 bfd_error_wrong_object_format,
04132 bfd_error_invalid_operation,
04133 bfd_error_no_memory,
04134 bfd_error_no_symbols,
04135 bfd_error_no_armap,
04136 bfd_error_no_more_archived_files,
04137 bfd_error_malformed_archive,
04138 bfd_error_file_not_recognized,
04139 bfd_error_file_ambiguously_recognized,
04140 bfd_error_no_contents,
04141 bfd_error_nonrepresentable_section,
04142 bfd_error_no_debug_section,
04143 bfd_error_bad_value,
04144 bfd_error_file_truncated,
04145 bfd_error_file_too_big,
04146 bfd_error_invalid_error_code
04147 }
04148 bfd_error_type;
04149
04150 bfd_error_type bfd_get_error (void);
04151
04152 void bfd_set_error (bfd_error_type error_tag);
04153
04154 const char *bfd_errmsg (bfd_error_type error_tag);
04155
04156 void bfd_perror (const char *message);
04157
04158 typedef void (*bfd_error_handler_type) (const char *, ...);
04159
04160 bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
04161
04162 void bfd_set_error_program_name (const char *);
04163
04164 bfd_error_handler_type bfd_get_error_handler (void);
04165
04166 long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
04167
04168 long bfd_canonicalize_reloc
04169 (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
04170
04171 void bfd_set_reloc
04172 (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
04173
04174 bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
04175
04176 int bfd_get_arch_size (bfd *abfd);
04177
04178 int bfd_get_sign_extend_vma (bfd *abfd);
04179
04180 bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
04181
04182 unsigned int bfd_get_gp_size (bfd *abfd);
04183
04184 void bfd_set_gp_size (bfd *abfd, unsigned int i);
04185
04186 bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
04187
04188 bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
04189
04190 #define bfd_copy_private_header_data(ibfd, obfd) \
04191 BFD_SEND (obfd, _bfd_copy_private_header_data, \
04192 (ibfd, obfd))
04193 bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
04194
04195 #define bfd_copy_private_bfd_data(ibfd, obfd) \
04196 BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
04197 (ibfd, obfd))
04198 bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
04199
04200 #define bfd_merge_private_bfd_data(ibfd, obfd) \
04201 BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
04202 (ibfd, obfd))
04203 bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
04204
04205 #define bfd_set_private_flags(abfd, flags) \
04206 BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
04207 #define bfd_sizeof_headers(abfd, reloc) \
04208 BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
04209
04210 #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
04211 BFD_SEND (abfd, _bfd_find_nearest_line, \
04212 (abfd, sec, syms, off, file, func, line))
04213
04214 #define bfd_debug_info_start(abfd) \
04215 BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
04216
04217 #define bfd_debug_info_end(abfd) \
04218 BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
04219
04220 #define bfd_debug_info_accumulate(abfd, section) \
04221 BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
04222
04223 #define bfd_stat_arch_elt(abfd, stat) \
04224 BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
04225
04226 #define bfd_update_armap_timestamp(abfd) \
04227 BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
04228
04229 #define bfd_set_arch_mach(abfd, arch, mach)\
04230 BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
04231
04232 #define bfd_relax_section(abfd, section, link_info, again) \
04233 BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
04234
04235 #define bfd_gc_sections(abfd, link_info) \
04236 BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
04237
04238 #define bfd_merge_sections(abfd, link_info) \
04239 BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
04240
04241 #define bfd_is_group_section(abfd, sec) \
04242 BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
04243
04244 #define bfd_discard_group(abfd, sec) \
04245 BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
04246
04247 #define bfd_link_hash_table_create(abfd) \
04248 BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
04249
04250 #define bfd_link_hash_table_free(abfd, hash) \
04251 BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
04252
04253 #define bfd_link_add_symbols(abfd, info) \
04254 BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
04255
04256 #define bfd_link_just_syms(abfd, sec, info) \
04257 BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
04258
04259 #define bfd_final_link(abfd, info) \
04260 BFD_SEND (abfd, _bfd_final_link, (abfd, info))
04261
04262 #define bfd_free_cached_info(abfd) \
04263 BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
04264
04265 #define bfd_get_dynamic_symtab_upper_bound(abfd) \
04266 BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
04267
04268 #define bfd_print_private_bfd_data(abfd, file)\
04269 BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
04270
04271 #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
04272 BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
04273
04274 #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
04275 BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
04276 dyncount, dynsyms, ret))
04277
04278 #define bfd_get_dynamic_reloc_upper_bound(abfd) \
04279 BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
04280
04281 #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
04282 BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
04283
04284 extern bfd_byte *bfd_get_relocated_section_contents
04285 (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
04286 bfd_boolean, asymbol **);
04287
04288 bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
04289
04290 struct bfd_preserve
04291 {
04292 void *marker;
04293 void *tdata;
04294 flagword flags;
04295 const struct bfd_arch_info *arch_info;
04296 struct bfd_section *sections;
04297 struct bfd_section **section_tail;
04298 unsigned int section_count;
04299 struct bfd_hash_table section_htab;
04300 };
04301
04302 bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
04303
04304 void bfd_preserve_restore (bfd *, struct bfd_preserve *);
04305
04306 void bfd_preserve_finish (bfd *, struct bfd_preserve *);
04307
04308
04309 symindex bfd_get_next_mapent
04310 (bfd *abfd, symindex previous, carsym **sym);
04311
04312 bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
04313
04314 bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
04315
04316
04317 const char *bfd_core_file_failing_command (bfd *abfd);
04318
04319 int bfd_core_file_failing_signal (bfd *abfd);
04320
04321 bfd_boolean core_file_matches_executable_p
04322 (bfd *core_bfd, bfd *exec_bfd);
04323
04324
04325 #define BFD_SEND(bfd, message, arglist) \
04326 ((*((bfd)->xvec->message)) arglist)
04327
04328 #ifdef DEBUG_BFD_SEND
04329 #undef BFD_SEND
04330 #define BFD_SEND(bfd, message, arglist) \
04331 (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
04332 ((*((bfd)->xvec->message)) arglist) : \
04333 (bfd_assert (__FILE__,__LINE__), NULL))
04334 #endif
04335 #define BFD_SEND_FMT(bfd, message, arglist) \
04336 (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
04337
04338 #ifdef DEBUG_BFD_SEND
04339 #undef BFD_SEND_FMT
04340 #define BFD_SEND_FMT(bfd, message, arglist) \
04341 (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
04342 (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
04343 (bfd_assert (__FILE__,__LINE__), NULL))
04344 #endif
04345
04346 enum bfd_flavour
04347 {
04348 bfd_target_unknown_flavour,
04349 bfd_target_aout_flavour,
04350 bfd_target_coff_flavour,
04351 bfd_target_ecoff_flavour,
04352 bfd_target_xcoff_flavour,
04353 bfd_target_elf_flavour,
04354 bfd_target_ieee_flavour,
04355 bfd_target_nlm_flavour,
04356 bfd_target_oasys_flavour,
04357 bfd_target_tekhex_flavour,
04358 bfd_target_srec_flavour,
04359 bfd_target_ihex_flavour,
04360 bfd_target_som_flavour,
04361 bfd_target_os9k_flavour,
04362 bfd_target_versados_flavour,
04363 bfd_target_msdos_flavour,
04364 bfd_target_ovax_flavour,
04365 bfd_target_evax_flavour,
04366 bfd_target_mmo_flavour,
04367 bfd_target_mach_o_flavour,
04368 bfd_target_pef_flavour,
04369 bfd_target_pef_xlib_flavour,
04370 bfd_target_sym_flavour
04371 };
04372
04373 enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
04374
04375
04376 typedef struct bfd_link_info _bfd_link_info;
04377
04378 typedef struct bfd_target
04379 {
04380
04381 char *name;
04382
04383
04384
04385 enum bfd_flavour flavour;
04386
04387
04388 enum bfd_endian byteorder;
04389
04390
04391 enum bfd_endian header_byteorder;
04392
04393
04394
04395 flagword object_flags;
04396
04397
04398
04399 flagword section_flags;
04400
04401
04402
04403 char symbol_leading_char;
04404
04405
04406 char ar_pad_char;
04407
04408
04409 unsigned short ar_max_namelen;
04410
04411
04412
04413
04414 bfd_uint64_t (*bfd_getx64) (const void *);
04415 bfd_int64_t (*bfd_getx_signed_64) (const void *);
04416 void (*bfd_putx64) (bfd_uint64_t, void *);
04417 bfd_vma (*bfd_getx32) (const void *);
04418 bfd_signed_vma (*bfd_getx_signed_32) (const void *);
04419 void (*bfd_putx32) (bfd_vma, void *);
04420 bfd_vma (*bfd_getx16) (const void *);
04421 bfd_signed_vma (*bfd_getx_signed_16) (const void *);
04422 void (*bfd_putx16) (bfd_vma, void *);
04423
04424
04425 bfd_uint64_t (*bfd_h_getx64) (const void *);
04426 bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
04427 void (*bfd_h_putx64) (bfd_uint64_t, void *);
04428 bfd_vma (*bfd_h_getx32) (const void *);
04429 bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
04430 void (*bfd_h_putx32) (bfd_vma, void *);
04431 bfd_vma (*bfd_h_getx16) (const void *);
04432 bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
04433 void (*bfd_h_putx16) (bfd_vma, void *);
04434
04435
04436
04437
04438
04439 const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
04440
04441
04442 bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
04443
04444
04445 bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
04446
04447
04448
04449 #define BFD_JUMP_TABLE_GENERIC(NAME) \
04450 NAME##_close_and_cleanup, \
04451 NAME##_bfd_free_cached_info, \
04452 NAME##_new_section_hook, \
04453 NAME##_get_section_contents, \
04454 NAME##_get_section_contents_in_window
04455
04456
04457 bfd_boolean (*_close_and_cleanup) (bfd *);
04458
04459 bfd_boolean (*_bfd_free_cached_info) (bfd *);
04460
04461 bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
04462
04463 bfd_boolean (*_bfd_get_section_contents)
04464 (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
04465 bfd_boolean (*_bfd_get_section_contents_in_window)
04466 (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
04467
04468
04469 #define BFD_JUMP_TABLE_COPY(NAME) \
04470 NAME##_bfd_copy_private_bfd_data, \
04471 NAME##_bfd_merge_private_bfd_data, \
04472 NAME##_bfd_copy_private_section_data, \
04473 NAME##_bfd_copy_private_symbol_data, \
04474 NAME##_bfd_copy_private_header_data, \
04475 NAME##_bfd_set_private_flags, \
04476 NAME##_bfd_print_private_bfd_data
04477
04478
04479
04480 bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
04481
04482
04483 bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
04484
04485
04486 bfd_boolean (*_bfd_copy_private_section_data)
04487 (bfd *, sec_ptr, bfd *, sec_ptr);
04488
04489
04490 bfd_boolean (*_bfd_copy_private_symbol_data)
04491 (bfd *, asymbol *, bfd *, asymbol *);
04492
04493
04494 bfd_boolean (*_bfd_copy_private_header_data)
04495 (bfd *, bfd *);
04496
04497 bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
04498
04499
04500 bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
04501
04502
04503 #define BFD_JUMP_TABLE_CORE(NAME) \
04504 NAME##_core_file_failing_command, \
04505 NAME##_core_file_failing_signal, \
04506 NAME##_core_file_matches_executable_p
04507
04508 char * (*_core_file_failing_command) (bfd *);
04509 int (*_core_file_failing_signal) (bfd *);
04510 bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
04511
04512
04513 #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
04514 NAME##_slurp_armap, \
04515 NAME##_slurp_extended_name_table, \
04516 NAME##_construct_extended_name_table, \
04517 NAME##_truncate_arname, \
04518 NAME##_write_armap, \
04519 NAME##_read_ar_hdr, \
04520 NAME##_openr_next_archived_file, \
04521 NAME##_get_elt_at_index, \
04522 NAME##_generic_stat_arch_elt, \
04523 NAME##_update_armap_timestamp
04524
04525 bfd_boolean (*_bfd_slurp_armap) (bfd *);
04526 bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
04527 bfd_boolean (*_bfd_construct_extended_name_table)
04528 (bfd *, char **, bfd_size_type *, const char **);
04529 void (*_bfd_truncate_arname) (bfd *, const char *, char *);
04530 bfd_boolean (*write_armap)
04531 (bfd *, unsigned int, struct orl *, unsigned int, int);
04532 void * (*_bfd_read_ar_hdr_fn) (bfd *);
04533 bfd * (*openr_next_archived_file) (bfd *, bfd *);
04534 #define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
04535 bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
04536 int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
04537 bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
04538
04539
04540 #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
04541 NAME##_get_symtab_upper_bound, \
04542 NAME##_canonicalize_symtab, \
04543 NAME##_make_empty_symbol, \
04544 NAME##_print_symbol, \
04545 NAME##_get_symbol_info, \
04546 NAME##_bfd_is_local_label_name, \
04547 NAME##_bfd_is_target_special_symbol, \
04548 NAME##_get_lineno, \
04549 NAME##_find_nearest_line, \
04550 NAME##_bfd_make_debug_symbol, \
04551 NAME##_read_minisymbols, \
04552 NAME##_minisymbol_to_symbol
04553
04554 long (*_bfd_get_symtab_upper_bound) (bfd *);
04555 long (*_bfd_canonicalize_symtab)
04556 (bfd *, struct bfd_symbol **);
04557 struct bfd_symbol *
04558 (*_bfd_make_empty_symbol) (bfd *);
04559 void (*_bfd_print_symbol)
04560 (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
04561 #define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
04562 void (*_bfd_get_symbol_info)
04563 (bfd *, struct bfd_symbol *, symbol_info *);
04564 #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
04565 bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
04566 bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
04567 alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
04568 bfd_boolean (*_bfd_find_nearest_line)
04569 (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
04570 const char **, const char **, unsigned int *);
04571
04572
04573
04574 asymbol * (*_bfd_make_debug_symbol)
04575 (bfd *, void *, unsigned long size);
04576 #define bfd_read_minisymbols(b, d, m, s) \
04577 BFD_SEND (b, _read_minisymbols, (b, d, m, s))
04578 long (*_read_minisymbols)
04579 (bfd *, bfd_boolean, void **, unsigned int *);
04580 #define bfd_minisymbol_to_symbol(b, d, m, f) \
04581 BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
04582 asymbol * (*_minisymbol_to_symbol)
04583 (bfd *, bfd_boolean, const void *, asymbol *);
04584
04585
04586 #define BFD_JUMP_TABLE_RELOCS(NAME) \
04587 NAME##_get_reloc_upper_bound, \
04588 NAME##_canonicalize_reloc, \
04589 NAME##_bfd_reloc_type_lookup
04590
04591 long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
04592 long (*_bfd_canonicalize_reloc)
04593 (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
04594
04595 reloc_howto_type *
04596 (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
04597
04598
04599 #define BFD_JUMP_TABLE_WRITE(NAME) \
04600 NAME##_set_arch_mach, \
04601 NAME##_set_section_contents
04602
04603 bfd_boolean (*_bfd_set_arch_mach)
04604 (bfd *, enum bfd_architecture, unsigned long);
04605 bfd_boolean (*_bfd_set_section_contents)
04606 (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
04607
04608
04609 #define BFD_JUMP_TABLE_LINK(NAME) \
04610 NAME##_sizeof_headers, \
04611 NAME##_bfd_get_relocated_section_contents, \
04612 NAME##_bfd_relax_section, \
04613 NAME##_bfd_link_hash_table_create, \
04614 NAME##_bfd_link_hash_table_free, \
04615 NAME##_bfd_link_add_symbols, \
04616 NAME##_bfd_link_just_syms, \
04617 NAME##_bfd_final_link, \
04618 NAME##_bfd_link_split_section, \
04619 NAME##_bfd_gc_sections, \
04620 NAME##_bfd_merge_sections, \
04621 NAME##_bfd_is_group_section, \
04622 NAME##_bfd_discard_group, \
04623 NAME##_section_already_linked \
04624
04625 int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
04626 bfd_byte * (*_bfd_get_relocated_section_contents)
04627 (bfd *, struct bfd_link_info *, struct bfd_link_order *,
04628 bfd_byte *, bfd_boolean, struct bfd_symbol **);
04629
04630 bfd_boolean (*_bfd_relax_section)
04631 (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
04632
04633
04634
04635 struct bfd_link_hash_table *
04636 (*_bfd_link_hash_table_create) (bfd *);
04637
04638
04639 void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
04640
04641
04642 bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
04643
04644
04645 void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
04646
04647
04648
04649 bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
04650
04651
04652 bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
04653
04654
04655 bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
04656
04657
04658 bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
04659
04660
04661 bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
04662
04663
04664 bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
04665
04666
04667
04668 void (*_section_already_linked) (bfd *, struct bfd_section *);
04669
04670
04671 #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
04672 NAME##_get_dynamic_symtab_upper_bound, \
04673 NAME##_canonicalize_dynamic_symtab, \
04674 NAME##_get_synthetic_symtab, \
04675 NAME##_get_dynamic_reloc_upper_bound, \
04676 NAME##_canonicalize_dynamic_reloc
04677
04678
04679 long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
04680
04681 long (*_bfd_canonicalize_dynamic_symtab)
04682 (bfd *, struct bfd_symbol **);
04683
04684 long (*_bfd_get_synthetic_symtab)
04685 (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
04686 struct bfd_symbol **);
04687
04688 long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
04689
04690 long (*_bfd_canonicalize_dynamic_reloc)
04691 (bfd *, arelent **, struct bfd_symbol **);
04692
04693
04694 const struct bfd_target * alternative_target;
04695
04696
04697
04698 const void *backend_data;
04699
04700 } bfd_target;
04701
04702 bfd_boolean bfd_set_default_target (const char *name);
04703
04704 const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
04705
04706 const char ** bfd_target_list (void);
04707
04708 const bfd_target *bfd_search_for_target
04709 (int (*search_func) (const bfd_target *, void *),
04710 void *);
04711
04712
04713 bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
04714
04715 bfd_boolean bfd_check_format_matches
04716 (bfd *abfd, bfd_format format, char ***matching);
04717
04718 bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
04719
04720 const char *bfd_format_string (bfd_format format);
04721
04722
04723 bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
04724
04725 #define bfd_link_split_section(abfd, sec) \
04726 BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
04727
04728 void bfd_section_already_linked (bfd *abfd, asection *sec);
04729
04730 #define bfd_section_already_linked(abfd, sec) \
04731 BFD_SEND (abfd, _section_already_linked, (abfd, sec))
04732
04733
04734 bfd_byte *bfd_simple_get_relocated_section_contents
04735 (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
04736
04737 #ifdef __cplusplus
04738 }
04739 #endif
04740 #endif