Coverage Report

Created: 2026-02-24 06:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/elfutils/libelf/gelf_xlate.c
Line
Count
Source
1
/* Transformation functions for ELF data types.
2
   Copyright (C) 1998,1999,2000,2002,2004,2005,2006,2007,2015 Red Hat, Inc.
3
   Copyright (C) 2022 Mark J. Wielaard <mark@klomp.org>
4
   This file is part of elfutils.
5
   Written by Ulrich Drepper <drepper@redhat.com>, 1998.
6
7
   This file is free software; you can redistribute it and/or modify
8
   it under the terms of either
9
10
     * the GNU Lesser General Public License as published by the Free
11
       Software Foundation; either version 3 of the License, or (at
12
       your option) any later version
13
14
   or
15
16
     * the GNU General Public License as published by the Free
17
       Software Foundation; either version 2 of the License, or (at
18
       your option) any later version
19
20
   or both in parallel, as here.
21
22
   elfutils is distributed in the hope that it will be useful, but
23
   WITHOUT ANY WARRANTY; without even the implied warranty of
24
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25
   General Public License for more details.
26
27
   You should have received copies of the GNU General Public License and
28
   the GNU Lesser General Public License along with this program.  If
29
   not, see <http://www.gnu.org/licenses/>.  */
30
31
#ifdef HAVE_CONFIG_H
32
# include <config.h>
33
#endif
34
35
#include <stdint.h>
36
#include <string.h>
37
#include <stdlib.h>
38
39
#include "libelfP.h"
40
41
#ifndef LIBELFBITS
42
# define LIBELFBITS 32
43
#endif
44
45
46
/* Well, what shall I say.  Nothing to do here.  */
47
#define elf_cvt_Byte(dest, src, n) \
48
  (__builtin_constant_p (n) && (n) == 1               \
49
   ? (void) (*((char *) (dest)) = *((char *) (src)))            \
50
   : Elf32_cvt_Byte (dest, src, n))
51
static void
52
(elf_cvt_Byte) (void *dest, const void *src, size_t n,
53
    int encode __attribute__ ((unused)))
54
119
{
55
119
  if (n != 0)
56
108
    memmove (dest, src, n);
57
119
}
58
59
60
/* We'll optimize the definition of the conversion functions here a
61
   bit.  We need only functions for 16, 32, and 64 bits.  The
62
   functions referenced in the table will be aliases for one of these
63
   functions.  Which one is decided by the ELFxx_FSZ_type.  */
64
65
#if ALLOW_UNALIGNED
66
67
#define FETCH(Bits, ptr)  (*(const uint##Bits##_t *) ptr)
68
90.5M
#define STORE(Bits, ptr, val) (*(uint##Bits##_t *) ptr = val)
69
70
#else
71
72
union unaligned
73
  {
74
    uint16_t u16;
75
    uint32_t u32;
76
    uint64_t u64;
77
  } attribute_packed;
78
79
#define FETCH(Bits, ptr)  (((const union unaligned *) ptr)->u##Bits)
80
#define STORE(Bits, ptr, val) (((union unaligned *) ptr)->u##Bits = val)
81
82
#endif
83
84
/* Now define the conversion functions for the basic types.  We use here
85
   the fact that file and memory types are the same and that we have the
86
   ELFxx_FSZ_* macros.
87
88
   At the same time we define inline functions which we will use to
89
   convert the complex types.  */
90
#define FUNDAMENTAL(NAME, Name, Bits) \
91
  INLINE2 (ELFW2(Bits,FSZ_##NAME), ElfW2(Bits,cvt_##Name), ElfW2(Bits,Name))
92
#define INLINE2(Bytes, FName, TName) \
93
  INLINE3 (Bytes, FName, TName)
94
#define INLINE3(Bytes, FName, TName)                \
95
  static inline void FName##1 (void *dest, const void *ptr)         \
96
90.5M
  {                       \
97
90.5M
    switch (Bytes)                    \
98
90.5M
      {                       \
99
1.27M
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
88.6M
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
717k
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
90.5M
      }                       \
105
90.5M
  }                        \
gelf_xlate.c:Elf32_cvt_Addr1
Line
Count
Source
96
29.0M
  {                       \
97
29.0M
    switch (Bytes)                    \
98
29.0M
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
29.0M
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
0
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
29.0M
      }                       \
105
29.0M
  }                        \
gelf_xlate.c:Elf32_cvt_Sword1
Line
Count
Source
96
1.00M
  {                       \
97
1.00M
    switch (Bytes)                    \
98
1.00M
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
1.00M
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
0
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
1.00M
      }                       \
105
1.00M
  }                        \
