Replace "Static" with "classname" so that results match the behaviour of the
[binutils.git] / bfd / elf32-sh64.h
blob87af05bc2c4a5a3745dea1c80dc38183537ebaf1
1 /* SH ELF support for BFD.
2 Copyright 2003 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Descriptor library.
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 2 of the License, or
9 (at your option) any later version.
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.
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 Foundation,
18 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 #ifndef ELF32_SH64_H
21 #define ELF32_SH64_H
23 #define SH64_CRANGES_SECTION_NAME ".cranges"
24 enum sh64_elf_cr_type {
25 CRT_NONE = 0,
26 CRT_DATA = 1,
27 CRT_SH5_ISA16 = 2,
28 CRT_SH5_ISA32 = 3
31 /* The official definition is this:
33 typedef struct {
34 Elf32_Addr cr_addr;
35 Elf32_Word cr_size;
36 Elf32_Half cr_type;
37 } Elf32_CRange;
39 but we have no use for that exact type. Instead we use this struct for
40 the internal representation. */
41 typedef struct {
42 bfd_vma cr_addr;
43 bfd_size_type cr_size;
44 enum sh64_elf_cr_type cr_type;
45 } sh64_elf_crange;
47 #define SH64_CRANGE_SIZE (4 + 4 + 2)
48 #define SH64_CRANGE_CR_ADDR_OFFSET 0
49 #define SH64_CRANGE_CR_SIZE_OFFSET 4
50 #define SH64_CRANGE_CR_TYPE_OFFSET (4 + 4)
52 /* Get the contents type of an arbitrary address, or return CRT_NONE. */
53 extern enum sh64_elf_cr_type sh64_get_contents_type
54 PARAMS ((asection *, bfd_vma, sh64_elf_crange *));
56 /* Simpler interface.
57 FIXME: This seems redundant now that we export the interface above. */
58 extern bfd_boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
60 extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
61 extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
62 extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
63 extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
65 struct sh64_section_data
67 flagword contents_flags;
69 /* Only used in the cranges section, but we don't have an official
70 backend-specific bfd field. */
71 bfd_size_type cranges_growth;
74 struct _sh64_elf_section_data
76 struct bfd_elf_section_data elf;
77 struct sh64_section_data *sh64_info;
80 #define sh64_elf_section_data(sec) \
81 ((struct _sh64_elf_section_data *) elf_section_data (sec))
83 #endif /* ELF32_SH64_H */