xref: /netbsd-src/external/gpl3/binutils/dist/bfd/elfxx-kvx.h (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
1 /* KVX-specific backend routines.
2    Copyright (C) 2009-2024 Free Software Foundation, Inc.
3    Contributed by Kalray SA.
4 
5    This file is part of BFD, the Binary File Descriptor library.
6 
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11 
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16 
17    You should have received a copy of the GNU General Public License
18    along with this program; see the file COPYING3. If not,
19    see <http://www.gnu.org/licenses/>.  */
20 
21 #include "bfd.h"
22 #include "elf-bfd.h"
23 #include "stdint.h"
24 
25 
26 /* KVX stub generation support for ELF64.  Called from the linker.  */
27 extern int elf64_kvx_setup_section_lists
28   (bfd *, struct bfd_link_info *);
29 extern void elf64_kvx_next_input_section
30   (struct bfd_link_info *, struct bfd_section *);
31 extern bool elf64_kvx_size_stubs
32   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
33    struct bfd_section * (*) (const char *, struct bfd_section *),
34    void (*) (void));
35 extern bool elf64_kvx_build_stubs
36   (struct bfd_link_info *);
37 /* Kvx stub generation support for ELF32.  Called from the linker.  */
38 extern int elf32_kvx_setup_section_lists
39   (bfd *, struct bfd_link_info *);
40 extern void elf32_kvx_next_input_section
41   (struct bfd_link_info *, struct bfd_section *);
42 extern bool elf32_kvx_size_stubs
43   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
44    struct bfd_section * (*) (const char *, struct bfd_section *),
45    void (*) (void));
46 extern bool elf32_kvx_build_stubs
47   (struct bfd_link_info *);
48 
49 
50 extern bfd_reloc_status_type
51 _bfd_kvx_elf_put_addend (bfd *, bfd_byte *, bfd_reloc_code_real_type,
52 			     reloc_howto_type *, bfd_signed_vma);
53 
54 bool
55 kvx_elf32_init_stub_bfd (struct bfd_link_info *info,
56 			bfd *stub_bfd);
57 bool
58 kvx_elf64_init_stub_bfd (struct bfd_link_info *info,
59 			bfd *stub_bfd);
60 
61 bool _bfd_kvx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note);
62 
63 bool _bfd_kvx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note);
64 
65 #define elf_backend_grok_prstatus _bfd_kvx_elf_grok_prstatus
66 #define elf_backend_grok_psinfo _bfd_kvx_elf_grok_psinfo
67