// evexpr presumably issues the errors/warnings here
if (evexpr(fup->expr, &eval, &eattr, &esym) != OK)
continue;
+
+ if (CHECK_OPTS(OPT_PC_RELATIVE))
+ if (eattr & REFERENCED)
+ if (eattr & DEFINED)
+ if (!(eattr & EQUATED))
+ {
+ error("relocation not allowed");
+ continue;
+ }
}
// Simple symbol
else
SYM * sy = fup->symbol;
eattr = sy->sattr;
+ if (CHECK_OPTS(OPT_PC_RELATIVE))
+ if (eattr & REFERENCED)
+ if (eattr & DEFINED)
+ if (!(eattr & EQUATED))
+ {
+ error("relocation not allowed");
+ continue;
+ }
+
if (eattr & DEFINED)
eval = sy->svalue;
else
}
}
- if (sbra_flag && (dw & FU_LBRA) && (eval + 0x80 < 0x100))
+ if (optim_warn_flag && (dw & FU_LBRA) && (eval + 0x80 < 0x100))
warn("unoptimized short branch");
}
if (eval == 0)
{
- if (CHECK_OPTS(OPT_NULL_BRA))
+ if (*locp) // optim_flags[OPT_NULL_BRA] is stored there, check the comment in mach.s under m_br
{
// Just output a NOP
*locp++ = 0x4E;
*locp = 0x71;
+ if (optim_warn_flag)
+ warn("bra.s with zero offset converted to NOP");
continue;
}
else