X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=sect.c;fp=sect.c;h=834df9d9b5d1d58f60e56ac2e030a598a50979d0;hp=20e6fcb4a32016685d68116e5024272eddcba10a;hb=31894aa869ad24fac76a1d045d22c9179ea533d1;hpb=c6808e75ed6088e3006c0d6748c1288eebb39c8a diff --git a/sect.c b/sect.c index 20e6fcb..834df9d 100644 --- a/sect.c +++ b/sect.c @@ -462,6 +462,15 @@ int ResolveFixups(int sno) if (evexpr(fup->expr, &eval, &eattr, &esym) != OK) continue; + if (esym) + if (!(esym->sattr & DEFINED)) + { + // If our expression still has an undefined symbol at this stage, it's bad news. + // The linker is never going to resolve the expression, so that's an error. + error("cannot export complex expression with unresloved symbol '%s'", esym->sname); + continue; + } + if ((CHECK_OPTS(OPT_PC_RELATIVE)) && (eattr & (DEFINED | REFERENCED | EQUATED)) == (DEFINED | REFERENCED)) { error("relocation not allowed when o30 is enabled");