MachO has only 24-bits for relocation addends, which is too small to span a semi-reasonable sized function. This means jump table lowering has to be careful about two things:
- Any pc-relative address should be to a linker-visible symbol so the addend is 0. This was fixed previously by making the actual jump table symbol linker-private.
- The entries, "LBB-x", must be resolved at compile-time.
This implements the second point by making the base the function address itself on MachO targets. However, it only applies to MachO because it is a less efficient system overall (requiring the function address base to be materialized separately).