1 /* ARC-specific support for PLT relocations.
2 Copyright (C) 2023 Free Software Foundation, Inc.
3 Contributed by Cupertino Miranda (cmiranda@synopsys.com).
5 This file is part of BFD, the Binary File Descriptor library.
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.
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.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
24 #define PLT_TYPE_START(NAME) \
25 const insn_hword NAME##_plt_entry[] = {
26 #define PLT_TYPE_END(NAME) };
27 #define PLT_ENTRY(...) __VA_ARGS__,
29 #define ENTRY_RELOC(...)
30 #define ELEM_RELOC(...)
32 #include "arc-plt.def"
41 #define PLT_TYPE_START(NAME) \
42 const struct plt_reloc NAME##_plt_entry_relocs[] = {
43 #define PLT_TYPE_END(NAME) \
44 {0, 0, 0, LAST_RELOC, 0} \
46 #define PLT_ENTRY(...)
48 #define ENTRY_RELOC(...) { __VA_ARGS__ },
49 #define ELEM_RELOC(...)
51 #include "arc-plt.def"
61 #define PLT_TYPE_START(NAME) \
62 const insn_hword NAME##_plt_elem[] = {
63 #define PLT_TYPE_END(NAME) };
64 #define PLT_ENTRY(...)
65 #define PLT_ELEM(...) __VA_ARGS__,
66 #define ENTRY_RELOC(...)
67 #define ELEM_RELOC(...)
69 #include "arc-plt.def"
78 #define PLT_TYPE_START(NAME) \
79 const struct plt_reloc NAME##_plt_elem_relocs[] = {
80 #define PLT_TYPE_END(NAME) \
81 {0, 0, 0, LAST_RELOC, 0} \
83 #define PLT_ENTRY(...)
85 #define ENTRY_RELOC(...)
86 #define ELEM_RELOC(...) { __VA_ARGS__ },
88 #include "arc-plt.def"
98 #define PLT_TYPE_START(NAME) \
100 .entry = &NAME##_plt_entry, \
101 .entry_size = sizeof (NAME##_plt_entry), \
102 .elem = &NAME##_plt_elem, \
103 .elem_size = sizeof (NAME##_plt_elem), \
104 .entry_relocs = NAME##_plt_entry_relocs, \
105 .elem_relocs = NAME##_plt_elem_relocs
106 #define PLT_TYPE_END(NAME) },
107 #define PLT_ENTRY(...)
108 #define PLT_ELEM(...)
109 #define ENTRY_RELOC(...)
110 #define ELEM_RELOC(...)
111 struct plt_version_t plt_versions
[PLT_MAX
] =
113 #include "arc-plt.def"
116 #undef PLT_TYPE_START