gelf_xlate.c:Elf32_cvt_Half1
Line
Count
Source
96
842k
  {                       \
97
842k
    switch (Bytes)                    \
98
842k
      {                       \
99
842k
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
0
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
0
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
842k
      }                       \
105
842k
  }                        \
gelf_xlate.c:Elf32_cvt_Word1
Line
Count
Source
96
50.9M
  {                       \
97
50.9M
    switch (Bytes)                    \
98
50.9M
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
50.9M
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
0
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
50.9M
      }                       \
105
50.9M
  }                        \
gelf_xlate.c:Elf32_cvt_Off1
Line
Count
Source
96
6.17M
  {                       \
97
6.17M
    switch (Bytes)                    \
98
6.17M
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
6.17M
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
0
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
6.17M
      }                       \
105
6.17M
  }                        \
gelf_xlate.c:Elf32_cvt_Xword1
Line
Count
Source
96
58.5k
  {                       \
97
58.5k
    switch (Bytes)                    \
98
58.5k
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
0
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
58.5k
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
58.5k
      }                       \
105
58.5k
  }                        \
Unexecuted instantiation: gelf_xlate.c:Elf32_cvt_Sxword1
Unexecuted instantiation: gelf_xlate.c:Elf32_cvt_Relr1
gelf_xlate.c:Elf64_cvt_Addr1
Line
Count
Source
96
293k
  {                       \
97
293k
    switch (Bytes)                    \
98
293k
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
0
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
293k
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
293k
      }                       \
105
293k
  }                        \
gelf_xlate.c:Elf64_cvt_Xword1
Line
Count
Source
96
324k
  {                       \
97
324k
    switch (Bytes)                    \
98
324k
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
0
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
324k
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
324k
      }                       \
105
324k
  }                        \
gelf_xlate.c:Elf64_cvt_Half1
Line
Count
Source
96
428k
  {                       \
97
428k
    switch (Bytes)                    \
98
428k
      {                       \
99
428k
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
0
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
0
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
428k
      }                       \
105
428k
  }                        \
gelf_xlate.c:Elf64_cvt_Word1
Line
Count
Source
96
1.33M
  {                       \
97
1.33M
    switch (Bytes)                    \
98
1.33M
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
1.33M
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
0
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
1.33M
      }                       \
105
1.33M
  }                        \
gelf_xlate.c:Elf64_cvt_Off1
Line
Count
Source
96
21.6k
  {                       \
97
21.6k
    switch (Bytes)                    \
98
21.6k
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
0
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
21.6k
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
21.6k
      }                       \
105
21.6k
  }                        \
gelf_xlate.c:Elf64_cvt_Sxword1
Line
Count
Source
96
19.7k
  {                       \
97
19.7k
    switch (Bytes)                    \
98
19.7k
      {                       \
99
0
      case 2: STORE (16, dest, bswap_16 (FETCH (16, ptr))); break;       \
100
0
      case 4: STORE (32, dest, bswap_32 (FETCH (32, ptr))); break;       \
101
19.7k
      case 8: STORE (64, dest, bswap_64 (FETCH (64, ptr))); break;       \
102
0
      default:                      \
103
0
  abort ();                   \
104
19.7k
      }                       \
105
19.7k
  }                        \
Unexecuted instantiation: gelf_xlate.c:Elf64_cvt_Sword1
Unexecuted instantiation: gelf_xlate.c:Elf64_cvt_Relr1
106
                        \
107
  static void FName (void *dest, const void *ptr, size_t len,         \
108
         int encode __attribute__ ((unused)))         \
109
8.05k
  {                       \
110
8.05k
    size_t n = len / sizeof (TName);                \
111
8.05k
    if (dest < ptr)                   \
112
1.13M
      while (n-- > 0)                   \
113
1.12M
  {                     \
114
1.12M
    FName##1 (dest, ptr);                  \
115
1.12M
    dest += Bytes;                  \
116
1.12M
    ptr += Bytes;                   \
117
1.12M
  }                      \
118
8.05k
    else                      \
119
8.05k
      {                       \
120
5.54k
  dest += len;                    \
121
5.54k
  ptr += len;                   \
122
19.3M
  while (n-- > 0)                   \
123
19.3M
    {                     \
124
19.3M
      ptr -= Bytes;                 \
125
19.3M
      dest -= Bytes;                  \
126
19.3M
      FName##1 (dest, ptr);                \
127
19.3M
    }                      \
128
5.54k
      }                        \
129
8.05k
  }
