linux/kernel/kheaders.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Provide kernel headers useful to build tracing programs
 * such as for running eBPF tracing tools.
 *
 * (Borrowed code from kernel/configs.c)
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kobject.h>
#include <linux/init.h>

/*
 * Define kernel_headers_data and kernel_headers_data_end, within which the
 * compressed kernel headers are stored. The file is first compressed with xz.
 */

asm;

extern char kernel_headers_data[];
extern char kernel_headers_data_end[];

static ssize_t
ikheaders_read(struct file *file,  struct kobject *kobj,
	       struct bin_attribute *bin_attr,
	       char *buf, loff_t off, size_t len)
{}

static struct bin_attribute kheaders_attr __ro_after_init =;

static int __init ikheaders_init(void)
{}

static void __exit ikheaders_cleanup(void)
{}

module_init();
module_exit(ikheaders_cleanup);

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();