1 /* Initialization of BPF specific backend library.
2 This file is part of elfutils.
4 This file is free software; you can redistribute it and/or modify
5 it under the terms of either
7 * the GNU Lesser General Public License as published by the Free
8 Software Foundation; either version 3 of the License, or (at
9 your option) any later version
13 * the GNU General Public License as published by the Free
14 Software Foundation; either version 2 of the License, or (at
15 your option) any later version
17 or both in parallel, as here.
19 elfutils is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
24 You should have received copies of the GNU General Public License and
25 the GNU Lesser General Public License along with this program. If
26 not, see <http://www.gnu.org/licenses/>. */
33 #define RELOC_PREFIX R_BPF_
34 #include "libebl_CPU.h"
36 /* This defines the common reloc hooks based on bpf_reloc.def. */
37 #define NO_RELATIVE_RELOC
39 #include "common-reloc.c"
43 bpf_init (Elf *elf __attribute__ ((unused)),
44 GElf_Half machine __attribute__ ((unused)),
45 Ebl *eh, size_t ehlen)
47 /* Check whether the Elf_BH object has a sufficent size. */
48 if (ehlen < sizeof (Ebl))
54 HOOK (eh, register_info);