Lines Matching defs:elf

613 	Elf *elf;
654 /* Information when doing ELF related work. Only valid if efile.elf is not NULL */
1279 * avoid user freeing them before elf finish.
1296 if (!obj->efile.elf)
1299 elf_end(obj->efile.elf);
1300 obj->efile.elf = NULL;
1316 Elf *elf;
1318 if (obj->efile.elf) {
1319 pr_warn("elf: init internal error\n");
1325 elf = elf_memory((char *)obj->efile.obj_buf, obj->efile.obj_buf_sz);
1333 pr_warn("elf: failed to open %s: %s\n", obj->path, cp);
1337 elf = elf_begin(obj->efile.fd, ELF_C_READ_MMAP, NULL);
1340 if (!elf) {
1341 pr_warn("elf: failed to open %s as ELF file: %s\n", obj->path, elf_errmsg(-1));
1346 obj->efile.elf = elf;
1348 if (elf_kind(elf) != ELF_K_ELF) {
1350 pr_warn("elf: '%s' is not a proper ELF object\n", obj->path);
1354 if (gelf_getclass(elf) != ELFCLASS64) {
1356 pr_warn("elf: '%s' is not a 64-bit ELF object\n", obj->path);
1360 obj->efile.ehdr = ehdr = elf64_getehdr(elf);
1362 pr_warn("elf: failed to get ELF header from %s: %s\n", obj->path, elf_errmsg(-1));
1367 if (elf_getshdrstrndx(elf, &obj->efile.shstrndx)) {
1368 pr_warn("elf: failed to get section names section index for %s: %s\n",
1375 if (!elf_rawdata(elf_getscn(elf, obj->efile.shstrndx), NULL)) {
1376 pr_warn("elf: failed to get section names strings from %s: %s\n",
1384 pr_warn("elf: %s is not a valid eBPF object file\n", obj->path);
1406 pr_warn("elf: endianness mismatch in %s.\n", obj->path);
2631 pr_warn("elf: failed to get %s map definitions for %s\n",
3205 name = elf_strptr(obj->efile.elf, obj->efile.strtabidx, off);
3207 pr_warn("elf: failed to get section name string at offset %zu from %s: %s\n",
3219 name = elf_strptr(obj->efile.elf, obj->efile.shstrndx, off);
3221 pr_warn("elf: failed to get section name string at offset %zu from %s: %s\n",
3233 scn = elf_getscn(obj->efile.elf, idx);
3235 pr_warn("elf: failed to get section(%zu) from %s: %s\n",
3245 Elf *elf = obj->efile.elf;
3248 while ((scn = elf_nextscn(elf, scn)) != NULL) {
3270 pr_warn("elf: failed to get section(%zu) header from %s: %s\n",
3292 pr_warn("elf: failed to get section(%zu) name from %s: %s\n",
3309 pr_warn("elf: failed to get section(%zu) %s data from %s: %s\n",
3389 Elf *elf = obj->efile.elf;
3403 if (elf_getshdrnum(obj->efile.elf, &obj->efile.sec_cnt)) {
3404 pr_warn("elf: failed to get the number of sections for %s: %s\n",
3416 while ((scn = elf_nextscn(elf, scn)) != NULL) {
3423 pr_warn("elf: multiple symbol tables in %s\n", obj->path);
3440 pr_warn("elf: couldn't find symbol table in %s, stripped object file?\n",
3446 while ((scn = elf_nextscn(elf, scn)) != NULL) {
3465 pr_debug("elf: section(%d) %s, size %ld, link %d, flags %lx, type=%d\n",
3479 pr_warn("elf: legacy map definitions in 'maps' section are not supported by libbpf v1.0+\n");
3517 pr_info("elf: skipping unrecognized data section(%d) %s\n",
3532 pr_info("elf: skipping relo section(%d) %s for section(%d) %s\n",
3547 pr_info("elf: skipping section(%d) %s (size %zu)\n", idx, name,
3553 pr_warn("elf: symbol strings section missing or invalid in %s\n", obj->path);
11125 Elf *elf;
11150 elf = elf_memory((void *)entry.data, entry.data_length);
11151 if (!elf) {
11152 pr_warn("elf: could not read elf file %s from %s: %s\n", file_name, archive_path,
11158 ret = elf_find_func_offset(elf, file_name, func_name);
11160 pr_debug("elf: symbol address match for %s of %s in %s: 0x%x + 0x%lx = 0x%lx\n",
11165 elf_end(elf);