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