ref: 42fd80186eb88ab683c82a866366d2c72657e1ac
dir: /src/libmach/findsec.c/
#include <stdio.h> #include <string.h> #include <scc/mach.h> #include "libmach.h" int findsec(Map *map, char *name) { int i; struct mapsec *sec; for (i = 0; i < map->n; i++) { char *s = map->sec[i].name; if (s && strcmp(s, name) == 0) return i; } return -1; }