Lines Matching defs:elf
426 * Information when doing elf related work. Only valid if fd
433 Elf *elf;
476 #define obj_elf_valid(o) ((o)->efile.elf)
1062 * avoid user freeing them before elf finish.
1088 if (obj->efile.elf) {
1089 elf_end(obj->efile.elf);
1090 obj->efile.elf = NULL;
1116 pr_warn("elf: init internal error\n");
1125 obj->efile.elf = elf_memory((char *)obj->efile.obj_buf,
1134 pr_warn("elf: failed to open %s: %s\n", obj->path, cp);
1138 obj->efile.elf = elf_begin(obj->efile.fd, ELF_C_READ_MMAP, NULL);
1141 if (!obj->efile.elf) {
1142 pr_warn("elf: failed to open %s as ELF file: %s\n", obj->path, elf_errmsg(-1));
1147 if (!gelf_getehdr(obj->efile.elf, &obj->efile.ehdr)) {
1148 pr_warn("elf: failed to get ELF header from %s: %s\n", obj->path, elf_errmsg(-1));
1154 if (elf_getshdrstrndx(obj->efile.elf, &obj->efile.shstrndx)) {
1155 pr_warn("elf: failed to get section names section index for %s: %s\n",
1162 if (!elf_rawdata(elf_getscn(obj->efile.elf, obj->efile.shstrndx), NULL)) {
1163 pr_warn("elf: failed to get section names strings from %s: %s\n",
1172 pr_warn("elf: %s is not a valid eBPF object file\n", obj->path);
1194 pr_warn("elf: endianness mismatch in %s.\n", obj->path);
1764 pr_warn("elf: failed to get legacy map definitions for %s\n",
1787 pr_debug("elf: found %d legacy map definitions (%zd bytes) in %s\n",
1791 pr_warn("elf: unable to determine legacy map definition size in %s\n",
2298 pr_warn("elf: failed to get %s map definitions for %s\n",
2621 name = elf_strptr(obj->efile.elf, obj->efile.strtabidx, off);
2623 pr_warn("elf: failed to get section name string at offset %zu from %s: %s\n",
2635 name = elf_strptr(obj->efile.elf, obj->efile.shstrndx, off);
2637 pr_warn("elf: failed to get section name string at offset %zu from %s: %s\n",
2649 scn = elf_getscn(obj->efile.elf, idx);
2651 pr_warn("elf: failed to get section(%zu) from %s: %s\n",
2661 Elf *elf = obj->efile.elf;
2664 while ((scn = elf_nextscn(elf, scn)) != NULL) {
2683 pr_warn("elf: failed to get section(%zu) header from %s: %s\n",
2704 pr_warn("elf: failed to get section(%zu) name from %s: %s\n",
2721 pr_warn("elf: failed to get section(%zu) %s data from %s: %s\n",
2804 Elf *elf = obj->efile.elf;
2817 while ((scn = elf_nextscn(elf, scn)) != NULL) {
2823 pr_warn("elf: multiple symbol tables in %s\n", obj->path);
2838 while ((scn = elf_nextscn(elf, scn)) != NULL) {
2855 pr_debug("elf: section(%d) %s, size %ld, link %d, flags %lx, type=%d\n",
2895 pr_info("elf: skipping unrecognized data section(%d) %s\n",
2907 pr_info("elf: skipping relo section(%d) %s for section(%d) %s\n",
2927 pr_info("elf: skipping section(%d) %s (size %zu)\n", idx, name,
2933 pr_warn("elf: symbol strings section missing or invalid in %s\n", obj->path);