1/* POWER/PowerPC XCOFF linker support.
2   Copyright (C) 2019-2022 Free Software Foundation, Inc.
3
4   This file is part of BFD, the Binary File Descriptor library.
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 3 of the License, or
9   (at your option) any later version.
10
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this program; if not, write to the Free Software
18   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19   MA 02110-1301, USA.  */
20
21/* Used to pass info between ld and bfd.  */
22struct bfd_xcoff_link_params
23{
24  /* Linker stub bfd.  */
25  bfd *stub_bfd;
26
27  /* Linker call-backs.  */
28  asection * (*add_stub_section) (const char *, asection *);
29  void (*layout_sections_again) (void);
30};
31
32extern bool bfd_xcoff_split_import_path
33  (bfd *, const char *, const char **, const char **);
34extern bool bfd_xcoff_set_archive_import_path
35  (struct bfd_link_info *, bfd *, const char *);
36extern bool bfd_xcoff_link_record_set
37  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
38extern bool bfd_xcoff_import_symbol
39  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
40   const char *, const char *, const char *, unsigned int);
41extern bool bfd_xcoff_export_symbol
42  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
43extern bool bfd_xcoff_link_count_reloc
44  (bfd *, struct bfd_link_info *, const char *);
45extern bool bfd_xcoff_record_link_assignment
46  (bfd *, struct bfd_link_info *, const char *);
47extern bool bfd_xcoff_size_dynamic_sections
48  (bfd *, struct bfd_link_info *, const char *, const char *,
49   unsigned long, unsigned long, unsigned long, bool,
50   int, bool, unsigned int, struct bfd_section **, bool);
51extern bool bfd_xcoff_build_dynamic_sections
52  (bfd *, struct bfd_link_info *);
53extern bool bfd_xcoff_link_generate_rtinit
54  (bfd *, const char *, const char *, bool);
55extern bool bfd_xcoff_link_init
56  (struct bfd_link_info *, struct bfd_xcoff_link_params *);
57extern bool bfd_xcoff_size_stubs
58  (struct bfd_link_info *info);
59extern bool bfd_xcoff_build_stubs
60  (struct bfd_link_info *info);
61