• Home
  • Raw
  • Download

Lines Matching refs:b

2119 static void add_header(struct buffer *b, struct module *mod)  in add_header()  argument
2121 buf_printf(b, "#include <linux/module.h>\n"); in add_header()
2122 buf_printf(b, "#include <linux/vermagic.h>\n"); in add_header()
2123 buf_printf(b, "#include <linux/compiler.h>\n"); in add_header()
2124 buf_printf(b, "\n"); in add_header()
2125 buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n"); in add_header()
2126 buf_printf(b, "\n"); in add_header()
2127 buf_printf(b, "__visible struct module __this_module\n"); in add_header()
2128 buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); in add_header()
2129 buf_printf(b, "\t.name = KBUILD_MODNAME,\n"); in add_header()
2131 buf_printf(b, "\t.init = init_module,\n"); in add_header()
2133 buf_printf(b, "#ifdef CONFIG_MODULE_UNLOAD\n" in add_header()
2136 buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n"); in add_header()
2137 buf_printf(b, "};\n"); in add_header()
2140 static void add_intree_flag(struct buffer *b, int is_intree) in add_intree_flag() argument
2143 buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n"); in add_intree_flag()
2147 static void add_retpoline(struct buffer *b) in add_retpoline() argument
2149 buf_printf(b, "\n#ifdef RETPOLINE\n"); in add_retpoline()
2150 buf_printf(b, "MODULE_INFO(retpoline, \"Y\");\n"); in add_retpoline()
2151 buf_printf(b, "#endif\n"); in add_retpoline()
2154 static void add_staging_flag(struct buffer *b, const char *name) in add_staging_flag() argument
2159 buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n"); in add_staging_flag()
2170 static int add_versions(struct buffer *b, struct module *mod) in add_versions() argument
2198 buf_printf(b, "\n"); in add_versions()
2199 buf_printf(b, "static const struct modversion_info ____versions[]\n"); in add_versions()
2200 buf_printf(b, "__used\n"); in add_versions()
2201 buf_printf(b, "__attribute__((section(\"__versions\"))) = {\n"); in add_versions()
2217 buf_printf(b, "\t{ %#8x, __VMLINUX_SYMBOL_STR(%s) },\n", in add_versions()
2221 buf_printf(b, "};\n"); in add_versions()
2226 static void add_depends(struct buffer *b, struct module *mod, in add_depends() argument
2236 buf_printf(b, "\n"); in add_depends()
2237 buf_printf(b, "static const char __module_depends[]\n"); in add_depends()
2238 buf_printf(b, "__used\n"); in add_depends()
2239 buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); in add_depends()
2240 buf_printf(b, "\"depends="); in add_depends()
2255 buf_printf(b, "%s%s", first ? "" : ",", p); in add_depends()
2258 buf_printf(b, "\";\n"); in add_depends()
2261 static void add_srcversion(struct buffer *b, struct module *mod) in add_srcversion() argument
2264 buf_printf(b, "\n"); in add_srcversion()
2265 buf_printf(b, "MODULE_INFO(srcversion, \"%s\");\n", in add_srcversion()
2270 static void write_if_changed(struct buffer *b, const char *fname) in write_if_changed() argument
2283 if (st.st_size != b->pos) in write_if_changed()
2286 tmp = NOFAIL(malloc(b->pos)); in write_if_changed()
2287 if (fread(tmp, 1, b->pos, file) != b->pos) in write_if_changed()
2290 if (memcmp(tmp, b->p, b->pos) != 0) in write_if_changed()
2307 if (fwrite(b->p, 1, b->pos, file) != b->pos) { in write_if_changed()