27 bfelf_loader_ut::test_private_hash()
29 auto &&
str =
"strange char here: \200";
30 this->
expect_true(private_hash(static_cast<const char *>(
str)) != 0);
34 bfelf_loader_ut::test_private_relocate_invalid_relocation_dyn()
37 auto &&
data = get_test();
38 auto &&buff = std::get<0>(
data);
41 auto ret = bfelf_file_init(buff.get(),
size, &ef);
44 bfelf_rela relatab_dyn[1] = {};
45 bfelf_loader_t loader = {};
46 bfelf_sym symtab[1] = {};
49 auto exec = std::make_unique<char[]>(100);
51 ef.exec_addr = exec.get();
52 ef.exec_virt = exec.get();
54 ef.symtab =
static_cast<bfelf_sym *
>(symtab);
56 ef.relatab_dyn =
static_cast<bfelf_rela *
>(relatab_dyn);
60 gsl::at(relatab_dyn, 0).r_info = 0xFFFFFFFF;
61 gsl::at(relatab_dyn, 0).r_offset = 0x0;
63 gsl::at(symtab, 0).st_name = 0xFFFFF;
64 gsl::at(symtab, 0).st_value = 0x1;
70 bfelf_loader_ut::test_private_relocate_invalid_relocation_plt()
73 auto &&
data = get_test();
74 auto &&buff = std::get<0>(
data);
75 auto &&size = std::get<1>(
data);
77 auto ret = bfelf_file_init(buff.get(),
size, &ef);
80 bfelf_rela relatab_plt[1] = {};
81 bfelf_loader_t loader = {};
82 bfelf_sym symtab[1] = {};
85 auto exec = std::make_unique<char[]>(100);
87 ef.exec_addr = exec.get();
88 ef.exec_virt = exec.get();
90 ef.symtab =
static_cast<bfelf_sym *
>(symtab);
92 ef.relatab_plt =
static_cast<bfelf_rela *
>(relatab_plt);
96 gsl::at(relatab_plt, 0).r_info = 0xFFFFFFFF;
97 gsl::at(relatab_plt, 0).r_offset = 0x0;
99 gsl::at(symtab, 0).st_name = 0xFFFFF;
100 gsl::at(symtab, 0).st_value = 0x1;
106 bfelf_loader_ut::test_private_process_dynamic_section()
109 auto &&
data = get_test();
110 auto &&buff = std::get<0>(
data);
111 auto &&size = std::get<1>(
data);
113 auto ret = bfelf_file_init(buff.get(),
size, &ef);
116 private_process_dynamic_section(&ef);
119 private_process_dynamic_section(&ef);
122 private_process_dynamic_section(&ef);
#define BFELF_ERROR_UNSUPPORTED_RELA
int64_t unsigned long void * data
constexpr const auto size