10 int modemap[4] = { 0, 1, -1, 2, };
12 typedef struct Reloc Reloc;
35 r->m = nm = malloc(r->t*sizeof(uchar));
36 r->a = na = malloc(r->t*sizeof(ulong));
37 memmove(nm, m, t*sizeof(uchar));
38 memmove(na, a, t*sizeof(ulong));
44 dynreloc(Sym *s, long v, int abs)
52 diag("bad relocation address");
54 if(s != S && s->type == SUNDEF)
55 k = abs ? ABSU : RELU;
57 k = abs ? ABSD : RELD;
58 /* Bprint(&bso, "R %s a=%ld(%lx) %d\n", s->name, a, a, k); */
66 for(i = n; i > 0; i--){
67 if(v < a[i-1]){ /* happens occasionally for data */
102 off = seek(cout, 0, 1);
107 for(i = 0; i < NHASH; i++)
108 for(s = hash[i]; s != S; s = s->link)
109 if(s->type == SUNDEF){
122 for(i = 0; i < n; i++){
125 diag("bad relocation order");
154 Bprint(&bso, "import table entries = %d\n", imports);
155 Bprint(&bso, "export table entries = %d\n", exports);