Current relocation processing does:
if (the relocation expr belongs to category A) do something; if (the relocation expr belongs to category B) do something; if (the relocation expr belongs to category C) do something;
This refactor flattens it into
switch (expr) { case R_PC: case R_...: do something; case R_...: do something; ... }
which may potentially improve performance.
In addition, if some architectures have strange logic, we can add a new RelExpr member and make it interrupt less to the generic code.
I'm guessing that some of the entries have been taken out as the relocations were not CUSTOM so they would never expect to be called?
Perhaps worth changing the comment
// The following expressions always compute a constant. The list does not contain expressions marked RELOCATE in scanReloc.