gelf_xlate.c:Elf32_cvt_Addr
Line
Count
Source
109
1.15k
  {                       \
110
1.15k
    size_t n = len / sizeof (TName);                \
111
1.15k
    if (dest < ptr)                   \
112
98.0k
      while (n-- > 0)                   \
113
97.7k
  {                     \
114
97.7k
    FName##1 (dest, ptr);                  \
115
97.7k
    dest += Bytes;                  \
116
97.7k
    ptr += Bytes;                   \
117
97.7k
  }                      \
118
1.15k
    else                      \
119
1.15k
      {                       \
120
832
  dest += len;                    \
121
832
  ptr += len;                   \
122
15.2M
  while (n-- > 0)                   \
123
15.2M
    {                     \
124
15.2M
      ptr -= Bytes;                 \
125
15.2M
      dest -= Bytes;                  \
126
15.2M
      FName##1 (dest, ptr);                \
127
15.2M
    }                      \
128
832
      }                        \
129
1.15k
  }
gelf_xlate.c:Elf32_cvt_Half
Line
Count
Source
109
1.39k
  {                       \
110
1.39k
    size_t n = len / sizeof (TName);                \
111
1.39k
    if (dest < ptr)                   \
112
55.7k
      while (n-- > 0)                   \
113
55.4k
  {                     \
114
55.4k
    FName##1 (dest, ptr);                  \
115
55.4k
    dest += Bytes;                  \
116
55.4k
    ptr += Bytes;                   \
117
55.4k
  }                      \
118
1.39k
    else                      \
119
1.39k
      {                       \
120
1.08k
  dest += len;                    \
121
1.08k
  ptr += len;                   \
122
188k
  while (n-- > 0)                   \
123
187k
    {                     \
124
187k
      ptr -= Bytes;                 \
125
187k
      dest -= Bytes;                  \
126
187k
      FName##1 (dest, ptr);                \
127
187k
    }                      \
128
1.08k
      }                        \
129
1.39k
  }
Unexecuted instantiation: gelf_xlate.c:Elf32_cvt_Off
Unexecuted instantiation: gelf_xlate.c:Elf32_cvt_Sword
gelf_xlate.c:Elf32_cvt_Word
Line
Count
Source
109
2.44k
  {                       \
110
2.44k
    size_t n = len / sizeof (TName);                \
111
2.44k
    if (dest < ptr)                   \
112
508k
      while (n-- > 0)                   \
113
507k
  {                     \
114
507k
    FName##1 (dest, ptr);                  \
115
507k
    dest += Bytes;                  \
116
507k
    ptr += Bytes;                   \
117
507k
  }                      \
118
2.44k
    else                      \
119
2.44k
      {                       \
120
1.70k
  dest += len;                    \
121
1.70k
  ptr += len;                   \
122
2.89M
  while (n-- > 0)                   \
123
2.89M
    {                     \
124
2.89M
      ptr -= Bytes;                 \
125
2.89M
      dest -= Bytes;                  \
126
2.89M
      FName##1 (dest, ptr);                \
127
2.89M
    }                      \
128
1.70k
      }                        \
129
2.44k
  }
Unexecuted instantiation: gelf_xlate.c:Elf32_cvt_Xword
Unexecuted instantiation: gelf_xlate.c:Elf32_cvt_Sxword
Unexecuted instantiation: gelf_xlate.c:Elf32_cvt_Relr
gelf_xlate.c:Elf64_cvt_Addr
Line
Count
Source
109
828
  {                       \
110
828
    size_t n = len / sizeof (TName);                \
111
828
    if (dest < ptr)                   \
112
41.7k
      while (n-- > 0)                   \
113
41.4k
  {                     \
114
41.4k
    FName##1 (dest, ptr);                  \
115
41.4k
    dest += Bytes;                  \
116
41.4k
    ptr += Bytes;                   \
117
41.4k
  }                      \
118
828
    else                      \
119
828
      {                       \
120
573
  dest += len;                    \
121
573
  ptr += len;                   \
122
54.8k
  while (n-- > 0)                   \
123
54.2k
    {                     \
124
54.2k
      ptr -= Bytes;                 \
125
54.2k
      dest -= Bytes;                  \
126
54.2k
      FName##1 (dest, ptr);                \
127
54.2k
    }                      \
128
573
      }                        \
129
828
  }
