On Mon, 2024-07-08 at 13:45 -0700, Andrii Nakryiko wrote: [...] > @@ -878,23 +895,22 @@ codegen_maps_skeleton(struct bpf_object *obj, size_t map_cnt, bool mmaped, bool > > codegen("\ > \n\ > - \n\ > - s->maps[%zu].name = \"%s\"; \n\ > - s->maps[%zu].map = &obj->maps.%s; \n\ > + \n\ > + map = (struct bpf_map_skeleton *)((char *)s->maps + %zu * s->map_skel_sz);\n\ > + map->name = \"%s\"; \n\ > + map->map = &obj->maps.%s; \n\ > ", > - i, bpf_map__name(map), i, ident); > + i, bpf_map__name(map), ident); > /* memory-mapped internal maps */ > if (mmaped && is_mmapable_map(map, ident, sizeof(ident))) { > - printf("\ts->maps[%zu].mmaped = (void **)&obj->%s;\n", > - i, ident); > + printf("\tmap->mmaped = (void **)&obj->%s; \n", ident); ^^^^ nit: this still prints extra white space [...]