fprintf(ofp, "; Banking Stub %s:%s(%s)\n",
a->a_id, s->s_id, s->m_id);
fprintf(ofp, "; From area %s\n", bx->a_bap->a_id);
- fprintf(ofp, "B %02X %04X %02X %s\n",
+ fprintf(ofp, "B %02X %04X %02X %s %s\n",
bxm, addr,
- bmagic, bx->a_bap->a_id);
+ bmagic, bx->a_bap->a_id, a->a_id);
}
return;
}
{
int b1, b2, addr;
char name[65];
+ char sname[65];
if (strlen(p) > 4 && !isspace(p[8]))
fprintf(stderr, "Overflow: %s", p);
- if (sscanf(p, "%02x %04x %02x %64s", &b1, &addr, &b2, name) != 4) {
+ if (sscanf(p, "%02x %04x %02x %64s %64s", &b1, &addr, &b2, name, sname) != 5) {
fprintf(stderr, "Invalid relocation link %s\n", p);
exit(1);
}
+ /* A data relocation into another bank of data is treated as deliberate.
+ We can't do much else. It's not code so we can't patch it, and if it's
+ a data pointer (as it should be) then a relocation is nonsense! */
+ if (!stub_code(sname) && !stub_code(name))
+ return;
/* If we are stubbing the lot then code is handled as data is */
if (stub_code(name) && !stub_all)
code_reloc(b1, addr, b2);