X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=sect.c;fp=sect.c;h=781a81bda516c5e5fdbf7f0f06351a8a3e63f69e;hp=0ea53a843f1c4568dec445fcab7c7f3a179ed014;hb=fbbe9b115f949735421485513154ce8abb8453eb;hpb=2e916a913fcc2650a85fa1f1b96b74abdda9ef9e diff --git a/sect.c b/sect.c index 0ea53a8..781a81b 100644 --- a/sect.c +++ b/sect.c @@ -415,6 +415,15 @@ int ResolveFixups(int sno) // evexpr presumably issues the errors/warnings here if (evexpr(fup->expr, &eval, &eattr, &esym) != OK) continue; + + if (optim_pc) + if (eattr & REFERENCED) + if (eattr & DEFINED) + if (!(eattr & EQUATED)) + { + error("relocation not allowed"); + continue; + } } // Simple symbol else @@ -422,6 +431,15 @@ int ResolveFixups(int sno) SYM * sy = fup->symbol; eattr = sy->sattr; + if (optim_pc) + if (eattr & REFERENCED) + if (eattr & DEFINED) + if (!(eattr & EQUATED)) + { + error("relocation not allowed"); + continue; + } + if (eattr & DEFINED) eval = sy->svalue; else