Coverage Report

Created: 2025-10-10 07:06

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libbpf/elfutils/libelf/chdr_xlate.h
Line
Count
Source
1
#include "common.h"
2
3
/* These functions convert a while section, one Chdr plus compression data.  */
4
5
static void
6
Elf32_cvt_chdr (void *dest, const void *src, size_t len, int encode)
7
0
{
8
0
  if (len == 0)
9
0
    return;
10
11
  /* Move everything over, if necessary, we only need to xlate the
12
     header, not the compressed data following it.  */
13
0
  if (dest != src)
14
0
    memmove (dest, src, len);
15
16
0
  if (len >= sizeof (Elf32_Chdr))
17
0
    Elf32_cvt_Chdr (dest, src, sizeof (Elf32_Chdr), encode);
18
0
}
19
20
static void
21
Elf64_cvt_chdr (void *dest, const void *src, size_t len, int encode)
22
665
{
23
665
  if (len == 0)
24
0
    return;
25
26
  /* Move everything over, if necessary, we only need to xlate the
27
     header, not the compressed data following it.  */
28
665
  if (dest != src)
29
665
    memmove (dest, src, len);
30
31
665
  if (len >= sizeof (Elf64_Chdr))
32
455
    Elf64_cvt_Chdr (dest, src, sizeof (Elf64_Chdr), encode);
33
665
}