On Mon, Jul 8, 2024 at 3:54 PM Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: > > 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 ah, that's just printf(), not codegen(), missed that. I don't want to send another revision for this. Hopefully whoever applies can just remove those two spaces, if not it's no big deal either way and we can fix it up later. > > [...]