btf_ext           382 tools/lib/bpf/btf.c struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
btf_ext           447 tools/lib/bpf/btf.c 		} else if (btf_ext && strcmp(name, BTF_EXT_ELF_SEC) == 0) {
btf_ext           468 tools/lib/bpf/btf.c 	if (btf_ext && btf_ext_data) {
btf_ext           469 tools/lib/bpf/btf.c 		*btf_ext = btf_ext__new(btf_ext_data->d_buf,
btf_ext           471 tools/lib/bpf/btf.c 		if (IS_ERR(*btf_ext))
btf_ext           473 tools/lib/bpf/btf.c 	} else if (btf_ext) {
btf_ext           474 tools/lib/bpf/btf.c 		*btf_ext = NULL;
btf_ext           489 tools/lib/bpf/btf.c 	if (btf_ext && IS_ERR(*btf_ext)) {
btf_ext           491 tools/lib/bpf/btf.c 		err = PTR_ERR(*btf_ext);
btf_ext           775 tools/lib/bpf/btf.c static int btf_ext_setup_info(struct btf_ext *btf_ext,
btf_ext           793 tools/lib/bpf/btf.c 	info = btf_ext->data + btf_ext->hdr->hdr_len + ext_sec->off;
btf_ext           796 tools/lib/bpf/btf.c 	if (btf_ext->data + btf_ext->data_size < info + ext_sec->len) {
btf_ext           864 tools/lib/bpf/btf.c static int btf_ext_setup_func_info(struct btf_ext *btf_ext)
btf_ext           867 tools/lib/bpf/btf.c 		.off = btf_ext->hdr->func_info_off,
btf_ext           868 tools/lib/bpf/btf.c 		.len = btf_ext->hdr->func_info_len,
btf_ext           870 tools/lib/bpf/btf.c 		.ext_info = &btf_ext->func_info,
btf_ext           874 tools/lib/bpf/btf.c 	return btf_ext_setup_info(btf_ext, &param);
btf_ext           877 tools/lib/bpf/btf.c static int btf_ext_setup_line_info(struct btf_ext *btf_ext)
btf_ext           880 tools/lib/bpf/btf.c 		.off = btf_ext->hdr->line_info_off,
btf_ext           881 tools/lib/bpf/btf.c 		.len = btf_ext->hdr->line_info_len,
btf_ext           883 tools/lib/bpf/btf.c 		.ext_info = &btf_ext->line_info,
btf_ext           887 tools/lib/bpf/btf.c 	return btf_ext_setup_info(btf_ext, &param);
btf_ext           890 tools/lib/bpf/btf.c static int btf_ext_setup_offset_reloc(struct btf_ext *btf_ext)
btf_ext           893 tools/lib/bpf/btf.c 		.off = btf_ext->hdr->offset_reloc_off,
btf_ext           894 tools/lib/bpf/btf.c 		.len = btf_ext->hdr->offset_reloc_len,
btf_ext           896 tools/lib/bpf/btf.c 		.ext_info = &btf_ext->offset_reloc_info,
btf_ext           900 tools/lib/bpf/btf.c 	return btf_ext_setup_info(btf_ext, &param);
btf_ext           936 tools/lib/bpf/btf.c void btf_ext__free(struct btf_ext *btf_ext)
btf_ext           938 tools/lib/bpf/btf.c 	if (!btf_ext)
btf_ext           940 tools/lib/bpf/btf.c 	free(btf_ext->data);
btf_ext           941 tools/lib/bpf/btf.c 	free(btf_ext);
btf_ext           944 tools/lib/bpf/btf.c struct btf_ext *btf_ext__new(__u8 *data, __u32 size)
btf_ext           946 tools/lib/bpf/btf.c 	struct btf_ext *btf_ext;
btf_ext           953 tools/lib/bpf/btf.c 	btf_ext = calloc(1, sizeof(struct btf_ext));
btf_ext           954 tools/lib/bpf/btf.c 	if (!btf_ext)
btf_ext           957 tools/lib/bpf/btf.c 	btf_ext->data_size = size;
btf_ext           958 tools/lib/bpf/btf.c 	btf_ext->data = malloc(size);
btf_ext           959 tools/lib/bpf/btf.c 	if (!btf_ext->data) {
btf_ext           963 tools/lib/bpf/btf.c 	memcpy(btf_ext->data, data, size);
btf_ext           965 tools/lib/bpf/btf.c 	if (btf_ext->hdr->hdr_len <
btf_ext           968 tools/lib/bpf/btf.c 	err = btf_ext_setup_func_info(btf_ext);
btf_ext           972 tools/lib/bpf/btf.c 	err = btf_ext_setup_line_info(btf_ext);
btf_ext           976 tools/lib/bpf/btf.c 	if (btf_ext->hdr->hdr_len <
btf_ext           979 tools/lib/bpf/btf.c 	err = btf_ext_setup_offset_reloc(btf_ext);
btf_ext           985 tools/lib/bpf/btf.c 		btf_ext__free(btf_ext);
btf_ext           989 tools/lib/bpf/btf.c 	return btf_ext;
btf_ext           992 tools/lib/bpf/btf.c const void *btf_ext__get_raw_data(const struct btf_ext *btf_ext, __u32 *size)
btf_ext           994 tools/lib/bpf/btf.c 	*size = btf_ext->data_size;
btf_ext           995 tools/lib/bpf/btf.c 	return btf_ext->data;
btf_ext          1047 tools/lib/bpf/btf.c 			     const struct btf_ext *btf_ext,
btf_ext          1051 tools/lib/bpf/btf.c 	return btf_ext_reloc_info(btf, &btf_ext->func_info, sec_name,
btf_ext          1056 tools/lib/bpf/btf.c 			     const struct btf_ext *btf_ext,
btf_ext          1060 tools/lib/bpf/btf.c 	return btf_ext_reloc_info(btf, &btf_ext->line_info, sec_name,
btf_ext          1064 tools/lib/bpf/btf.c __u32 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext)
btf_ext          1066 tools/lib/bpf/btf.c 	return btf_ext->func_info.rec_size;
btf_ext          1069 tools/lib/bpf/btf.c __u32 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext)
btf_ext          1071 tools/lib/bpf/btf.c 	return btf_ext->line_info.rec_size;
btf_ext          1076 tools/lib/bpf/btf.c static struct btf_dedup *btf_dedup_new(struct btf *btf, struct btf_ext *btf_ext,
btf_ext          1223 tools/lib/bpf/btf.c int btf__dedup(struct btf *btf, struct btf_ext *btf_ext,
btf_ext          1226 tools/lib/bpf/btf.c 	struct btf_dedup *d = btf_dedup_new(btf, btf_ext, opts);
btf_ext          1280 tools/lib/bpf/btf.c 	struct btf_ext *btf_ext;
btf_ext          1385 tools/lib/bpf/btf.c static struct btf_dedup *btf_dedup_new(struct btf *btf, struct btf_ext *btf_ext,
btf_ext          1401 tools/lib/bpf/btf.c 	d->btf_ext = btf_ext;
btf_ext          1505 tools/lib/bpf/btf.c 	if (!d->btf_ext)
btf_ext          1508 tools/lib/bpf/btf.c 	line_data_cur = d->btf_ext->line_info.info;
btf_ext          1509 tools/lib/bpf/btf.c 	line_data_end = d->btf_ext->line_info.info + d->btf_ext->line_info.len;
btf_ext          1510 tools/lib/bpf/btf.c 	rec_size = d->btf_ext->line_info.rec_size;
btf_ext            24 tools/lib/bpf/btf.h struct btf_ext;
btf_ext            70 tools/lib/bpf/btf.h 				      struct btf_ext **btf_ext);
btf_ext            89 tools/lib/bpf/btf.h LIBBPF_API struct btf_ext *btf_ext__new(__u8 *data, __u32 size);
btf_ext            90 tools/lib/bpf/btf.h LIBBPF_API void btf_ext__free(struct btf_ext *btf_ext);
btf_ext            91 tools/lib/bpf/btf.h LIBBPF_API const void *btf_ext__get_raw_data(const struct btf_ext *btf_ext,
btf_ext            94 tools/lib/bpf/btf.h 					const struct btf_ext *btf_ext,
btf_ext            98 tools/lib/bpf/btf.h 					const struct btf_ext *btf_ext,
btf_ext           101 tools/lib/bpf/btf.h LIBBPF_API __u32 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext);
btf_ext           102 tools/lib/bpf/btf.h LIBBPF_API __u32 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext);
btf_ext           109 tools/lib/bpf/btf.h LIBBPF_API int btf__dedup(struct btf *btf, struct btf_ext *btf_ext,
btf_ext           121 tools/lib/bpf/btf.h 					  const struct btf_ext *btf_ext,
btf_ext            57 tools/lib/bpf/btf_dump.c 	const struct btf_ext *btf_ext;
btf_ext           120 tools/lib/bpf/btf_dump.c 			       const struct btf_ext *btf_ext,
btf_ext           132 tools/lib/bpf/btf_dump.c 	d->btf_ext = btf_ext;
btf_ext           287 tools/lib/bpf/libbpf.c 	struct btf_ext *btf_ext;
btf_ext          1424 tools/lib/bpf/libbpf.c 	if (!obj->btf_ext)
btf_ext          1428 tools/lib/bpf/libbpf.c 		btf_ext__free(obj->btf_ext);
btf_ext          1429 tools/lib/bpf/libbpf.c 		obj->btf_ext = NULL;
btf_ext          1465 tools/lib/bpf/libbpf.c 		obj->btf_ext = btf_ext__new(btf_ext_data->d_buf,
btf_ext          1467 tools/lib/bpf/libbpf.c 		if (IS_ERR(obj->btf_ext)) {
btf_ext          1469 tools/lib/bpf/libbpf.c 				   BTF_EXT_ELF_SEC, PTR_ERR(obj->btf_ext));
btf_ext          1470 tools/lib/bpf/libbpf.c 			obj->btf_ext = NULL;
btf_ext          1508 tools/lib/bpf/libbpf.c 		if (obj->btf_ext) {
btf_ext          1509 tools/lib/bpf/libbpf.c 			btf_ext__free(obj->btf_ext);
btf_ext          1510 tools/lib/bpf/libbpf.c 			obj->btf_ext = NULL;
btf_ext          2277 tools/lib/bpf/libbpf.c 		err = btf_ext__reloc_func_info(obj->btf, obj->btf_ext,
btf_ext          2286 tools/lib/bpf/libbpf.c 		prog->func_info_rec_size = btf_ext__func_info_rec_size(obj->btf_ext);
btf_ext          2290 tools/lib/bpf/libbpf.c 		err = btf_ext__reloc_line_info(obj->btf, obj->btf_ext,
btf_ext          2299 tools/lib/bpf/libbpf.c 		prog->line_info_rec_size = btf_ext__line_info_rec_size(obj->btf_ext);
btf_ext          3144 tools/lib/bpf/libbpf.c 	seg = &obj->btf_ext->offset_reloc_info;
btf_ext          3189 tools/lib/bpf/libbpf.c 	if (obj->btf_ext->offset_reloc_info.len)
btf_ext          3227 tools/lib/bpf/libbpf.c 		if (obj->btf_ext) {
btf_ext          3256 tools/lib/bpf/libbpf.c 	if (obj->btf_ext) {
btf_ext          3309 tools/lib/bpf/libbpf.c 	if (obj->btf_ext) {
btf_ext          3387 tools/lib/bpf/libbpf.c 	if (prog->obj->btf_ext)
btf_ext          4200 tools/lib/bpf/libbpf.c 	btf_ext__free(obj->btf_ext);
btf_ext          4118 tools/testing/selftests/bpf/test_btf.c 	struct btf_ext *btf_ext = NULL;
btf_ext          4133 tools/testing/selftests/bpf/test_btf.c 	btf = btf__parse_elf(test->file, &btf_ext);
btf_ext          4144 tools/testing/selftests/bpf/test_btf.c 	has_btf_ext = btf_ext != NULL;
btf_ext          4145 tools/testing/selftests/bpf/test_btf.c 	btf_ext__free(btf_ext);