getDynRel() contains the next code:
uint32_t X86_64TargetInfo::getDynRel(uint32_t Type) const { if (Config->Shared && (Type == R_X86_64_PC32 || Type == R_X86_64_32)) error(getRelName(Type) + " cannot be a dynamic relocation"); return Type; }
where error was never thown/catched previously when running testcases because adjustExpr() method
consumed that error check. adjustExpr() errors out if dynamic relocations happens against the readonly segment.
I think initially we wanted to check that these two relocations are not present when linking DSO because of
possible overflow in runtime. Patch moves them to writable segment in testcases to allow
error check above to trigger.