gelf_xlate.c:Elf64_cvt_Half
Line
Count
Source
109
617
  {                       \
110
617
    size_t n = len / sizeof (TName);                \
111
617
    if (dest < ptr)                   \
112
37.8k
      while (n-- > 0)                   \
113
37.6k
  {                     \
114
37.6k
    FName##1 (dest, ptr);                  \
115
37.6k
    dest += Bytes;                  \
116
37.6k
    ptr += Bytes;                   \
117
37.6k
  }                      \
118
617
    else                      \
119
617
      {                       \
120
386
  dest += len;                    \
121
386
  ptr += len;                   \
122
63.6k
  while (n-- > 0)                   \
123
63.2k
    {                     \
124
63.2k
      ptr -= Bytes;                 \
125
63.2k
      dest -= Bytes;                  \
126
63.2k
      FName##1 (dest, ptr);                \
127
63.2k
    }                      \
128
386
      }                        \
129
617
  }
Unexecuted instantiation: gelf_xlate.c:Elf64_cvt_Off
Unexecuted instantiation: gelf_xlate.c:Elf64_cvt_Sword
gelf_xlate.c:Elf64_cvt_Word
Line
Count
Source
109
716
  {                       \
110
716
    size_t n = len / sizeof (TName);                \
111
716
    if (dest < ptr)                   \
112
383k
      while (n-- > 0)                   \
113
382k
  {                     \
114
382k
    FName##1 (dest, ptr);                  \
115
382k
    dest += Bytes;                  \
116
382k
    ptr += Bytes;                   \
117
382k
  }                      \
118
716
    else                      \
119
716
      {                       \
120
435
  dest += len;                    \
121
435
  ptr += len;                   \
122
817k
  while (n-- > 0)                   \
123
816k
    {                     \
124
816k
      ptr -= Bytes;                 \
125
816k
      dest -= Bytes;                  \
126
816k
      FName##1 (dest, ptr);                \
127
816k
    }                      \
128
435
      }                        \
129
716
  }
gelf_xlate.c:Elf64_cvt_Xword
Line
Count
Source
109
899
  {                       \
110
899
    size_t n = len / sizeof (TName);                \
111
899
    if (dest < ptr)                   \
112
6.97k
      while (n-- > 0)                   \
113
6.60k
  {                     \
114
6.60k
    FName##1 (dest, ptr);                  \
115
6.60k
    dest += Bytes;                  \
116
6.60k
    ptr += Bytes;                   \
117
6.60k
  }                      \
118
899
    else                      \
119
899
      {                       \
120
527
  dest += len;                    \
121
527
  ptr += len;                   \
122
55.5k
  while (n-- > 0)                   \
123
54.9k
    {                     \
124
54.9k
      ptr -= Bytes;                 \
125
54.9k
      dest -= Bytes;                  \
126
54.9k
      FName##1 (dest, ptr);                \
127
54.9k
    }                      \
128
527
      }                        \
129
899
  }
Unexecuted instantiation: gelf_xlate.c:Elf64_cvt_Sxword
Unexecuted instantiation: gelf_xlate.c:Elf64_cvt_Relr
130
131
132
/* Now the tricky part: define the transformation functions for the
133
   complex types.  We will use the definitions of the types in
134
   abstract.h.  */
135
#define START(Bits, Name, EName) \
136
  static void                     \
137
  ElfW2 (Bits, cvt_##Name) (void *dest, const void *src, size_t len,        \
138
          int encode __attribute__ ((unused)))        \
139
5.46M
  { ElfW2(Bits, Name) *tdest = (ElfW2(Bits, Name) *) dest;         \
140
5.46M
    ElfW2(Bits, Name) *tsrc = (ElfW2(Bits, Name) *) src;         \
141
5.46M
    size_t sz = sizeof (ElfW2(Bits, Name));             \
142
5.46M
    size_t n;                     \
143
18.9M
    for (n = len / sz; n > 0; ++tdest, ++tsrc, --n) {
144
#define END(Bits, Name)                   \
145
13.5M
    }                        \
146
5.46M
    if (len % sz > 0) /* Cannot convert partial structures, just copy. */     \
147
5.46M
      memmove (dest, src, len % sz);               \
148
5.46M
  }
