scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <stdio.h>
 2#include <string.h>
 3
 4#include <scc/mach.h>
 5
 6#include "libmach.h"
 7
 8int
 9findseg(Map *map, unsigned long long addr)
10{
11	int i;
12	Mapsec *seg;
13
14	for (i = 0; i < map->nseg; ++i) {
15		seg = &map->seg[i];
16		if (seg->used && seg->sec.base == addr)
17			return i;
18	}
19
20	return -1;
21}