Coverage Report

Created: 2026-09-14 08:07

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/binutils-gdb/include/elf/h8.h
Line
Count
Source
1
/* H8300/h8500 ELF support for BFD.
2
   Copyright (C) 2001-2026 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 Foundation,
18
   Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
19
20
#ifndef _ELF_H8_H
21
#define _ELF_H8_H
22
23
#include "elf/reloc-macros.h"
24
25
/* Relocations.  */
26
/* Relocations 59..64 are GNU extensions.  */
27
64.0k
START_RELOC_NUMBERS (elf_h8_reloc_type)
28
64.0k
  RELOC_NUMBER (R_H8_NONE, 0)
29
1.12k
  RELOC_NUMBER (R_H8_DIR32, 1)
30
888
  RELOC_NUMBER (R_H8_DIR32_28, 2)
31
615
  RELOC_NUMBER (R_H8_DIR32_24, 3)
32
638
  RELOC_NUMBER (R_H8_DIR32_16, 4)
33
569
  RELOC_NUMBER (R_H8_DIR32U, 6)
34
583
  RELOC_NUMBER (R_H8_DIR32U_28, 7)
35
1.13k
  RELOC_NUMBER (R_H8_DIR32U_24, 8)
36
1.62k
  RELOC_NUMBER (R_H8_DIR32U_20, 9)
37
765
  RELOC_NUMBER (R_H8_DIR32U_16, 10)
38
513
  RELOC_NUMBER (R_H8_DIR24, 11)
39
356
  RELOC_NUMBER (R_H8_DIR24_20, 12)
40
390
  RELOC_NUMBER (R_H8_DIR24_16, 13)
41
387
  RELOC_NUMBER (R_H8_DIR24U, 14)
42
311
  RELOC_NUMBER (R_H8_DIR24U_20, 15)
43
630
  RELOC_NUMBER (R_H8_DIR24U_16, 16)
44
1.10k
  RELOC_NUMBER (R_H8_DIR16, 17)
45
500
  RELOC_NUMBER (R_H8_DIR16U, 18)
46
335
  RELOC_NUMBER (R_H8_DIR16S_32, 19)
47
377
  RELOC_NUMBER (R_H8_DIR16S_28, 20)
48
598
  RELOC_NUMBER (R_H8_DIR16S_24, 21)
49
381
  RELOC_NUMBER (R_H8_DIR16S_20, 22)
50
483
  RELOC_NUMBER (R_H8_DIR16S, 23)
51
427
  RELOC_NUMBER (R_H8_DIR8, 24)
52
239
  RELOC_NUMBER (R_H8_DIR8U, 25)
53
350
  RELOC_NUMBER (R_H8_DIR8Z_32, 26)
54
417
  RELOC_NUMBER (R_H8_DIR8Z_28, 27)
55
226
  RELOC_NUMBER (R_H8_DIR8Z_24, 28)
56
256
  RELOC_NUMBER (R_H8_DIR8Z_20, 29)
57
398
  RELOC_NUMBER (R_H8_DIR8Z_16, 30)
58
264
  RELOC_NUMBER (R_H8_PCREL16, 31)
59
742
  RELOC_NUMBER (R_H8_PCREL8, 32)
60
406
  RELOC_NUMBER (R_H8_BPOS, 33)
61
0
  FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34)
62
0
  FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58)
63
270
  RELOC_NUMBER (R_H8_DIR16A8, 59)
64
306
  RELOC_NUMBER (R_H8_DIR16R8, 60)
65
247
  RELOC_NUMBER (R_H8_DIR24A8, 61)
66
331
  RELOC_NUMBER (R_H8_DIR24R8, 62)
67
369
  RELOC_NUMBER (R_H8_DIR32A16, 63)
68
495
  RELOC_NUMBER (R_H8_DISP32A16, 64)
69
459
  RELOC_NUMBER (R_H8_ABS32, 65)
70
419
  RELOC_NUMBER (R_H8_ABS32A16, 127)
71
576
  RELOC_NUMBER (R_H8_SYM, 128)
72
295
  RELOC_NUMBER (R_H8_OPneg, 129)
73
601
  RELOC_NUMBER (R_H8_OPadd, 130)
74
298
  RELOC_NUMBER (R_H8_OPsub, 131)
75
282
  RELOC_NUMBER (R_H8_OPmul, 132)
76
307
  RELOC_NUMBER (R_H8_OPdiv, 133)
77
366
  RELOC_NUMBER (R_H8_OPshla, 134)
78
212
  RELOC_NUMBER (R_H8_OPshra, 135)
79
221
  RELOC_NUMBER (R_H8_OPsctsize, 136)
80
234
  RELOC_NUMBER (R_H8_OPhword, 137)
81
596
  RELOC_NUMBER (R_H8_OPlword, 138)
82
493
  RELOC_NUMBER (R_H8_OPhigh, 139)
83
223
  RELOC_NUMBER (R_H8_OPlow, 140)
84
473
  RELOC_NUMBER (R_H8_OPscttop, 141)
85
21.6k
END_RELOC_NUMBERS (R_H8_max)
86
87
/* Machine variant if we know it.  This field was invented at Cygnus,
88
   but it is hoped that other vendors will adopt it.  If some standard
89
   is developed, this code should be changed to follow it. */
90
91
1.01k
#define EF_H8_MACH    0x00FF0000
92
93
25
#define E_H8_MACH_H8300   0x00800000
94
3
#define E_H8_MACH_H8300H  0x00810000
95
6
#define E_H8_MACH_H8300S  0x00820000
96
41
#define E_H8_MACH_H8300HN 0x00830000
97
27
#define E_H8_MACH_H8300SN 0x00840000
98
6
#define E_H8_MACH_H8300SX 0x00850000
99
30
#define E_H8_MACH_H8300SXN  0x00860000
100
101
#endif