149
#define TYPE_EXTRA(Code)
150
1.21M
#define TYPE_XLATE(Code) Code
151
69.1M
#define TYPE_NAME(Type, Name) TYPE_NAME2 (Type, Name)
152
69.1M
#define TYPE_NAME2(Type, Name) Type##1 (&tdest->Name, &tsrc->Name);
153
#define TYPE(Name, Bits) TYPE2 (Name, Bits)
154
#define TYPE2(Name, Bits) TYPE3 (Name##Bits)
155
#define TYPE3(Name) Name (cvt_)
156
157
/* Signal that we are generating conversion functions.  */
158
#define GENERATE_CONVERSION
159
160
/* First generate the 32-bit conversion functions.  */
161
#define LIBELFBITS 32
162
#include "gelf_xlate.h"
163
164
/* Now generate the 64-bit conversion functions.  */
165
#define LIBELFBITS 64
166
#include "gelf_xlate.h"
167
168
169
/* We have a few functions which we must create by hand since the sections
170
   do not contain records of only one type.  */
171
#include "version_xlate.h"
172
#include "gnuhash_xlate.h"
173
#include "note_xlate.h"
174
#include "chdr_xlate.h"
175
176
177
/* Now the externally visible table with the function pointers.  */
178
const xfct_t __elf_xfctstom[ELFCLASSNUM - 1][ELF_T_NUM] =
179
{
180
      [ELFCLASS32 - 1] = {
181
#define define_xfcts(Bits) \
182
  [ELF_T_BYTE]  = elf_cvt_Byte,               \
183
  [ELF_T_ADDR]  = ElfW2(Bits, cvt_Addr),            \
184
  [ELF_T_DYN] = ElfW2(Bits, cvt_Dyn),             \
185
  [ELF_T_EHDR]  = ElfW2(Bits, cvt_Ehdr),            \
186
  [ELF_T_HALF]  = ElfW2(Bits, cvt_Half),            \
187
  [ELF_T_OFF] = ElfW2(Bits, cvt_Off),             \
188
  [ELF_T_PHDR]  = ElfW2(Bits, cvt_Phdr),            \
189
  [ELF_T_RELA]  = ElfW2(Bits, cvt_Rela),            \
190
  [ELF_T_REL] = ElfW2(Bits, cvt_Rel),             \
191
  [ELF_T_SHDR]  = ElfW2(Bits, cvt_Shdr),            \
192
  [ELF_T_SWORD] = ElfW2(Bits, cvt_Sword),           \
193
  [ELF_T_SYM] = ElfW2(Bits, cvt_Sym),             \
194
  [ELF_T_WORD]  = ElfW2(Bits, cvt_Word),            \
195
  [ELF_T_XWORD] = ElfW2(Bits, cvt_Xword),           \
196
  [ELF_T_SXWORD]  = ElfW2(Bits, cvt_Sxword),            \
197
  [ELF_T_VDEF]  = elf_cvt_Verdef,             \
198
  [ELF_T_VDAUX] = elf_cvt_Verdef,             \
199
  [ELF_T_VNEED] = elf_cvt_Verneed,              \
200
  [ELF_T_VNAUX] = elf_cvt_Verneed,              \
201
  [ELF_T_NHDR]  = elf_cvt_note4,              \
202
  [ELF_T_NHDR8] = elf_cvt_note8,              \
203
  [ELF_T_SYMINFO] = ElfW2(Bits, cvt_Syminfo),           \
204
  [ELF_T_MOVE]  = ElfW2(Bits, cvt_Move),            \
205
  [ELF_T_LIB] = ElfW2(Bits, cvt_Lib),             \
206
  [ELF_T_AUXV]  = ElfW2(Bits, cvt_auxv_t),            \
207
  [ELF_T_CHDR]  = ElfW2(Bits, cvt_chdr),            \
208
  [ELF_T_RELR]  = ElfW2(Bits, cvt_Relr)
209
        define_xfcts (32),
210
  [ELF_T_GNUHASH] = Elf32_cvt_Word
211
      },
212
      [ELFCLASS64 - 1] = {
213
  define_xfcts (64),
214
  [ELF_T_GNUHASH] = elf_cvt_gnuhash
215
      }
216
};