341
342
. bfd_boolean (*write_armap)
342
343
. (bfd *, unsigned int, struct orl *, unsigned int, int);
343
344
. void * (*_bfd_read_ar_hdr_fn) (bfd *);
345
. bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
344
346
. bfd * (*openr_next_archived_file) (bfd *, bfd *);
345
347
.#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
346
348
. bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
436
438
. NAME##_bfd_link_hash_table_free, \
437
439
. NAME##_bfd_link_add_symbols, \
438
440
. NAME##_bfd_link_just_syms, \
441
. NAME##_bfd_copy_link_hash_symbol_type, \
439
442
. NAME##_bfd_final_link, \
440
443
. NAME##_bfd_link_split_section, \
441
444
. NAME##_bfd_gc_sections, \
467
470
. {* Indicate that we are only retrieving symbol values from this section. *}
468
471
. void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
473
. {* Copy the symbol type of a linker hash table entry. *}
474
.#define bfd_copy_link_hash_symbol_type(b, t, f) \
475
. BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
476
. void (*_bfd_copy_link_hash_symbol_type)
477
. (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
470
479
. {* Do a link based on the link_order structures attached to each
471
480
. section of the BFD. *}
472
481
. bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
641
650
extern const bfd_target bfd_elf32_powerpc_vec;
642
651
extern const bfd_target bfd_elf32_powerpcle_vec;
643
652
extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
653
extern const bfd_target bfd_elf32_rx_le_vec;
654
extern const bfd_target bfd_elf32_rx_be_vec;
644
655
extern const bfd_target bfd_elf32_s390_vec;
645
656
extern const bfd_target bfd_elf32_bigscore_vec;
646
657
extern const bfd_target bfd_elf32_littlescore_vec;
1444
/* Helper function for bfd_get_target_info to determine the target's
1445
architecture. This method handles bfd internal target names as
1446
tuples and triplets. */
1448
_bfd_find_arch_match (const char *tname, const char **arch,
1449
const char **def_target_arch)
1454
while (*arch != NULL)
1456
const char *in_a = strstr (*arch, tname);
1457
char end_ch = (in_a ? in_a[strlen (tname)] : 0);
1459
if (in_a && (in_a == *arch || in_a[-1] == ':')
1462
*def_target_arch = *arch;
1474
const bfd_target *bfd_get_target_info (const char *target_name,
1476
bfd_boolean *is_bigendian,
1478
const char **def_target_arch);
1480
Return a pointer to the transfer vector for the object target
1481
named @var{target_name}. If @var{target_name} is <<NULL>>,
1482
choose the one in the environment variable <<GNUTARGET>>; if
1483
that is null or not defined, then choose the first entry in the
1484
target list. Passing in the string "default" or setting the
1485
environment variable to "default" will cause the first entry in
1486
the target list to be returned, and "target_defaulted" will be
1487
set in the BFD if @var{abfd} isn't <<NULL>>. This causes
1488
<<bfd_check_format>> to loop over all the targets to find the
1489
one that matches the file being read.
1490
If @var{is_bigendian} is not <<NULL>>, then set this value to target's
1491
endian mode. True for big-endian, FALSE for little-endian or for
1493
If @var{underscoring} is not <<NULL>>, then set this value to target's
1494
underscoring mode. Zero for none-underscoring, -1 for invalid target,
1495
else the value of target vector's symbol underscoring.
1496
If @var{def_target_arch} is not <<NULL>>, then set it to the architecture
1497
string specified by the target_name.
1500
bfd_get_target_info (const char *target_name, bfd *abfd,
1501
bfd_boolean *is_bigendian,
1502
int *underscoring, const char **def_target_arch)
1504
const bfd_target *target_vec;
1507
*is_bigendian = FALSE;
1510
if (def_target_arch)
1511
*def_target_arch = NULL;
1512
target_vec = bfd_find_target (target_name, abfd);
1516
*is_bigendian = ((target_vec->byteorder == BFD_ENDIAN_BIG) ? TRUE
1519
*underscoring = ((int) target_vec->symbol_leading_char) & 0xff;
1521
if (def_target_arch)
1523
const char *tname = target_vec->name;
1524
const char **arches = bfd_arch_list ();
1526
if (arches && tname)
1528
char *hyp = strchr (tname, '-');
1534
/* Make sure we detect architecture names
1535
for triplets like "pe-arm-wince-little". */
1536
if (!_bfd_find_arch_match (tname, arches, def_target_arch))
1540
strcpy (new_tname, hyp);
1541
while ((hyp = strrchr (new_tname, '-')) != NULL)
1544
if (_bfd_find_arch_match (new_tname, arches,
1551
_bfd_find_arch_match (tname, arches, def_target_arch);
1429
1562
bfd_target_list